#include <lib/gui/esubtitle.h>
#include <sys/vfs.h>
+#include <sys/stat.h>
#include <byteswap.h>
#include <netinet/in.h>
eServiceCenter::getPrivInstance(sc);
if (sc)
sc->addServiceFactory(eServiceFactoryDVB::id, this);
+
+ m_StaticServiceDVBInfo = new eStaticServiceDVBInformation;
+ m_StaticServiceDVBBouquetInfo = new eStaticServiceDVBBouquetInformation;
}
eServiceFactoryDVB::~eServiceFactoryDVB()
// useable format options are
// R = Service Reference (as swig object .. this is very slow)
// S = Service Reference (as python string object .. same as ref.toString())
+// C = Service Reference (as python string object .. same as ref.toCompareString())
// N = Service Name (as python string object)
// when exactly one return value per service is selected in the format string,
// then each value is directly a list entry
case 'R': // service reference (swig)object
tmp = New_eServiceReference(ref);
break;
+ case 'C': // service reference compare string
+ tmp = PyString_FromString(ref.toCompareString().c_str());
+ break;
case 'S': // service reference string
tmp = PyString_FromString(ref.toString().c_str());
break;
if ((ref.flags & eServiceReference::flagDirectory) == eServiceReference::flagDirectory) // bouquet
{
if ( !ref.name.empty() ) // satellites or providers list
- ptr = new eStaticServiceDVBInformation;
+ ptr = m_StaticServiceDVBInfo;
else // a dvb bouquet
- ptr = new eStaticServiceDVBBouquetInformation;
+ ptr = m_StaticServiceDVBBouquetInfo;
}
else if (!ref.path.empty()) /* do we have a PVR service? */
ptr = new eStaticServiceDVBPVRInformation(ref);
{
ePtr<eDVBService> service;
if (lookupService(service, ref)) // no eDVBService avail for this reference ( Linkage Services... )
- ptr = new eStaticServiceDVBInformation;
+ ptr = m_StaticServiceDVBInfo;
else
/* eDVBService has the iStaticServiceInformation interface, so we pass it here. */
ptr = service;
m_service_handler.free();
if (m_is_pvr && m_cuesheet_changed)
- saveCuesheet();
+ {
+ struct stat s;
+ /* save cuesheet only when main file is accessible. */
+ if (!::stat(m_reference.path.c_str(), &s))
+ saveCuesheet();
+ }
return 0;
}
case sIsCrypted: return program.isCrypted();
case sVideoPID: if (program.videoStreams.empty()) return -1; return program.videoStreams[0].pid;
case sVideoType: if (program.videoStreams.empty()) return -1; return program.videoStreams[0].type;
- case sAudioPID: if (program.audioStreams.empty()) return -1; return program.audioStreams[m_current_audio_stream].pid;
+ case sAudioPID: if (program.audioStreams.empty()) return -1; return program.audioStreams[0].pid;
case sPCRPID: return program.pcrPid;
case sPMTPID: return program.pmtPid;
case sTXTPID: return program.textPid;
}
}
- m_current_audio_stream = i;
-
return 0;
}
m_decoder->setPCMDelay(pcm_delay == -1 ? 0 : pcm_delay);
m_decoder->setVideoPID(vpid, vpidtype);
- m_current_audio_stream = 0;
m_decoder->setAudioPID(apid, apidtype);
if (!(m_is_pvr || m_timeshift_active || !m_is_primary))
{
m_decoder->setSyncPCR(pcrpid);
- if (apid != 1)
+ if (apid != -1)
{
ePtr<iDVBDemux> data_demux;
- if (h.getDataDemux(data_demux))
+ if (!h.getDataDemux(data_demux))
{
m_radiotext_parser = new eDVBRadioTextParser(data_demux);
m_radiotext_parser->connectUpdatedRadiotext(slot(*this, &eDVBServicePlay::radioTextUpdated), m_radiotext_updated_connection);
+ m_radiotext_parser->start(apid);
}
}
}
if (m_teletext_parser)
m_teletext_parser->start(tpid);
- if (m_radiotext_parser)
- m_radiotext_parser->start(apid);
-
if (!m_is_primary)
m_decoder->setTrickmode(1);