LinuxTV Patchwork Bug in pat.c (VDR 1.7.27) - possible fix attached

login
register
mail settings
Submitter Klaus Schmidinger
Date April 9, 2012, 3:57 p.m.
Message ID <4F8306E0.3090108@tvdr.de>
Download mbox | patch
Permalink /patch/12941/
State New
Headers show

Comments

Klaus Schmidinger - April 9, 2012, 3:57 p.m.
On 09.04.2012 17:49, Patrick Boettcher wrote:
> On Monday 09 April 2012 13:39:36 Dominic Evans wrote:
>> On 9 April 2012 10:40, Klaus Schmidinger<Klaus.Schmidinger@tvdr.de>
> wrote:
>>> +                          //
>>> http://www.smpte-ra.org/mpegreg/mpegreg.html +
>>>   ...
>>> +                          case 0x44434949: // STREAMTYPE_USER_PRIVATE
>>> - DigiCipher II VIDEO (ANSI/SCTE 57)
>>>
>>> There is no entry for 44-43-49-49 on the given page.
>
> It wasn't me who added this stream-type check, I just re-applied the checks
> how they were done before.

No big deal, I was just wondering.

I have adopted your patch in the attached form.
Maybe you (and/or Rolf) would like to verify it.

Klaus
Patrick Boettcher - April 9, 2012, 4:23 p.m.
On Monday 09 April 2012 17:57:20 Klaus Schmidinger wrote:
> On 09.04.2012 17:49, Patrick Boettcher wrote:
> > On Monday 09 April 2012 13:39:36 Dominic Evans wrote:
> >> On 9 April 2012 10:40, Klaus Schmidinger<Klaus.Schmidinger@tvdr.de>
> > 
> > wrote:
> >>> +                          //
> >>> http://www.smpte-ra.org/mpegreg/mpegreg.html +
> >>> 
> >>>   ...
> >>> 
> >>> +                          case 0x44434949: //
> >>> STREAMTYPE_USER_PRIVATE - DigiCipher II VIDEO (ANSI/SCTE 57)
> >>> 
> >>> There is no entry for 44-43-49-49 on the given page.
> > 
> > It wasn't me who added this stream-type check, I just re-applied the
> > checks how they were done before.
> 
> No big deal, I was just wondering.
> 
> I have adopted your patch in the attached form.
> Maybe you (and/or Rolf) would like to verify it.

The patch looks good to me.

In the meantime Rolf contacted me saying that it be better to move this code 
to a plugin which digicipher users could use if they want (at least that's 
what I understood).

I think he will contact you. For the time being your patch should fix it.

Thanks.

--
Patrick
http://www.kernellabs.com/
dplu - April 9, 2012, 6:05 p.m.
Hi

A plugin why not but in our case, DVB-T in France, those channels are FTA 

The real question should be why broadcaster include this ? good question !!

The patch is reported as working and fixing PPID wrong value that's the most 
important

Thanks for this patch 

@+

Le lundi 09 avril 2012 18:23:58, Patrick Boettcher a écrit :
> On Monday 09 April 2012 17:57:20 Klaus Schmidinger wrote:
> > On 09.04.2012 17:49, Patrick Boettcher wrote:
> > > On Monday 09 April 2012 13:39:36 Dominic Evans wrote:
> > >> On 9 April 2012 10:40, Klaus Schmidinger<Klaus.Schmidinger@tvdr.de>
> > > 
> > > wrote:
> > >>> +                          //
> > >>> http://www.smpte-ra.org/mpegreg/mpegreg.html +
> > >>> 
> > >>>   ...
> > >>> 
> > >>> +                          case 0x44434949: //
> > >>> STREAMTYPE_USER_PRIVATE - DigiCipher II VIDEO (ANSI/SCTE 57)
> > >>> 
> > >>> There is no entry for 44-43-49-49 on the given page.
> > > 
> > > It wasn't me who added this stream-type check, I just re-applied the
> > > checks how they were done before.
> > 
> > No big deal, I was just wondering.
> > 
> > I have adopted your patch in the attached form.
> > Maybe you (and/or Rolf) would like to verify it.
> 
> The patch looks good to me.
> 
> In the meantime Rolf contacted me saying that it be better to move this
> code to a plugin which digicipher users could use if they want (at least
> that's what I understood).
> 
> I think he will contact you. For the time being your patch should fix it.
> 
> Thanks.
> 
> --
> Patrick
> http://www.kernellabs.com/
> 
> _______________________________________________
> vdr mailing list
> vdr@linuxtv.org
> http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
Klaus Schmidinger - April 9, 2012, 9:13 p.m.
On 09.04.2012 20:05, Dominique wrote:
> Hi
>
> A plugin why not but in our case, DVB-T in France, those channels are FTA
>
> The real question should be why broadcaster include this ? good question !!
>
> The patch is reported as working and fixing PPID wrong value that's the most
> important

Rolf Ahrenberg has informed me that this patch breaks things for North American
streams, so I'm going to revoke it again.

I wouldn't want to introduce a plugin interface for this, so unless there
is a way to tell these different versions apart from the data stream,
we'll need to introduce some way of making this selectable by the user.
Of course, a way of detecting them automatically would be preferable.

Klaus


> Le lundi 09 avril 2012 18:23:58, Patrick Boettcher a écrit :
>> On Monday 09 April 2012 17:57:20 Klaus Schmidinger wrote:
>>> On 09.04.2012 17:49, Patrick Boettcher wrote:
>>>> On Monday 09 April 2012 13:39:36 Dominic Evans wrote:
>>>>> On 9 April 2012 10:40, Klaus Schmidinger<Klaus.Schmidinger@tvdr.de>
>>>>
>>>> wrote:
>>>>>> +                          //
>>>>>> http://www.smpte-ra.org/mpegreg/mpegreg.html +
>>>>>>
>>>>>>    ...
>>>>>>
>>>>>> +                          case 0x44434949: //
>>>>>> STREAMTYPE_USER_PRIVATE - DigiCipher II VIDEO (ANSI/SCTE 57)
>>>>>>
>>>>>> There is no entry for 44-43-49-49 on the given page.
>>>>
>>>> It wasn't me who added this stream-type check, I just re-applied the
>>>> checks how they were done before.
>>>
>>> No big deal, I was just wondering.
>>>
>>> I have adopted your patch in the attached form.
>>> Maybe you (and/or Rolf) would like to verify it.
>>
>> The patch looks good to me.
>>
>> In the meantime Rolf contacted me saying that it be better to move this
>> code to a plugin which digicipher users could use if they want (at least
>> that's what I understood).
>>
>> I think he will contact you. For the time being your patch should fix it.
>>
>> Thanks.
>>
>> --
>> Patrick

Patch

--- pat.c	2012/03/02 10:56:45	2.17
+++ pat.c	2012/04/09 11:49:39	2.18
@@ -456,11 +456,28 @@ 
                          }
                       }
                       break;
-              case 0x80: // STREAMTYPE_USER_PRIVATE - DigiCipher II VIDEO (ANSI/SCTE 57)
-                      Vpid = esPid;
-                      Ppid = pmt.getPCRPid();
-                      Vtype = 0x02; // compression based upon MPEG-2
-                      ProcessCaDescriptors = true;
+              // see http://www.smpte-ra.org/mpegreg/mpegreg.html for the codes used below
+              case 0x80: { // STREAMTYPE_USER_PRIVATE - DigiCipher II VIDEO (ANSI/SCTE 57)
+                      SI::Descriptor *d;
+                      for (SI::Loop::Iterator it; (d = stream.streamDescriptors.getNext(it)); ) {
+                          switch (d->getDescriptorTag()) {
+                            case SI::RegistrationDescriptorTag: {
+                                 SI::RegistrationDescriptor *rd = (SI::RegistrationDescriptor *)d;
+                                 switch (rd->getFormatIdentifier()) {
+                                   case 0x44434949: // 'DCII' aka. DigiCipher II
+                                        Vpid = esPid;
+                                        Ppid = pmt.getPCRPid();
+                                        Vtype = 0x02; // compression based upon MPEG-2
+                                        ProcessCaDescriptors = true;
+                                        break;
+                                   default: ;
+                                   }
+                                 }
+                                 break;
+                            default: ;
+                            }
+                          }
+                      }
                       break;
               case 0x81: // STREAMTYPE_USER_PRIVATE - ATSC A/53 AUDIO (ANSI/SCTE 57)
                       {
@@ -495,7 +512,6 @@ 
                           switch (d->getDescriptorTag()) {
                             case SI::RegistrationDescriptorTag: {
                                  SI::RegistrationDescriptor *rd = (SI::RegistrationDescriptor *)d;
-                                 // http://www.smpte-ra.org/mpegreg/mpegreg.html
                                  switch (rd->getFormatIdentifier()) {
                                    case 0x41432D33: // 'AC-3'
                                         IsAc3 = true;

Privacy Policy