[mythtv] DVB EPG (Was: [PATCH] Beginning radio pvr support)

Steve Davies steve at one47.co.uk
Tue Jan 13 10:58:21 EST 2004


Kenneth AaflXy said:
> Hi,
>
>>> I haven't really looked into this yet, but is the now/next data synced
>>> with the show, ie, if a show starts late, the now/next data will only
>>> be
>>> updated when the show actually starts or when it is scheduled to start?
>>
>> In the UK on freeview, you are lucky if the data is there and for the
>> correct day...  Actually it's not quite that bad, but sometimes it seems
>> to get messed up quite badly.
>>
>> Rumour has it that from "Jan 2004" we will get full 7 days epg....
>> Anyone
>> still got a normal box plugged in to see if it's broadcasting yet?
>>
>> I think it handles schedule changes, but I doubt it handles very short
> term
>> delays or over-running programs (perhaps though...?)
>
>>From my experience the now/next data was very static (DVB-S: Thor 1W).
>
>>> If it is in fact when the show actually starts, then this could make an
>>> interesting addition to the scheduler. Ie, an option to 'use DVB
>>> now/next data' where Myth would check the now/next data to see when a
>>> scheduled recording has actually started and begin the recording at
>>> that
>>> time. If no card is free at the time, it could fall back to the EPG
>>> obtained from XMLTV.
>>
>> Kenneth has already kindly built a parser into the DVB code.
>
> Which he ripped out before submitting to CVS. Search the mythtv-dev
> archive
> for an older version of the dvb-patch (don't think I modified it after
> releasing the .5 version or so). If you can't find it, give me a haul,
> and I'll see if it's located somewhere on my disk still.
>
>>> The epg info is continuously broadcast with the tv data as I understand
> it.
>>> You would simply write extra code to continuously update the epg data
>>> in
> the
>>> database based on the DVB data.
>>
>> Your problem comes if the user never changes channel (well, changes mux
> really).
>> VDR has a process which early in the morning flicks across all
>> multiplexes
> and
>> makes sure that it has all the new data at least once that day.
>
> The event that the user has LiveTV on for 24h is very unlikely, and the
> process
> seems to work well for vdr users. Also it should be pretty simple to
> implement
> in MythTV as well, if the now/next data or epg feed of any other kind is
> found
> to be accurate and maintained.
>
>> Basically have a look at the DVBChannel.cpp code (I think) and see if
>> you
> can
>> use it to dig out your DVB epg data (also look at the tools from Metzler
> bros,
>> etc which can dump all the data out of a live stream so you can check if
> you
>> are doing the right thing in myth code)
>
> DVBSections.cpp that is, and there is heaps of debugging statements in
> there
> to
> enable printing of just about anything. Just for checking if it exists
> it's
> probably easier to just use the Metzler code (www.metzlerbros.de).
>
> Also I think there is proprietary solutions to the EPG implementation out
> there,
> i.e. I destinctly remember that MHP (Media Highway PLatform) has this in
> the
> specs.
> But then again I doubt that DVB-T in UK uses this platform.
>
> Kenneth
>
Kenneth was kind enough to provide me with this older code a while back. I
have done only very little with it (no time unfortunately) but I could
create/post a patch against CVS which pulls the EPG data.

It is REALLY basic, and just spews lots of collected data to stdout from
mythbackend, and includes some small amount of debugging for unrecognised
tags etc.

I had (still do?) intended to start storing this data into a std::map of
ProgramInfo structs, and periodically compare this map against the
database - I thought that once a minute I could check if anything new had
arrived into the map. The DB load would be too high if this were done too
regularly. There would then need to be a way of periodically pruning old
data from the map - perhaps if an entry hasn't been seen on-air for 10
minutes.

>From the look of the UK DVB-T data I am receiving, I am getting sufficient
now/next data to be usable to make corrections to any mythfilldatabase
starting points. I haven't delved deep enough to know whether the results
would be useful though.

I have not investigated the possibility of different quality data from
different muxes - I believe that the now/next data is the same across all
muxes (at least on my UK system) but the full EPG data that is threatened
later this year may not use the same principle. If it is necessary to
switch between muxes to get all EPG data, then I would suggest that every
10 minutes, if the tuner is running in 'IDLE' mode (ie. not currently
watching/recording), that the frequency hops to the next mux in the list
so that data can be collected.

Just my 2p.

Regards,
Steve



More information about the mythtv-dev mailing list