X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/156d69e7c1fcdea9c26c33240a8ae9e3c059cce7..f03c85f8c3575d22eb065313857d8d3e57960e95:/lib/dvb/decoder.cpp diff --git a/lib/dvb/decoder.cpp b/lib/dvb/decoder.cpp index 511f91de..71b3f39e 100644 --- a/lib/dvb/decoder.cpp +++ b/lib/dvb/decoder.cpp @@ -282,9 +282,8 @@ void eDVBAudio::setChannel(int channel) int eDVBAudio::getPTS(pts_t &now) { - eDebugNoNewLine("AUDIO_GET_PTS - "); if (::ioctl(m_fd, AUDIO_GET_PTS, &now) < 0) - eDebug("failed (%m)"); + eDebug("AUDIO_GET_PTS failed (%m)"); return 0; } @@ -564,6 +563,20 @@ void eDVBVideo::video_event(int) event.width = evt.u.size.w; /* emit */ m_event(event); } + else if (evt.type == VIDEO_EVENT_FRAME_RATE_CHANGED) + { + struct iTSMPEGDecoder::videoEvent event; + event.type = iTSMPEGDecoder::videoEvent::eventFrameRateChanged; + event.framerate = evt.u.frame_rate; + /* emit */ m_event(event); + } + else if (evt.type == 16 /*VIDEO_EVENT_PROGRESSIVE_CHANGED*/) + { + struct iTSMPEGDecoder::videoEvent event; + event.type = iTSMPEGDecoder::videoEvent::eventProgressiveChanged; + event.progressive = evt.u.frame_rate; + /* emit */ m_event(event); + } else eDebug("unhandled DVBAPI Video Event %d", evt.type); } @@ -1146,7 +1159,7 @@ RESULT eTSMPEGDecoder::showSinglePic(const char *filename) { eDebug("showSinglePic %s", filename); int f = open(filename, O_RDONLY); - if (f) + if (f >= 0) { struct stat s; fstat(f, &s);