diff options
author | Jochen Dolze <vdr@dolze.de> | 2009-09-29 20:53:24 +0200 |
---|---|---|
committer | Jochen Dolze <vdr@dolze.de> | 2009-09-29 20:53:24 +0200 |
commit | a21c3bf58621446068b054326eec83dae1e744a0 (patch) | |
tree | b6be210abd89ba287fb4865ed8f6d949ff758cd5 /markad-standalone.cpp | |
parent | 4c6855588f9d061779681c73db2d03adaa96ad27 (diff) | |
download | vdr-plugin-markad-a21c3bf58621446068b054326eec83dae1e744a0.tar.gz vdr-plugin-markad-a21c3bf58621446068b054326eec83dae1e744a0.tar.bz2 |
Added patch from ebsi
Added ES Descriptor handling in standalone version
Diffstat (limited to 'markad-standalone.cpp')
-rw-r--r-- | markad-standalone.cpp | 35 |
1 files changed, 26 insertions, 9 deletions
diff --git a/markad-standalone.cpp b/markad-standalone.cpp index 902ca1c..e6d1b20 100644 --- a/markad-standalone.cpp +++ b/markad-standalone.cpp @@ -287,9 +287,16 @@ void cMarkAdStandalone::CheckPATPMT(const char *Directory) int i=205+desc_len; + while (i<section_end) { + struct ES_DESCRIPTOR *es=NULL; struct STREAMINFO *si = (struct STREAMINFO *) &patpmt[i]; + int esinfo_len=(si->ES_info_length_H<<8)+si->ES_info_length_L; + if (esinfo_len) + { + es = (struct ES_DESCRIPTOR *) &patpmt[i+sizeof(struct STREAMINFO)]; + } // oh no -> more checks! if (si->reserved1!=7) return; @@ -302,26 +309,35 @@ void cMarkAdStandalone::CheckPATPMT(const char *Directory) case 0x1: case 0x2: macontext.General.VPid.Type=MARKAD_PIDTYPE_VIDEO_H262; - macontext.General.VPid.Num=pid; + // just use the first pid + if (!macontext.General.VPid.Num) macontext.General.VPid.Num=pid; break; case 0x3: case 0x4: - macontext.General.APid.Num=pid; + // just use the first pid + if (!macontext.General.APid.Num) macontext.General.APid.Num=pid; + break; case 0x6: - macontext.General.DPid.Num=pid; + if (es) + { + if (es->Descriptor_Tag==0x6A) macontext.General.DPid.Num=pid; + } + else + { + macontext.General.DPid.Num=pid; + } break; case 0x1b: macontext.General.VPid.Type=MARKAD_PIDTYPE_VIDEO_H264; - macontext.General.VPid.Num=pid; macontext.General.H264=true; + // just use the first pid + if (!macontext.General.VPid.Num) macontext.General.VPid.Num=pid; break; } - int esinfo_len=(si->ES_info_length_H<<8)+si->ES_info_length_L; - i+=(sizeof(struct STREAMINFO)+esinfo_len); } @@ -363,7 +379,8 @@ cMarkAdStandalone::cMarkAdStandalone(const char *Directory) if (macontext.General.VPid.Num) { - dsyslog("markad [%i]: using %s-video",recvnumber,macontext.General.H264 ? "H264": "H262"); + dsyslog("markad [%i]: using %s-video (0x%04x)",recvnumber,macontext.General.H264 ? "H264": "H262", + macontext.General.VPid.Num); video_demux = new cMarkAdDemux(recvnumber); } else @@ -373,7 +390,7 @@ cMarkAdStandalone::cMarkAdStandalone(const char *Directory) if (macontext.General.APid.Num) { - dsyslog("markad [%i]: using mp2",recvnumber); + dsyslog("markad [%i]: using mp2 (0x%04x)",recvnumber,macontext.General.APid.Num); mp2_demux = new cMarkAdDemux(recvnumber); } else @@ -383,7 +400,7 @@ cMarkAdStandalone::cMarkAdStandalone(const char *Directory) if (macontext.General.DPid.Num) { - dsyslog("markad [%i]: using ac3",recvnumber); + dsyslog("markad [%i]: using ac3 (0x%04x)",recvnumber,macontext.General.DPid.Num); ac3_demux = new cMarkAdDemux(recvnumber); } else |