patch for crypted teletext pids

Message ID 213.164.21.2.1284039047.wm@webmail.inode.at
State New
Headers

Commit Message

michael_kaplan@inode.at Sept. 9, 2010, 1:30 p.m. UTC
  Hi!

I have had a problem watching the teletext on the crypted channels "ORF1
HD" and "ORF2 HD" ... after doing some research on the web, i found out
that these two channels not only crypt their audio and video streams, but
also the teletext. (as far as I know, not even Sky/Premiere crypt their
teletext)

So I had a look into the vdr code, and found out, that in ci.c in the
function AddChannels(), only video and audio pids are added to the cam
device.

I made a small patch (which is included in this mail), which also adds the
teletext pid in case there was a tpid detected before, and now I can watch
the teletext in the ORF HD channels.

Other channels, which do only crypt audio+video, but not the teletext,
should not be affected by this patch, because the CAM module should be
intelligent enough to detect whether a ts packet is crypted or not (via
the two scrambling control bits in the ts packet header)

I wanted to ask, if it would be possible and reasonable to add this patch
to the vanilla-vdr.


Kind regards,
Michael Kaplan
  

Comments

Reinhard Nissl Sept. 9, 2010, 6:54 p.m. UTC | #1
Hi,

Am 09.09.2010 15:30, schrieb michael_kaplan@inode.at:

> I have had a problem watching the teletext on the crypted channels "ORF1
> HD" and "ORF2 HD" ... after doing some research on the web, i found out
> that these two channels not only crypt their audio and video streams, but
> also the teletext. (as far as I know, not even Sky/Premiere crypt their
> teletext)

Not that I have an usecase for this already, but what about
scrambled DVB subtitles? Shouldn't those PIDs be sent to the CAM too?

Bye.
  
Klaus Schmidinger Sept. 10, 2010, 1:43 p.m. UTC | #2
On 09.09.2010 20:54, Reinhard Nissl wrote:
> Hi,
> 
> Am 09.09.2010 15:30, schrieb michael_kaplan@inode.at:
> 
>> I have had a problem watching the teletext on the crypted channels "ORF1
>> HD" and "ORF2 HD" ... after doing some research on the web, i found out
>> that these two channels not only crypt their audio and video streams, but
>> also the teletext. (as far as I know, not even Sky/Premiere crypt their
>> teletext)
> 
> Not that I have an usecase for this already, but what about
> scrambled DVB subtitles? Shouldn't those PIDs be sent to the CAM too?

While I don't see what sense it would make to encrypt anything
besides video and audio, it is of course reasonable to add any
encrypted pids in cCamSlot::AddChannel().

However, it must be guaranteed that the CAM will simply ignore
such pids in case they are not encrypted. Otherwise they might
use up valuable resources in the CAM.

So somebody either find out whether unencrypted pids will or
will not use up CAM resources, or we'll have to check whether
there actually is a CA descriptor available for a given pid.

Klaus
  

Patch

*** ci.c	2010-01-02 11:39:50.000000000 +0100
--- ci.c.patched	2010-09-09 15:10:54.000000000 +0200
***************
*** 1911,1916 ****
--- 1911,1919 ----
           AddPid(Channel->Sid(), *Apid, STREAM_TYPE_AUDIO);
       for (const int *Dpid = Channel->Dpids(); *Dpid; Dpid++)
           AddPid(Channel->Sid(), *Dpid, STREAM_TYPE_DOLBY);
+      if (Channel->Tpid()) {
+         AddPid(Channel->Sid(), Channel->Tpid(), STREAM_TYPE_DOLBY);
+         }
       }
  }