public:
enum cacheID
{
- cVPID, cAPID, cTPID, cPCRPID, cAC3PID,
+ cVPID, cMPEGAPID, cTPID, cPCRPID, cAC3PID,
cVTYPE, cACHANNEL, cAC3DELAY, cPCMDELAY,
- cSUBTITLE, cacheMax
+ cSUBTITLE, cAACHEAPID=12, cDDPPID, cAACAPID, cacheMax
};
int getCacheEntry(cacheID);
{
ePtr<eTable<ProgramMapSection> > ptr;
int cached_apid_ac3 = -1;
+ int cached_apid_ddp = -1;
int cached_apid_mpeg = -1;
+ int cached_apid_aache = -1;
+ int cached_apid_aac = -1;
int cached_vpid = -1;
int cached_tpid = -1;
int ret = -1;
if ( m_service && !m_service->cacheEmpty() )
{
cached_vpid = m_service->getCacheEntry(eDVBService::cVPID);
- cached_apid_mpeg = m_service->getCacheEntry(eDVBService::cAPID);
+ cached_apid_mpeg = m_service->getCacheEntry(eDVBService::cMPEGAPID);
cached_apid_ac3 = m_service->getCacheEntry(eDVBService::cAC3PID);
+ cached_apid_ddp = m_service->getCacheEntry(eDVBService::cDDPPID);
+ cached_apid_aache = m_service->getCacheEntry(eDVBService::cAACHEAPID);
+ cached_apid_aac = m_service->getCacheEntry(eDVBService::cAACAPID);
cached_tpid = m_service->getCacheEntry(eDVBService::cTPID);
}
audio.pid = (*es)->getPid();
/* if we find the cached pids, this will be our default stream */
- if (audio.pid == cached_apid_ac3 || audio.pid == cached_apid_mpeg)
+ if (audio.pid == cached_apid_ac3 || audio.pid == cached_apid_ddp || audio.pid == cached_apid_mpeg || audio.pid == cached_apid_aache || audio.pid == cached_apid_aac)
program.defaultAudioStream = program.audioStreams.size();
/* also, we need to know the first non-mpeg (i.e. "ac3"/dts/...) stream */
- if ((audio.type != audioStream::atMPEG) && ((first_ac3 == -1) || (audio.pid == cached_apid_ac3)))
+ if ((audio.type != audioStream::atMPEG) && ((first_ac3 == -1) || (audio.pid == cached_apid_ac3) || (audio.pid == cached_apid_ddp)))
first_ac3 = program.audioStreams.size();
program.audioStreams.push_back(audio);
program.audioStreams.push_back(s);
++cnt;
}
+ if ( cached_apid_ddp != -1 )
+ {
+ audioStream s;
+ s.type = audioStream::atDDP;
+ s.pid = cached_apid_ddp;
+ s.rdsPid = -1;
+ program.audioStreams.push_back(s);
+ ++cnt;
+ }
+ if ( cached_apid_aache != -1 )
+ {
+ audioStream s;
+ s.type = audioStream::atAACHE;
+ s.pid = cached_apid_aache;
+ s.rdsPid = -1;
+ program.audioStreams.push_back(s);
+ ++cnt;
+ }
+ if ( cached_apid_aac != -1 )
+ {
+ audioStream s;
+ s.type = audioStream::atAAC;
+ s.pid = cached_apid_aac;
+ s.rdsPid = -1;
+ program.audioStreams.push_back(s);
+ ++cnt;
+ }
if ( cached_apid_mpeg != -1 )
{
audioStream s;
case sAudioPID:
if (m_dvb_service)
{
- int apid = m_dvb_service->getCacheEntry(eDVBService::cAPID);
+ int apid = m_dvb_service->getCacheEntry(eDVBService::cMPEGAPID);
if (apid != -1)
return apid;
apid = m_dvb_service->getCacheEntry(eDVBService::cAC3PID);
if (apid != -1)
return apid;
+ apid = m_dvb_service->getCacheEntry(eDVBService::cDDPPID);
+ if (apid != -1)
+ return apid;
+ apid = m_dvb_service->getCacheEntry(eDVBService::cAACHEAPID);
+ if (apid != -1)
+ return apid;
+ apid = m_dvb_service->getCacheEntry(eDVBService::cAACAPID);
+ if (apid != -1)
+ return apid;
}
if (no_program_info) return -1; if (program.audioStreams.empty()) return -1; return program.audioStreams[0].pid;
case sPCRPID:
case the real default is not yet available.)
*/
if (m_dvb_service && ((i != -1)
- || ((m_dvb_service->getCacheEntry(eDVBService::cAPID) == -1) && (m_dvb_service->getCacheEntry(eDVBService::cAC3PID)==-1))))
- {
- if (apidtype == eDVBAudio::aMPEG)
- {
- m_dvb_service->setCacheEntry(eDVBService::cAPID, apid);
- m_dvb_service->setCacheEntry(eDVBService::cAC3PID, -1);
- }
- else if (apidtype == eDVBAudio::aAC3)
- {
- m_dvb_service->setCacheEntry(eDVBService::cAPID, -1);
- m_dvb_service->setCacheEntry(eDVBService::cAC3PID, apid);
- }
- else
- {
- m_dvb_service->setCacheEntry(eDVBService::cAPID, -1);
- m_dvb_service->setCacheEntry(eDVBService::cAC3PID, -1);
- }
+ || ((m_dvb_service->getCacheEntry(eDVBService::cMPEGAPID) == -1)
+ && (m_dvb_service->getCacheEntry(eDVBService::cAC3PID)==-1)
+ && (m_dvb_service->getCacheEntry(eDVBService::cDDPPID)==-1)
+ && (m_dvb_service->getCacheEntry(eDVBService::cAACHEAPID)==-1)
+ && (m_dvb_service->getCacheEntry(eDVBService::cAACAPID)==-1))))
+ {
+ m_dvb_service->setCacheEntry(eDVBService::cMPEGAPID, apidtype == eDVBAudio::aMPEG ? apid : -1);
+ m_dvb_service->setCacheEntry(eDVBService::cAC3PID, apidtype == eDVBAudio::aAC3 ? apid : -1);
+ m_dvb_service->setCacheEntry(eDVBService::cDDPPID, apidtype == eDVBAudio::aDDP ? apid : -1);
+ m_dvb_service->setCacheEntry(eDVBService::cAACHEAPID, apidtype == eDVBAudio::aAACHE ? apid : -1);
+ m_dvb_service->setCacheEntry(eDVBService::cAACAPID, apidtype == eDVBAudio::aAAC ? apid : -1);
}
h.resetCachedProgram();