X-Git-Url: http://code.vuplus.com/gitweb/?a=blobdiff_plain;f=lib%2Fservice%2Fservicedvb.cpp;h=70675fd7cf73051fc2d67b97f5bc555b1653d68e;hb=17d12fc3339d68b023ab6f388a3576af2bcb4949;hp=45a12ce29b27911263f1f6049a3a805762d8e620;hpb=d245191dd27ad9884c33ad3a76992dc6c4e8f33b;p=vuplus_dvbapp diff --git a/lib/service/servicedvb.cpp b/lib/service/servicedvb.cpp index 45a12ce..70675fd 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()) @@ -1223,6 +1237,7 @@ RESULT eDVBServicePlay::setFastForward_internal(int ratio) return m_decoder->setFastForward(ffratio); else return m_decoder->setTrickmode(); + return 0; } RESULT eDVBServicePlay::seek(ePtr &ptr) @@ -2209,6 +2224,7 @@ void eDVBServicePlay::switchToLive() m_new_subtitle_page_connection = 0; m_rds_decoder_event_connection = 0; m_video_event_connection = 0; + m_is_paused = m_skipmode = 0; /* not supported in live mode */ /* free the timeshift service handler, we need the resources */ m_service_handler_timeshift.free(); @@ -2822,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)