| 234 | } |
| 235 | |
| 236 | bool Frontend::isDataAvailable() { |
| 237 | pollfd pfd; |
| 238 | pfd.fd = _fd_dmx; |
| 239 | pfd.events = POLLIN; |
| 240 | pfd.revents = 0; |
| 241 | const int pollRet = ::poll(&pfd, 1, 180); |
| 242 | if (pollRet > 0) { |
| 243 | return (pfd.revents & POLLIN) == POLLIN; |
| 244 | } else if (pollRet < 0) { |
| 245 | PERROR("Error during polling frontend for data"); |
| 246 | return false; |
| 247 | } |
| 248 | // SI_LOG_DEBUG("Stream: %d, Timeout during polling frontend for data", _streamID); |
| 249 | return false; |
| 250 | } |
| 251 | |
| 252 | bool Frontend::readFullTSPacket(mpegts::PacketBuffer &buffer) { |
| 253 | // try read maximum amount of bytes from DMX |
no outgoing calls
no test coverage detected