X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/27af195d31298de858014931bdbe06fee1d244e4..10e7e45ae92d4fe06f70126ed256b87896dbc432:/lib/dvb/decoder.cpp diff --git a/lib/dvb/decoder.cpp b/lib/dvb/decoder.cpp index 7ad1a25d..c550163e 100644 --- a/lib/dvb/decoder.cpp +++ b/lib/dvb/decoder.cpp @@ -315,7 +315,7 @@ eDVBVideo::eDVBVideo(eDVBDemux *demux, int dev) eWarning("%s: %m", filename); else { - m_sn = new eSocketNotifier(eApp, m_fd, eSocketNotifier::Priority); + m_sn = eSocketNotifier::create(eApp, m_fd, eSocketNotifier::Priority); CONNECT(m_sn->activated, eDVBVideo::video_event); } eDebug("Video Device: %s", filename); @@ -527,8 +527,6 @@ int eDVBVideo::getPTS(pts_t &now) eDVBVideo::~eDVBVideo() { - if (m_sn) - delete m_sn; if (m_is_slow_motion) setSlowMotion(0); if (m_is_fast_forward) @@ -563,6 +561,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); } @@ -1173,6 +1185,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));