X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/1a2b0a4379ee3e9d16108c52abdadc9bb85675c1..420e0f562698fecddf636f0ecfffc3aa17a5987d:/lib/service/servicedvb.cpp diff --git a/lib/service/servicedvb.cpp b/lib/service/servicedvb.cpp index bd15bcdc..e62d7783 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); @@ -427,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()) @@ -1517,7 +1529,7 @@ int eDVBServicePlay::getInfo(int w) int aspect = -1; if (m_decoder) aspect = m_decoder->getVideoAspect(); - if (no_program_info) + if (aspect == -1 && no_program_info) break; else if (aspect == -1 && !program.videoStreams.empty() && program.videoStreams[0].component_tag != -1) { @@ -2826,18 +2838,22 @@ void eDVBServicePlay::checkSubtitleTiming() m_decoder->getPTS(0, pos); eDebug("%lld %lld", pos, show_time); - int diff = show_time - pos; + 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); diff = 0; } -// if (diff > 900000) -// { -// eDebug("[invalid]"); -// diff = 0; -// } - + if (abs(diff) > 1800000) + { + eDebug("[invalid]... immediate show!"); + diff = 0; + } if ((diff/90)<20) { if (type == TELETEXT)