remove unneeded caching of caids, use an array for pidcache instead of std::map ...
[enigma2.git] / lib / dvb / pmt.cpp
index 4af18020b7e47a055929094e5edc3668f458036c..11cda12593a991dea742de32285ef228d00b4502 100644 (file)
@@ -250,9 +250,12 @@ int eDVBServicePMTHandler::getProgramInfo(struct program &program)
 
                                video.pid = (*es)->getPid();
                                audio.pid = (*es)->getPid();
+                               video.type = videoStream::vtMPEG2;
 
                                switch ((*es)->getType())
                                {
+                               case 0x1b: // AVC Video Stream (MPEG4 H264)
+                                       video.type = videoStream::vtMPEG4_H264;
                                case 0x01: // MPEG 1 video
                                case 0x02: // MPEG 2 video
                                        isvideo = 1;
@@ -277,6 +280,13 @@ int eDVBServicePMTHandler::getProgramInfo(struct program &program)
                                                        if ( program.textPid == -1 || (*es)->getPid() == cached_tpid )
                                                                program.textPid = (*es)->getPid();
                                                        break;
+                                               case DTS_DESCRIPTOR:
+                                                       if (!isvideo)
+                                                       {
+                                                               isaudio = 1;
+                                                               audio.type = audioStream::atDTS;
+                                                       }
+                                                       break;
                                                case AC3_DESCRIPTOR:
                                                        if (!isvideo)
                                                        {
@@ -354,11 +364,15 @@ int eDVBServicePMTHandler::getProgramInfo(struct program &program)
                        apid_mpeg = m_service->getCachePID(eDVBService::cAPID),
                        pcrpid = m_service->getCachePID(eDVBService::cPCRPID),
                        tpid = m_service->getCachePID(eDVBService::cTPID),
+                       vpidtype = m_service->getCachePID(eDVBService::cVTYPE),
                        cnt=0;
+               if ( vpidtype == -1 )
+                       vpidtype = videoStream::vtMPEG2;
                if ( vpid != -1 )
                {
                        videoStream s;
                        s.pid = vpid;
+                       s.type = vpidtype;
                        program.videoStreams.push_back(s);
                        ++cnt;
                }