[mythtv] Adding PLP support (DTV_STREAM_ID)

Torbjorn Jansson torbjorn.jansson at mbox200.swipnet.se
Thu Apr 12 19:18:56 UTC 2018


On 2018-02-04 23:20, Stuart Auchterlonie wrote:
> On 04/02/18 12:35, Torbjorn Jansson wrote:
>>
>> attached is my first version of adding plp support.
>> currently it is in a "works for me" state, a few things that is missing:
>> channel scanning is not adjusted, mux editor don't know about this new
>> setting and i haven't added the db update code needed.
>>
>> so to test this you need to manually run:
>> ALTER TABLE dtv_multiplex ADD COLUMN plp_id SMALLINT;
>>
>> the gui parts is not done because i haven't (yet) figured out how the
>> settings and gui work.
>>
>> at a minimum the mux editor should have an option to set plp.
>> it should default to not setting plp by either leaving the column to
>> NULL or set it to -1
>> plp is only valid for dvb-t2 so maybe this gui setting should be hidden
>> if it is anything other than dvb-t2
>>
>> according to the dvb api documentation apparently dvb-s2 also can use plp.
>> i have no way of testing this so it is not taken into account.
>>
>>
>> would be nice if someone can have a look at this patch because there are
>> areas i'm a little unsure of.
>> and also would be nice if someone else can test it to make sure i
>> haven't broken anything.
>>
> 
> You need to make this part of the code conditional on the PLP ID being
> set. You've initialized it to -1, and that's what should be checked
> to verify that you need to send this option to the dvb card.
> 
> +    //PLP
> +    if (tuner_type == DTVTunerType::kTunerTypeDVBT2)
> +    {
> +        cmdseq->props[c].cmd      = DTV_STREAM_ID;
> +        cmdseq->props[c++].u.data = tuning.plp_id >255 ||
> tuning.plp_id<0 ? NO_STREAM_ID_FILTER : tuning.plp_id;
> +    }
> 
> 

well... -1 is the same as NO_STREAM_ID_FILTER which means no filtering.
so it should be ok, but it can be changed to be on the safe side yes.

but i'm not going to continue with this patch because I've found a better way 
of solving my problems including fixing another longstanding really annoying 
issue related to my CA module getting stuck every single time mythbackend 
starts forcing me to physically unplug and reinsert it.

what i did was to use tvheadend for handling the tv tuners and then let mythtv 
use it instead.
this required a custom m3u file so i created a small php script that generates 
a correct m3u file for mythtv including figuring out service id and xmltv id 
from tvheadend and includes that in generated m3u file.

this gives me best of both mythtv and tvheadend.
i have been using this successful now for probably over a month or two.
no failed recording because of stuck ca module and i get the flexibility of for 
example pointing kodi to tvheadend to stream tv easily.

if anyone is interested i can share my php script and explain how it works, but 
it is mostly self explanatory.



More information about the mythtv-dev mailing list