1 #include <lib/base/eerror.h>
2 #include <lib/base/object.h>
4 #include <lib/service/servicedvb.h>
5 #include <lib/service/service.h>
6 #include <lib/base/init_num.h>
7 #include <lib/base/init.h>
9 #include <lib/dvb/dvb.h>
10 #include <lib/dvb/db.h>
12 #include <lib/service/servicedvbrecord.h>
13 #include <lib/dvb/metaparser.h>
14 #include <lib/dvb/tstools.h>
16 class eStaticServiceDVBInformation: public iStaticServiceInformation
18 DECLARE_REF(eStaticServiceDVBInformation);
20 RESULT getName(const eServiceReference &ref, std::string &name);
21 int getLength(const eServiceReference &ref);
24 DEFINE_REF(eStaticServiceDVBInformation);
26 RESULT eStaticServiceDVBInformation::getName(const eServiceReference &ref, std::string &name)
28 eServiceReferenceDVB &service = (eServiceReferenceDVB&)ref;
29 if ( !ref.name.empty() )
31 if (service.getParentTransportStreamID().get()) // linkage subservice
33 ePtr<iServiceHandler> service_center;
34 if (!eServiceCenter::getInstance(service_center))
36 eServiceReferenceDVB parent = service;
37 parent.setTransportStreamID( service.getParentTransportStreamID() );
38 parent.setServiceID( service.getParentServiceID() );
39 parent.setParentTransportStreamID(eTransportStreamID(0));
40 parent.setParentServiceID(eServiceID(0));
42 ePtr<iStaticServiceInformation> service_info;
43 if (!service_center->info(parent, service_info))
45 if (!service_info->getName(parent, name))
47 // just show short name
48 unsigned int pos = name.find("\xc2\x86");
49 if ( pos != std::string::npos )
51 pos = name.find("\xc2\x87");
52 if ( pos != std::string::npos )
68 int eStaticServiceDVBInformation::getLength(const eServiceReference &ref)
73 class eStaticServiceDVBBouquetInformation: public iStaticServiceInformation
75 DECLARE_REF(eStaticServiceDVBBouquetInformation);
77 RESULT getName(const eServiceReference &ref, std::string &name);
78 int getLength(const eServiceReference &ref);
81 DEFINE_REF(eStaticServiceDVBBouquetInformation);
83 RESULT eStaticServiceDVBBouquetInformation::getName(const eServiceReference &ref, std::string &name)
85 ePtr<iDVBChannelList> db;
86 ePtr<eDVBResourceManager> res;
89 if ((err = eDVBResourceManager::getInstance(res)) != 0)
91 eDebug("eStaticServiceDVBBouquetInformation::getName failed.. no resource manager!");
94 if ((err = res->getChannelList(db)) != 0)
96 eDebug("eStaticServiceDVBBouquetInformation::getName failed.. no channel list!");
101 if ((err = db->getBouquet(ref, bouquet)) != 0)
103 eDebug("eStaticServiceDVBBouquetInformation::getName failed.. getBouquet failed!");
107 if ( bouquet && bouquet->m_bouquet_name.length() )
109 name = bouquet->m_bouquet_name;
116 int eStaticServiceDVBBouquetInformation::getLength(const eServiceReference &ref)
121 class eStaticServiceDVBPVRInformation: public iStaticServiceInformation
123 DECLARE_REF(eStaticServiceDVBPVRInformation);
124 eServiceReference m_ref;
125 eDVBMetaParser m_parser;
127 eStaticServiceDVBPVRInformation(const eServiceReference &ref);
128 RESULT getName(const eServiceReference &ref, std::string &name);
129 int getLength(const eServiceReference &ref);
131 int getInfo(const eServiceReference &ref, int w);
132 std::string getInfoString(const eServiceReference &ref,int w);
135 DEFINE_REF(eStaticServiceDVBPVRInformation);
137 eStaticServiceDVBPVRInformation::eStaticServiceDVBPVRInformation(const eServiceReference &ref)
140 m_parser.parseFile(ref.path);
143 RESULT eStaticServiceDVBPVRInformation::getName(const eServiceReference &ref, std::string &name)
145 ASSERT(ref == m_ref);
146 name = m_parser.m_name.size() ? m_parser.m_name : ref.path;
150 int eStaticServiceDVBPVRInformation::getLength(const eServiceReference &ref)
152 ASSERT(ref == m_ref);
156 if (tstools.openFile(ref.path.c_str()))
160 if (tstools.calcLen(len))
166 int eStaticServiceDVBPVRInformation::getInfo(const eServiceReference &ref, int w)
170 case iServiceInformation::sDescription:
171 return iServiceInformation::resIsString;
172 case iServiceInformation::sTimeCreate:
173 if (m_parser.m_time_create)
174 return m_parser.m_time_create;
176 return iServiceInformation::resNA;
178 return iServiceInformation::resNA;
182 std::string eStaticServiceDVBPVRInformation::getInfoString(const eServiceReference &ref,int w)
186 case iServiceInformation::sDescription:
187 return m_parser.m_description;
193 class eDVBPVRServiceOfflineOperations: public iServiceOfflineOperations
195 DECLARE_REF(eDVBPVRServiceOfflineOperations);
196 eServiceReferenceDVB m_ref;
198 eDVBPVRServiceOfflineOperations(const eServiceReference &ref);
200 RESULT deleteFromDisk(int simulate);
201 RESULT getListOfFilenames(std::list<std::string> &);
204 DEFINE_REF(eDVBPVRServiceOfflineOperations);
206 eDVBPVRServiceOfflineOperations::eDVBPVRServiceOfflineOperations(const eServiceReference &ref): m_ref((const eServiceReferenceDVB&)ref)
210 RESULT eDVBPVRServiceOfflineOperations::deleteFromDisk(int simulate)
216 std::list<std::string> res;
217 if (getListOfFilenames(res))
220 /* TODO: deferred removing.. */
221 for (std::list<std::string>::iterator i(res.begin()); i != res.end(); ++i)
223 eDebug("Removing %s...", i->c_str());
224 ::unlink(i->c_str());
231 RESULT eDVBPVRServiceOfflineOperations::getListOfFilenames(std::list<std::string> &res)
234 res.push_back(m_ref.path);
235 res.push_back(m_ref.path + ".meta");
239 DEFINE_REF(eServiceFactoryDVB)
241 eServiceFactoryDVB::eServiceFactoryDVB()
243 ePtr<eServiceCenter> sc;
245 eServiceCenter::getPrivInstance(sc);
247 sc->addServiceFactory(eServiceFactoryDVB::id, this);
250 eServiceFactoryDVB::~eServiceFactoryDVB()
252 ePtr<eServiceCenter> sc;
254 eServiceCenter::getPrivInstance(sc);
256 sc->removeServiceFactory(eServiceFactoryDVB::id);
259 DEFINE_REF(eDVBServiceList);
261 eDVBServiceList::eDVBServiceList(const eServiceReference &parent): m_parent(parent)
265 eDVBServiceList::~eDVBServiceList()
269 RESULT eDVBServiceList::startQuery()
271 ePtr<iDVBChannelList> db;
272 ePtr<eDVBResourceManager> res;
275 if ((err = eDVBResourceManager::getInstance(res)) != 0)
277 eDebug("no resource manager");
280 if ((err = res->getChannelList(db)) != 0)
282 eDebug("no channel list");
286 ePtr<eDVBChannelQuery> q;
288 if (!m_parent.path.empty())
290 eDVBChannelQuery::compile(q, m_parent.path);
293 eDebug("compile query failed");
298 if ((err = db->startQuery(m_query, q, m_parent)) != 0)
300 eDebug("startQuery failed");
307 RESULT eDVBServiceList::getContent(std::list<eServiceReference> &list)
309 eServiceReferenceDVB ref;
314 while (!m_query->getNextResult(ref))
319 RESULT eDVBServiceList::getNext(eServiceReference &ref)
324 return m_query->getNextResult((eServiceReferenceDVB&)ref);
327 int eDVBServiceList::compareLessEqual(const eServiceReference &a, const eServiceReference &b)
329 return m_query->compareLessEqual((const eServiceReferenceDVB&)a, (const eServiceReferenceDVB&)b);
332 RESULT eDVBServiceList::startEdit(ePtr<iMutableServiceList> &res)
334 if (m_parent.flags & eServiceReference::flagDirectory) // bouquet
336 ePtr<iDVBChannelList> db;
337 ePtr<eDVBResourceManager> resm;
339 if (eDVBResourceManager::getInstance(resm) || resm->getChannelList(db))
342 if (db->getBouquet(m_parent, m_bouquet) != 0)
353 RESULT eDVBServiceList::addService(eServiceReference &ref)
357 return m_bouquet->addService(ref);
360 RESULT eDVBServiceList::removeService(eServiceReference &ref)
364 return m_bouquet->removeService(ref);
367 RESULT eDVBServiceList::moveService(eServiceReference &ref, int pos)
371 return m_bouquet->moveService(ref, pos);
374 RESULT eDVBServiceList::flushChanges()
378 return m_bouquet->flushChanges();
381 RESULT eServiceFactoryDVB::play(const eServiceReference &ref, ePtr<iPlayableService> &ptr)
383 ePtr<eDVBService> service;
384 int r = lookupService(service, ref);
387 // check resources...
388 ptr = new eDVBServicePlay(ref, service);
392 RESULT eServiceFactoryDVB::record(const eServiceReference &ref, ePtr<iRecordableService> &ptr)
394 if (ref.path.empty())
396 ptr = new eDVBServiceRecord((eServiceReferenceDVB&)ref);
405 RESULT eServiceFactoryDVB::list(const eServiceReference &ref, ePtr<iListableService> &ptr)
407 ePtr<eDVBServiceList> list = new eDVBServiceList(ref);
408 if (list->startQuery())
418 RESULT eServiceFactoryDVB::info(const eServiceReference &ref, ePtr<iStaticServiceInformation> &ptr)
420 /* is a listable service? */
421 if ((ref.flags & eServiceReference::flagDirectory) == eServiceReference::flagDirectory) // bouquet
423 if ( !ref.name.empty() ) // satellites or providers list
424 ptr = new eStaticServiceDVBInformation;
425 else // a dvb bouquet
426 ptr = new eStaticServiceDVBBouquetInformation;
428 else if (!ref.path.empty()) /* do we have a PVR service? */
429 ptr = new eStaticServiceDVBPVRInformation(ref);
430 else // normal dvb service
432 ePtr<eDVBService> service;
433 if (lookupService(service, ref)) // no eDVBService avail for this reference ( Linkage Services... )
434 ptr = new eStaticServiceDVBInformation;
436 /* eDVBService has the iStaticServiceInformation interface, so we pass it here. */
442 RESULT eServiceFactoryDVB::offlineOperations(const eServiceReference &ref, ePtr<iServiceOfflineOperations> &ptr)
444 if (ref.path.empty())
450 ptr = new eDVBPVRServiceOfflineOperations(ref);
455 RESULT eServiceFactoryDVB::lookupService(ePtr<eDVBService> &service, const eServiceReference &ref)
457 // TODO: handle the listing itself
458 // if (ref.... == -1) .. return "... bouquets ...";
459 // could be also done in another serviceFactory (with seperate ID) to seperate actual services and lists
461 ePtr<iDVBChannelList> db;
462 ePtr<eDVBResourceManager> res;
465 if ((err = eDVBResourceManager::getInstance(res)) != 0)
467 eDebug("no resource manager");
470 if ((err = res->getChannelList(db)) != 0)
472 eDebug("no channel list");
476 /* we are sure to have a ..DVB reference as the info() call was forwarded here according to it's ID. */
477 if ((err = db->getService((eServiceReferenceDVB&)ref, service)) != 0)
479 eDebug("getService failed!");
486 eDVBServicePlay::eDVBServicePlay(const eServiceReference &ref, eDVBService *service):
487 m_reference(ref), m_dvb_service(service), m_service_handler(0), m_is_paused(0)
489 m_is_pvr = !ref.path.empty();
490 m_timeshift_enabled = 0;
492 CONNECT(m_service_handler.serviceEvent, eDVBServicePlay::serviceEvent);
493 CONNECT(m_event_handler.m_eit_changed, eDVBServicePlay::gotNewEvent);
496 eDVBServicePlay::~eDVBServicePlay()
500 void eDVBServicePlay::gotNewEvent()
504 ePtr<eServiceEvent> m_event_now, m_event_next;
505 getEvent(m_event_now, 0);
506 getEvent(m_event_next, 1);
509 eDebug("now running: %s (%d seconds :)", m_event_now->m_event_name.c_str(), m_event_now->m_duration);
511 eDebug("next running: %s (%d seconds :)", m_event_next->m_event_name.c_str(), m_event_next->m_duration);
513 m_event((iPlayableService*)this, evUpdatedEventInfo);
516 void eDVBServicePlay::serviceEvent(int event)
520 case eDVBServicePMTHandler::eventTuned:
522 ePtr<iDVBDemux> m_demux;
523 if (!m_service_handler.getDemux(m_demux))
525 eServiceReferenceDVB &ref = (eServiceReferenceDVB&) m_reference;
526 int sid = ref.getParentServiceID().get();
528 sid = ref.getServiceID().get();
529 if ( ref.getParentTransportStreamID().get() &&
530 ref.getParentTransportStreamID() != ref.getTransportStreamID() )
531 m_event_handler.startOther(m_demux, sid);
533 m_event_handler.start(m_demux, sid);
537 case eDVBServicePMTHandler::eventTuneFailed:
539 eDebug("DVB service failed to tune");
540 m_event((iPlayableService*)this, evTuneFailed);
543 case eDVBServicePMTHandler::eventNewProgramInfo:
545 int vpid = -1, apid = -1, apidtype = -1, pcrpid = -1;
546 eDVBServicePMTHandler::program program;
547 if (m_service_handler.getProgramInfo(program))
548 eDebug("getting program info failed.");
551 eDebugNoNewLine("have %d video stream(s)", program.videoStreams.size());
552 if (!program.videoStreams.empty())
554 eDebugNoNewLine(" (");
555 for (std::vector<eDVBServicePMTHandler::videoStream>::const_iterator
556 i(program.videoStreams.begin());
557 i != program.videoStreams.end(); ++i)
561 if (i != program.videoStreams.begin())
562 eDebugNoNewLine(", ");
563 eDebugNoNewLine("%04x", i->pid);
565 eDebugNoNewLine(")");
567 eDebugNoNewLine(", and %d audio stream(s)", program.audioStreams.size());
568 if (!program.audioStreams.empty())
570 eDebugNoNewLine(" (");
571 for (std::vector<eDVBServicePMTHandler::audioStream>::const_iterator
572 i(program.audioStreams.begin());
573 i != program.audioStreams.end(); ++i)
580 if (i != program.audioStreams.begin())
581 eDebugNoNewLine(", ");
582 eDebugNoNewLine("%04x", i->pid);
584 eDebugNoNewLine(")");
586 eDebug(", and the pcr pid is %04x", program.pcrPid);
587 if (program.pcrPid != 0x1fff)
588 pcrpid = program.pcrPid;
593 ePtr<iDVBDemux> demux;
594 m_service_handler.getDemux(demux);
596 demux->getMPEGDecoder(m_decoder);
601 m_decoder->setVideoPID(vpid);
602 m_current_audio_stream = 0;
603 m_decoder->setAudioPID(apid, apidtype);
605 m_decoder->setSyncPCR(pcrpid);
607 m_decoder->setSyncPCR(-1);
609 // how we can do this better?
610 // update cache pid when the user changed the audio track or video track
611 // TODO handling of difference audio types.. default audio types..
613 /* don't worry about non-existing services, nor pvr services */
614 if (m_dvb_service && !m_is_pvr)
616 m_dvb_service->setCachePID(eDVBService::cVPID, vpid);
617 m_dvb_service->setCachePID(eDVBService::cAPID, apid);
618 m_dvb_service->setCachePID(eDVBService::cPCRPID, pcrpid);
622 m_event((iPlayableService*)this, evUpdatedInfo);
628 RESULT eDVBServicePlay::start()
631 eDebug("starting DVB service");
632 r = m_service_handler.tune((eServiceReferenceDVB&)m_reference);
633 eDebug("tune result: %d", r);
634 m_event(this, evStart);
638 RESULT eDVBServicePlay::stop()
640 eDebug("stopping..");
644 RESULT eDVBServicePlay::connectEvent(const Slot2<void,iPlayableService*,int> &event, ePtr<eConnection> &connection)
646 connection = new eConnection((iPlayableService*)this, m_event.connect(event));
650 RESULT eDVBServicePlay::pause(ePtr<iPauseableService> &ptr)
662 RESULT eDVBServicePlay::setSlowMotion(int ratio)
665 return m_decoder->setSlowMotion(ratio);
670 RESULT eDVBServicePlay::setFastForward(int ratio)
673 return m_decoder->setFastForward(ratio);
678 RESULT eDVBServicePlay::seek(ePtr<iSeekableService> &ptr)
690 RESULT eDVBServicePlay::getLength(pts_t &len)
692 ePtr<iDVBPVRChannel> pvr_channel;
694 if (m_service_handler.getPVRChannel(pvr_channel))
696 eDebug("getPVRChannel failed!");
700 return pvr_channel->getLength(len);
703 RESULT eDVBServicePlay::pause()
705 if (!m_is_paused && m_decoder)
708 return m_decoder->freeze(0);
713 RESULT eDVBServicePlay::unpause()
715 if (m_is_paused && m_decoder)
718 return m_decoder->unfreeze();
723 RESULT eDVBServicePlay::seekTo(pts_t to)
725 eDebug("eDVBServicePlay::seekTo: jump %lld", to);
727 ePtr<iDVBPVRChannel> pvr_channel;
729 if (m_service_handler.getPVRChannel(pvr_channel))
732 ePtr<iDVBDemux> demux;
733 m_service_handler.getDemux(demux);
737 return pvr_channel->seekTo(demux, 0, to);
740 RESULT eDVBServicePlay::seekRelative(int direction, pts_t to)
742 eDebug("eDVBServicePlay::seekRelative: jump %d, %lld", direction, to);
744 ePtr<iDVBPVRChannel> pvr_channel;
746 if (m_service_handler.getPVRChannel(pvr_channel))
751 ePtr<iDVBDemux> demux;
752 m_service_handler.getDemux(demux);
756 return pvr_channel->seekTo(demux, 1, to);
759 RESULT eDVBServicePlay::getPlayPosition(pts_t &pos)
761 ePtr<iDVBPVRChannel> pvr_channel;
763 if (m_service_handler.getPVRChannel(pvr_channel))
766 ePtr<iDVBDemux> demux;
767 m_service_handler.getDemux(demux);
771 return pvr_channel->getCurrentPosition(demux, pos, 1);
774 RESULT eDVBServicePlay::setTrickmode(int trick)
777 m_decoder->setTrickmode(trick);
781 RESULT eDVBServicePlay::frontendStatusInfo(ePtr<iFrontendStatusInformation> &ptr)
787 RESULT eDVBServicePlay::info(ePtr<iServiceInformation> &ptr)
793 RESULT eDVBServicePlay::audioTracks(ePtr<iAudioTrackSelection> &ptr)
799 RESULT eDVBServicePlay::subServices(ePtr<iSubserviceList> &ptr)
805 RESULT eDVBServicePlay::timeshift(ePtr<iTimeshiftService> &ptr)
807 if (m_timeshift_enabled || !m_is_pvr)
816 RESULT eDVBServicePlay::getName(std::string &name)
820 m_dvb_service->getName(m_reference, name);
824 else if (!m_reference.name.empty())
825 eStaticServiceDVBInformation().getName(m_reference, name);
827 name = "DVB service";
831 RESULT eDVBServicePlay::getEvent(ePtr<eServiceEvent> &evt, int nownext)
833 return m_event_handler.getEvent(evt, nownext);
836 int eDVBServicePlay::getInfo(int w)
838 eDVBServicePMTHandler::program program;
840 if (m_service_handler.getProgramInfo(program))
846 if (!program.videoStreams.empty() && program.videoStreams[0].component_tag != -1)
848 ePtr<eServiceEvent> evt;
849 if (!m_event_handler.getEvent(evt, 0))
851 ePtr<eComponentData> data;
852 if (!evt->getComponentData(data, program.videoStreams[0].component_tag))
854 if ( data->getStreamContent() == 1 )
856 switch(data->getComponentType())
859 case 1: // 4:3 SD PAL
861 case 3: // 16:9 SD PAL
862 case 4: // > 16:9 PAL
863 case 5: // 4:3 SD NTSC
865 case 7: // 16:9 SD NTSC
866 case 8: // > 16:9 NTSC
869 case 9: // 4:3 HD PAL
871 case 0xB: // 16:9 HD PAL
872 case 0xC: // > 16:9 HD PAL
873 case 0xD: // 4:3 HD NTSC
875 case 0xF: // 16:9 HD NTSC
876 case 0x10: // > 16:9 HD PAL
877 return data->getComponentType();
884 case sIsCrypted: return program.isCrypted;
885 case sVideoPID: if (program.videoStreams.empty()) return -1; return program.videoStreams[0].pid;
886 case sAudioPID: if (program.audioStreams.empty()) return -1; return program.audioStreams[m_current_audio_stream].pid;
887 case sPCRPID: return program.pcrPid;
888 case sPMTPID: return program.pmtPid;
889 case sTXTPID: return -1;
890 case sSID: return ((const eServiceReferenceDVB&)m_reference).getServiceID().get();
891 case sONID: return ((const eServiceReferenceDVB&)m_reference).getOriginalNetworkID().get();
892 case sTSID: return ((const eServiceReferenceDVB&)m_reference).getTransportStreamID().get();
893 case sNamespace: return ((const eServiceReferenceDVB&)m_reference).getDVBNamespace().get();
894 case sProvider: if (!m_dvb_service) return -1; return -2;
900 std::string eDVBServicePlay::getInfoString(int w)
905 if (!m_dvb_service) return "";
906 return m_dvb_service->m_provider_name;
912 int eDVBServicePlay::getNumberOfTracks()
914 eDVBServicePMTHandler::program program;
915 if (m_service_handler.getProgramInfo(program))
917 return program.audioStreams.size();
920 RESULT eDVBServicePlay::selectTrack(unsigned int i)
922 int ret = selectAudioStream(i);
924 if (m_decoder->start())
930 RESULT eDVBServicePlay::getTrackInfo(struct iAudioTrackInfo &info, unsigned int i)
932 eDVBServicePMTHandler::program program;
934 if (m_service_handler.getProgramInfo(program))
937 if (i >= program.audioStreams.size())
940 if (program.audioStreams[i].type == eDVBServicePMTHandler::audioStream::atMPEG)
941 info.m_description = "MPEG";
942 else if (program.audioStreams[i].type == eDVBServicePMTHandler::audioStream::atAC3)
943 info.m_description = "AC3";
944 else if (program.audioStreams[i].type == eDVBServicePMTHandler::audioStream::atDTS)
945 info.m_description = "DTS";
947 info.m_description = "???";
949 if (program.audioStreams[i].component_tag != -1)
951 ePtr<eServiceEvent> evt;
952 if (!m_event_handler.getEvent(evt, 0))
954 ePtr<eComponentData> data;
955 if (!evt->getComponentData(data, program.audioStreams[i].component_tag))
956 info.m_language = data->getText();
960 if (info.m_language.empty())
961 info.m_language = program.audioStreams[i].language_code;
966 int eDVBServicePlay::selectAudioStream(int i)
968 eDVBServicePMTHandler::program program;
970 if (m_service_handler.getProgramInfo(program))
973 if ((unsigned int)i >= program.audioStreams.size())
979 if (m_decoder->setAudioPID(program.audioStreams[i].pid, program.audioStreams[i].type))
982 m_current_audio_stream = i;
987 int eDVBServicePlay::getFrontendInfo(int w)
991 eUsePtr<iDVBChannel> channel;
992 if(m_service_handler.getChannel(channel))
994 ePtr<iDVBFrontend> fe;
995 if(channel->getFrontend(fe))
997 return fe->readFrontendData(w);
1000 int eDVBServicePlay::getNumberOfSubservices()
1002 ePtr<eServiceEvent> evt;
1003 if (!m_event_handler.getEvent(evt, 0))
1004 return evt->getNumOfLinkageServices();
1008 RESULT eDVBServicePlay::getSubservice(eServiceReference &sub, unsigned int n)
1010 ePtr<eServiceEvent> evt;
1011 if (!m_event_handler.getEvent(evt, 0))
1013 if (!evt->getLinkageService(sub, n))
1015 eServiceReferenceDVB &subservice = (eServiceReferenceDVB&) sub;
1016 eServiceReferenceDVB ¤t = (eServiceReferenceDVB&) m_reference;
1017 subservice.setDVBNamespace(current.getDVBNamespace());
1018 if ( current.getParentTransportStreamID().get() )
1020 subservice.setParentTransportStreamID( current.getParentTransportStreamID() );
1021 subservice.setParentServiceID( current.getParentServiceID() );
1025 subservice.setParentTransportStreamID( current.getTransportStreamID() );
1026 subservice.setParentServiceID( current.getServiceID() );
1028 if ( subservice.getParentTransportStreamID() == subservice.getTransportStreamID() &&
1029 subservice.getParentServiceID() == subservice.getServiceID() )
1031 subservice.setParentTransportStreamID( eTransportStreamID(0) );
1032 subservice.setParentServiceID( eServiceID(0) );
1037 sub.type=eServiceReference::idInvalid;
1041 RESULT eDVBServicePlay::startTimeshift()
1043 if (m_timeshift_enabled)
1045 eDebug("TIMESHIFT - start!");
1049 RESULT eDVBServicePlay::stopTimeshift()
1051 if (!m_timeshift_enabled)
1053 m_timeshift_enabled = 0;
1054 eDebug("timeshift disabled");
1058 DEFINE_REF(eDVBServicePlay)
1060 eAutoInitPtr<eServiceFactoryDVB> init_eServiceFactoryDVB(eAutoInitNumbers::service+1, "eServiceFactoryDVB");