pmt handling: untested (as usual) AC3 support
[enigma2.git] / lib / dvb / pmt.cpp
index 54d189f..c0c65b2 100644 (file)
@@ -5,6 +5,7 @@
 #include <lib/dvb/metaparser.h>
 #include <lib/dvb_ci/dvbci.h>
 #include <dvbsi++/ca_program_map_section.h>
+#include <dvbsi++/descriptor_tag.h>
 
 eDVBServicePMTHandler::eDVBServicePMTHandler(int record)
        :m_ca_servicePtr(0)
@@ -157,6 +158,21 @@ int eDVBServicePMTHandler::getProgramInfo(struct program &program)
                                        isaudio = 1;
                                        audio.type = audioStream::atMPEG;
                                        break;
+                               case 0x06: // PES Private
+                                               /* PES private can contain AC-3, DTS or lots of other stuff.
+                                                  check descriptors to get the exact type. */
+                                       for (DescriptorConstIterator desc = (*es)->getDescriptors()->begin();
+                                                       desc != (*es)->getDescriptors()->end(); ++desc)
+                                       {
+                                               switch ((*desc)->getTag())
+                                               {
+                                               case AC3_DESCRIPTOR:
+                                                       isaudio = 1;
+                                                       audio.type = audioStream::atAC3;
+                                                       break;
+                                               }
+                                       }
+                                       break;
                                }
                                if (isaudio)
                                        program.audioStreams.push_back(audio);