summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschon <schon@dev03-server>2011-05-25 08:02:19 (GMT)
committerschon <schon@dev03-server>2011-05-25 08:02:19 (GMT)
commit4ae269c577d60885f9bbb5ba10382e56c160171f (patch)
treeaed72e0e5f1eca55de1ac935b48181504975271a
parentb72c9852440926ac82fd4ca3186278edd7167427 (diff)
add support for DDP
-rw-r--r--lib/dvb/decoder.cpp4
-rw-r--r--lib/dvb/decoder.h2
-rw-r--r--lib/dvb/pmt.cpp30
-rw-r--r--lib/dvb/pmt.h2
-rw-r--r--lib/service/servicedvb.cpp2
5 files changed, 34 insertions, 6 deletions
diff --git a/lib/dvb/decoder.cpp b/lib/dvb/decoder.cpp
index a89f72b..97cb99d 100644
--- a/lib/dvb/decoder.cpp
+++ b/lib/dvb/decoder.cpp
@@ -206,6 +206,10 @@ int eDVBAudio::startPid(int pid, int type)
case aDTSHD:
bypass = 0x10;
break;
+ case aDDP:
+ bypass = 0x22;
+ break;
+
}
eDebugNoNewLine("AUDIO_SET_BYPASS(%d) - ", bypass);
diff --git a/lib/dvb/decoder.h b/lib/dvb/decoder.h
index 7610b65..ed8b6c7 100644
--- a/lib/dvb/decoder.h
+++ b/lib/dvb/decoder.h
@@ -13,7 +13,7 @@ private:
ePtr<eDVBDemux> m_demux;
int m_fd, m_fd_demux, m_dev, m_is_freezed;
public:
- enum { aMPEG, aAC3, aDTS, aAAC, aAACHE, aLPCM, aDTSHD };
+ enum { aMPEG, aAC3, aDTS, aAAC, aAACHE, aLPCM, aDTSHD, aDDP };
eDVBAudio(eDVBDemux *demux, int dev);
enum { aMonoLeft, aStereo, aMonoRight };
void setChannel(int channel);
diff --git a/lib/dvb/pmt.cpp b/lib/dvb/pmt.cpp
index e5e6331..f49035e 100644
--- a/lib/dvb/pmt.cpp
+++ b/lib/dvb/pmt.cpp
@@ -470,10 +470,32 @@ 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);
+ eDebug("ac->getAc3TypeFlag() : 0x%x", ac->getAc3TypeFlag());
+
+ isaudio = 1;
+ audio.type = audioStream::atAC3;
+
+ if(ac->getAc3TypeFlag())
+ {
+
+ uint8_t ac3type = ac->getAc3Type();
+ eDebug("ac->getAc3Type() : 0x%x", 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);
diff --git a/lib/dvb/pmt.h b/lib/dvb/pmt.h
index 0c44f35..4be8000 100644
--- a/lib/dvb/pmt.h
+++ b/lib/dvb/pmt.h
@@ -145,7 +145,7 @@ public:
{
int pid,
rdsPid; // hack for some radio services which transmit radiotext on different pid (i.e. harmony fm, HIT RADIO FFH, ...)
- enum { atMPEG, atAC3, atDTS, atAAC, atAACHE, atLPCM, atDTSHD };
+ enum { atMPEG, atAC3, atDTS, atAAC, atAACHE, atLPCM, atDTSHD, atDDP };
int type; // mpeg2, ac3, dts, ...
int component_tag;
diff --git a/lib/service/servicedvb.cpp b/lib/service/servicedvb.cpp
index 52eefa7..383b38e 100644
--- a/lib/service/servicedvb.cpp
+++ b/lib/service/servicedvb.cpp
@@ -1795,6 +1795,8 @@ RESULT eDVBServicePlay::getTrackInfo(struct iAudioTrackInfo &info, unsigned int
info.m_description = "MPEG";
else if (program.audioStreams[i].type == eDVBServicePMTHandler::audioStream::atAC3)
info.m_description = "Dolby Digital";
+ else if (program.audioStreams[i].type == eDVBServicePMTHandler::audioStream::atDDP)
+ info.m_description = "Dolby Digital+";
else if (program.audioStreams[i].type == eDVBServicePMTHandler::audioStream::atAAC)
info.m_description = "AAC";
else if (program.audioStreams[i].type == eDVBServicePMTHandler::audioStream::atAACHE)