X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/d6f965e34c0e482e5579689ee3150788dad3067f..5960b0d3e89264496a44e21f84da1e057905df53:/lib/service/servicedvb.cpp diff --git a/lib/service/servicedvb.cpp b/lib/service/servicedvb.cpp index a57a813b..70675fd7 100644 --- a/lib/service/servicedvb.cpp +++ b/lib/service/servicedvb.cpp @@ -336,6 +336,7 @@ public: int isPlayable(const eServiceReference &ref, const eServiceReference &ignore) { return 1; } int getInfo(const eServiceReference &ref, int w); std::string getInfoString(const eServiceReference &ref,int w); + PyObject *getInfoObject(const eServiceReference &r, int what); }; DEFINE_REF(eStaticServiceDVBPVRInformation); @@ -400,6 +401,8 @@ int eStaticServiceDVBPVRInformation::getInfo(const eServiceReference &ref, int w return iServiceInformation::resIsString; case iServiceInformation::sServiceref: return iServiceInformation::resIsString; + case iServiceInformation::sFileSize: + return m_parser.m_filesize; case iServiceInformation::sTimeCreate: if (m_parser.m_time_create) return m_parser.m_time_create; @@ -425,6 +428,17 @@ std::string eStaticServiceDVBPVRInformation::getInfoString(const eServiceReferen } } +PyObject *eStaticServiceDVBPVRInformation::getInfoObject(const eServiceReference &r, int what) +{ + switch (what) + { + case iServiceInformation::sFileSize: + return PyLong_FromLongLong(m_parser.m_filesize); + default: + Py_RETURN_NONE; + } +} + RESULT eStaticServiceDVBPVRInformation::getEvent(const eServiceReference &ref, ePtr &evt, time_t start_time) { if (!ref.path.empty()) @@ -2825,6 +2839,11 @@ void eDVBServicePlay::checkSubtitleTiming() eDebug("%lld %lld", pos, show_time); int diff = show_time - pos; + if (type == TELETEXT && !page.m_have_pts) + { + eDebug("ttx subtitle page without pts... immediate show"); + diff = 0; + } if (diff < 0) { eDebug("[late (%d ms)]", -diff / 90); @@ -2832,14 +2851,9 @@ void eDVBServicePlay::checkSubtitleTiming() } if (abs(diff) > 1800000) { - eDebug("skip [invalid]"); - if (type == TELETEXT) - m_subtitle_pages.pop_front(); - else - m_dvb_subtitle_pages.pop_front(); - continue; + eDebug("[invalid]... immediate show!"); + diff = 0; } - if ((diff/90)<20) { if (type == TELETEXT)