[mythtv] DVB and check encrypted channel

Kenneth Aafløy ke-aa at frisurf.no
Sat Jan 3 11:05:28 EST 2004


Hi,

Denis Grilli wrote:
> Hi, i don't have DVB card with cam support and often any 
> Italian FTA channel encrypt your program (copyright problem).
> When they are encrypted and i tune channel, mythfrontend 
> freeze (beacuse backend don't fill ringbuffer..).
> My idea is to check if channel is encrypted and don't to tune 
> channel (or pause playing and tell it by osd);
> The question: how can i check from dvbchannel.cpp if channel 
> is encrypted?? I don't know dvb specification and is to hard for me

You must check this from dvbrecorder, as it's handling the stream.

You should be able to detect an encrypted transport stream by checking
the 2 most significant bits of the third byte in the packet.
Where both bits zero is not encrypted, and anything else is provider
specific, ie. they usually indicate which (of multiple) keys was
used for scrambling the packet with combinations of those bits.

Put this line below the 'uint8_t content = <blah>;' line (~356):
	uint8_t scrambled = pktbuf[3] >> 6;


Kenneth



More information about the mythtv-dev mailing list