X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/f1905e060a3a947ac2d3825e43b3052b361c71e6..ef35eeebd55877fa9d1037a685f90b4027a0426e:/lib/service/servicedvb.cpp diff --git a/lib/service/servicedvb.cpp b/lib/service/servicedvb.cpp index 9cac25fa..6a464aff 100644 --- a/lib/service/servicedvb.cpp +++ b/lib/service/servicedvb.cpp @@ -309,7 +309,9 @@ eStaticServiceDVBPVRInformation::eStaticServiceDVBPVRInformation(const eServiceR RESULT eStaticServiceDVBPVRInformation::getName(const eServiceReference &ref, std::string &name) { ASSERT(ref == m_ref); - if (m_parser.m_name.size()) + if (!ref.name.empty()) + name = ref.name; + else if (!m_parser.m_name.empty()) name = m_parser.m_name; else { @@ -1094,7 +1096,8 @@ void eDVBServicePlay::serviceEventTimeshift(int event) if (m_skipmode < 0) m_cue->seekTo(0, -1000); - m_service_handler_timeshift.tune(r, 1, m_cue, 0, m_dvb_service); /* use the decoder demux for everything */ + ePtr source = createTsSource(r); + m_service_handler_timeshift.tuneExt(r, 1, source, r.path.c_str(), m_cue, 0, m_dvb_service); /* use the decoder demux for everything */ m_event((iPlayableService*)this, evUser+1); } @@ -1123,7 +1126,8 @@ void eDVBServicePlay::serviceEventTimeshift(int event) m_service_handler_timeshift.free(); resetTimeshift(1); - m_service_handler_timeshift.tune(r, 1, m_cue, 0, m_dvb_service); /* use the decoder demux for everything */ + ePtr source = createTsSource(r); + m_service_handler_timeshift.tuneExt(r, 1, source, m_timeshift_file_next.c_str(), m_cue, 0, m_dvb_service); /* use the decoder demux for everything */ m_event((iPlayableService*)this, evUser+1); } @@ -1153,7 +1157,8 @@ RESULT eDVBServicePlay::start() m_event(this, evStart); m_first_program_info = 1; - m_service_handler.tune(service, m_is_pvr, m_cue, false, m_dvb_service); + ePtr source = createTsSource(service); + m_service_handler.tuneExt(service, m_is_pvr, source, service.path.c_str(), m_cue, false, m_dvb_service); if (m_is_pvr) { @@ -1586,7 +1591,7 @@ int eDVBServicePlay::getInfo(int w) { eDVBServicePMTHandler::program program; - if (w == sCAIDs) + if (w == sCAIDs || w == sCAIDPIDs) return resIsPyObject; eDVBServicePMTHandler &h = m_timeshift_active ? m_service_handler_timeshift : m_service_handler; @@ -1727,6 +1732,8 @@ PyObject *eDVBServicePlay::getInfoObject(int w) { case sCAIDs: return m_service_handler.getCaIds(); + case sCAIDPIDs: + return m_service_handler.getCaIds(true); case sTransponderData: return eStaticServiceDVBInformation().getInfoObject(m_reference, w); default: @@ -2357,6 +2364,13 @@ void eDVBServicePlay::resetTimeshift(int start) m_timeshift_active = 0; } +ePtr eDVBServicePlay::createTsSource(eServiceReferenceDVB &ref) +{ + eRawFile *f = new eRawFile(); + f->open(ref.path.c_str()); + return ePtr(f); +} + void eDVBServicePlay::switchToTimeshift() { if (m_timeshift_active) @@ -2368,7 +2382,9 @@ void eDVBServicePlay::switchToTimeshift() r.path = m_timeshift_file; m_cue->seekTo(0, -1000); - m_service_handler_timeshift.tune(r, 1, m_cue, 0, m_dvb_service); /* use the decoder demux for everything */ + + ePtr source = createTsSource(r); + m_service_handler_timeshift.tuneExt(r, 1, source, m_timeshift_file.c_str(), m_cue, 0, m_dvb_service); /* use the decoder demux for everything */ eDebug("eDVBServicePlay::switchToTimeshift, in pause mode now."); pause();