[mythtv] SI/PSIP Parser

Doug Larrick dougl at charter.net
Wed Sep 22 08:01:15 EDT 2004


Taylor Jacob wrote:
> I sent this to Daniel Thor Kristjansson, but I see no reason why I shouldn't get some input from
> anyone else interested in this:
> 
> ----
> 
> I finally got a idea for a class that will work for both DVB and ATSC :)
> 
> I am in the process of moving my code into the new class.. The data will be passed in via a signal
> called ParseTable(uint8_t* buffer, int size);
> 
> This will process the tables (whatever ATSC tables you want to handle.. I wrote some partial table
> parsers and tested them with PBS on AMC3 which uses ATSC over DVB).

Some general thoughts on this, from the ATSC side of the house...  I 
hate to see duplicated effort here -- Daniel's parser classes are pretty 
far along -- but if it means we share code between DVB and ATSC, I'm all 
for it.

1. Setup improvements.  zap2it provides us with nearly everything we 
need to eliminate the setup step where the user edits the database to 
fill in the freqid field for the ATSC stations.  I've actually got code 
in my local tree that gets the fccchannelnumber and channelminor from 
zap2it, propogates them through the temporary tables, and stuffs them in 
the freqid field.  The only flaw is that channelminor and program number 
are not always the same.  Channelminor is mentioned in TVCT (part of 
PSIP); program number in PMT.  And there's nothing to keep a station 
from changing the program number on a whim; channelminor is more 
permanent (world-visible).  I then thought "well why not just cache the 
PIDs in the database and skip program number entirely" and didn't 
proceed any further.  Which brings me to...

2. PID caching.  There's absolutely no reason why DVB and ATSC can't 
share PID caching code and database structures.  Should include the 
capability of recording alternate audio streams too.

3. PSIP guide data vs. zap2it.
PSIP has the advantages of:
* more current (might catch last-minute changes)
* more local (might catch local station pre-emptions)
* more detailed (I've seen some mighty long descriptions)
Zap2it has the advantages of:
* more correct, at least at this early stage.  Several of my stations 
broadcast total garbage (data from April) or just "HD Event" or the like.
* better categorization.  Zap2it has done the work of separating show 
title, subtitle, actors, etc. out of the description; PSIP just has 
title (EIT) and description (ETT) fields.

The model I've favored is one where the primary data comes from Zap2it, 
and PSIP is used to do updates where we're sure it's safe: no data at 
all, show title and subtitle match, etc.

Also, if you need ATSC PSIP data for testing, it's pretty easy to grab 
just the PSIP PIDs from a stream.  They end up being pretty small files 
that way, too.

-Doug
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20040922/c43cbee9/signature.pgp


More information about the mythtv-dev mailing list