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 | |
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
-rw-r--r-- | markad-standalone.cpp | 35 | ||||
-rw-r--r-- | markad-standalone.h | 10 | ||||
-rw-r--r-- | recv.cpp | 8 |
3 files changed, 39 insertions, 14 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 diff --git a/markad-standalone.h b/markad-standalone.h index e6693b6..b1dc0ce 100644 --- a/markad-standalone.h +++ b/markad-standalone.h @@ -131,9 +131,17 @@ unsigned reserved2: 4; unsigned ES_info_length_L: 8; - }; +}; #pragma pack() +struct ES_DESCRIPTOR { +unsigned Descriptor_Tag: + 8; +unsigned Descriptor_Length: + 8; +}; + + cMarkAdDemux *video_demux; cMarkAdDemux *ac3_demux; cMarkAdDemux *mp2_demux; @@ -24,13 +24,13 @@ cMarkAdReceiver::cMarkAdReceiver(int RecvNumber, const char *Filename, cTimer *T buffer.SetTimeouts(0, 10); bool useH264=false; -#if APIVERSNUM >= 10700 && APIVERSNUM < 10702 +#if APIVERSNUM >= 10700 +#ifdef DVBFE_DELSYS_DVBS2 if (Timer->Channel()->System()==DVBFE_DELSYS_DVBS2) useH264=true; -#endif - -#if APIVERSNUM >= 10702 +#else if (Timer->Channel()->System()==SYS_DVBS2) useH264=true; #endif +#endif memset(&macontext,0,sizeof(macontext)); if (Timer->Event()) { |