MCPcopy Create free account
hub / github.com/Barracuda09/SATPI / isDataAvailable

Method isDataAvailable

src/input/dvb/Frontend.cpp:236–250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected