[mythtv] DVB-C and MythTV

Rudy Zijlstra mythtv at grumpydevil.homelinux.org
Sun Aug 19 13:10:29 UTC 2007


Janne,

Thanks for providing clues on how to improve.

Janne Grunau wrote:
> On Sunday 19 August 2007 13:07:55 Christiaan van Dijk wrote:
>   
>> Rudy Zijlstra wrote:
>>     
>>> Rudy Zijlstra wrote:
>>>       
>>>> Christiaan van Dijk wrote:
>>>>         
>>>>> Hi all,
>>>>>
>>>>> I've been working on a MythTV box with a DVB-C card and ran into
>>>>> some problems. I solved quite some issues and would like to share
>>>>> these here.
>>>>>
>>>>> A known problem with DVB-C are the network IDs. In a normal DVB
>>>>> situation there's only one main network ID in the NIT which
>>>>> describes the used network. In DVB-C however the network ID needs
>>>>> to be entered manually and is not even located in the NIT but in
>>>>> NITo.
>>>>>           
>
> That has nothing to do with DVB-C but with bad providers which break the 
> DVB standard. It's pure coincidence that your provider is a cable 
> provider.
>
>   
Actually, this type of NITo usage is pretty much industry standard 
within DVB-C. This is caused by historical (european) background where 
cable needed a way to handle lots of small geophraphical area's each 
having there own channel layout. Although the area's have increased, the 
usage pattern is consistent (also because changing it would break 
existing equipment).

And yes, i know that German operators have taken a different path and in 
this respect are adhering to DVB-C. They have their own oddities.

>>>>> I've seen some discussion on how to deal with this since 
>>>>> it's not really DVB standard and solutions are mainly dirty hacks
>>>>> which only pollute the code. I tried a solution which is a bit in
>>>>> between (to my opinion :-) ), this solution makes it possible to
>>>>> give a network ID in the configuration script which is compiled
>>>>> into the code,
>>>>>           
>
> That's the wrong place. A workaround for a broken provider should not 
> selectable on compile time. especially if it needs a location based 
> parameter. It will also break combined DVB-C/DVB-S setups.
> The place for the "right" network id would the video source setup.
>
>   
That sounds indeed a lot better, as it makes it both run-time as well as 
source configurable.
>>>>> if not defined (default) the code stays in it's 
>>>>> original state. There is some code pollution with the conditional
>>>>> defines but I tried to keep it to a minimum.
>>>>>           
>
> The #ifdefs are just ugly and a simple "return true" in the first case 
> would have avaoided all the reindentation. Much whitespace changes make 
> your patch harder to read. 
>
>   
>>>>> Also fixed a bug in the channel inversion setting, the scanner
>>>>> used to set an invalid value for DVB-C, now it defaults to auto.
>>>>> Really minor but avoids warnings in the log files.
>>>>>           
>
> Seperate issue, please provide a seperate patch. But I would guess it's 
> the wrong place to change.
>
> Attached patch is cleaner. (leaks memory, configuration is missing, you 
> have to set real_network_id in dvbstreamdata.cpp to your desired 
> value).
>   

And as far as i can see, it still breaks DVB-S? as the comparison is set 
unconditional, as you mention, the configuration is missing.

But a lot cleaner indeed (but for the memory leak, which i cannot verify 
or read from the code - i do not claim to be a programmer).
> Janne
>   

I am quit willing and able to test patches. I am running a mixed 
analog/DVB-C/DVB-S setup. If Christiaan, based on this improvement from 
you, comes up with a patch including configuration, would you support 
including it in Mythtv? In the end what we need is a working solution, 
compared to fully standards compliant but not working.

Rudy


More information about the mythtv-dev mailing list