X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=blobdiff_plain;f=lib%2Fdvb%2Fpmt.cpp;h=6efea3686b3c691e13aff7846520cfb83831ccb1;hp=e5e633160c82458480b0e10d3b5f718359a43ad1;hb=7ca8a9335e44c5e15cfb8f3c6c71168cce8d7892;hpb=31ac4a233ddcb341e49f63f964d4d35fd2097a9c diff --git a/lib/dvb/pmt.cpp b/lib/dvb/pmt.cpp index e5e6331..6efea36 100644 --- a/lib/dvb/pmt.cpp +++ b/lib/dvb/pmt.cpp @@ -18,6 +18,7 @@ #include #include #include +#include eDVBServicePMTHandler::eDVBServicePMTHandler() :m_ca_servicePtr(0), m_dvb_scan(0), m_decode_demux_num(0xFF), m_no_pat_entry_delay(eTimer::create()) @@ -470,10 +471,30 @@ int eDVBServicePMTHandler::getProgramInfo(program &program) isaudio = 1; audio.type = audioStream::atAACHE; // MPEG4-AAC break; - case AC3_DESCRIPTOR: - isaudio = 1; - audio.type = audioStream::atAC3; - break; + case AC3_DESCRIPTOR: + { + Ac3Descriptor *ac = (Ac3Descriptor*)(*desc); + + isaudio = 1; + audio.type = audioStream::atAC3; + + if(ac->getAc3TypeFlag()) + { + + uint8_t ac3type = ac->getAc3Type(); + if( ( ac3type & 0x80 ) && ( (ac3type<<5) == 0xA0 || (ac3type<<5) == 0xC0) ) // From EN-300 468 v1.7.1 Table D.1 + audio.type = audioStream::atDDP; + } + + break; + } + case ENHANCED_AC3_DESCRIPTOR: + eDebug("ENHANCED_AC3_DESCRIPTOR"); + isaudio = 1; + audio.type = audioStream::atDDP; + break; + + case REGISTRATION_DESCRIPTOR: /* some services don't have a separate AC3 descriptor */ { RegistrationDescriptor *d = (RegistrationDescriptor*)(*desc);