From: Andreas Monzner Date: Thu, 25 Sep 2008 12:45:39 +0000 (+0000) Subject: add possibility to query current progressive / framerate state X-Git-Tag: 2.6.0~851 X-Git-Url: https://git.cweiske.de/enigma2.git/commitdiff_plain/be40133df4db68185931042f43995cf27da480be add possibility to query current progressive / framerate state --- diff --git a/lib/service/iservice.h b/lib/service/iservice.h index 7448a5e0..929aaa93 100644 --- a/lib/service/iservice.h +++ b/lib/service/iservice.h @@ -261,6 +261,8 @@ public: enum { sIsCrypted, /* is encrypted (no indication if decrypt was possible) */ sAspect, /* aspect ratio: 0=4:3, 1=16:9, 2=whatever we need */ + sFrameRate, /* frame rate */ + sProgressive, /* 0 = interlaced, 1 = progressive */ sIsMultichannel, /* multichannel *available* (probably not selected) */ /* "user serviceable info" - they are not reliable. Don't use them for anything except the service menu! diff --git a/lib/service/servicedvb.cpp b/lib/service/servicedvb.cpp index e036307b..17f841b5 100644 --- a/lib/service/servicedvb.cpp +++ b/lib/service/servicedvb.cpp @@ -1594,8 +1594,16 @@ int eDVBServicePlay::getInfo(int w) if (m_videoEventData.type != iTSMPEGDecoder::videoEvent::eventUnknown) return m_videoEventData.width; return -1; + case sFrameRate: + if (m_videoEventData.type != iTSMPEGDecoder::videoEvent::eventUnknown) + return m_videoEventData.framerate; + return -1; + case sProgressive: + if (m_videoEventData.type != iTSMPEGDecoder::videoEvent::eventUnknown) + return m_videoEventData.progressive; + return -1; #else -#warning "FIXMEE implement sVideoHeight, sVideoWidth for old DVB API" +#warning "FIXMEE implement sFrameRate, sProgressive, sVideoHeight, sVideoWidth for old DVB API" #endif case sAspect: #if HAVE_DVB_API_VERSION >= 3 @@ -2953,15 +2961,19 @@ void eDVBServicePlay::setPCMDelay(int delay) void eDVBServicePlay::video_event(struct iTSMPEGDecoder::videoEvent event) { - memcpy(&m_videoEventData, &event, sizeof(iTSMPEGDecoder::videoEvent)); switch(event.type) { case iTSMPEGDecoder::videoEvent::eventSizeChanged: + m_videoEventData.aspect = event.aspect; + m_videoEventData.height = event.height; + m_videoEventData.width = event.width; m_event((iPlayableService*)this, evVideoSizeChanged); break; case iTSMPEGDecoder::videoEvent::eventFrameRateChanged: + m_videoEventData.framerate = event.framerate; m_event((iPlayableService*)this, evVideoFramerateChanged); break; case iTSMPEGDecoder::videoEvent::eventProgressiveChanged: + m_videoEventData.progressive = event.progressive; m_event((iPlayableService*)this, evVideoProgressiveChanged); break; }