X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/45364af4f6ff01f3f3156f52262a456c77c59574..f769a73f621f88d4b4e64be8fae3f79ca3ef6c1b:/lib/dvb/decoder.cpp diff --git a/lib/dvb/decoder.cpp b/lib/dvb/decoder.cpp index 72c6e392..57f48ee3 100644 --- a/lib/dvb/decoder.cpp +++ b/lib/dvb/decoder.cpp @@ -563,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); } @@ -1145,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); @@ -1173,6 +1187,8 @@ RESULT eTSMPEGDecoder::showSinglePic(const char *filename) ++pos; if ((iframe[3] >> 4) != 0xE) // no pes header write(m_video_clip_fd, pes_header, sizeof(pes_header)); + else + iframe[4] = iframe[5] = 0x00; write(m_video_clip_fd, iframe, s.st_size); if (!seq_end_avail) write(m_video_clip_fd, seq_end, sizeof(seq_end));