[mythtvnz] tv_grab_dvd
Steve Hodge
mythtvnz@lists.linuxnut.co.nz
Wed, 9 Aug 2006 19:02:56 +1200
On 8/9/06, toby <toby@np.co.nz> wrote:
> As those who use it know, you get the following entries in the output xml...
> <!--Unknown_Please_Report ID="55" Len="4" -->
> <!--Unknown_Please_Report ID="5f" Len="4" -->
>
> My guess is that either 55 or 5f hold the category data but that this ID
> isn't defined or setup correctly in tv_grab_dvb as category data?
> void parseContentDescription(descr_content_t *dc)
> {
> int c1,c2;
> int i;
> for (i=0;i<(dc->descriptor_length);i+=2)
> {
> nibble_content_t
> *nc=CastContentNibble((char*)dc+DESCR_CONTENT_LEN+i);
>
> c1=((nc->content_nibble_level_1<<4)+(nc->content_nibble_level_2));
>
> c2=((nc->user_nibble_1<<4)+(nc->user_nibble_2));
> if (c1>0)
> printf("\t<category>%s</category>\n",lookup((struct
> lookup_table*)&description_table,c1));
> // This is weird in the uk, they use user but not content,
> and almost the same values
> if (c2>0)
> printf("\t<category>%s</category>\n",lookup((struct
> lookup_table*)&description_table,c2));
> }
> }
>
> Anyone have any ideas on this?
Yes, I've been looking at this. First, note that comment about how in
the UK they use "user_nibble" values instead of "content_nibble"
values. That's applicable here too. I believe the reason Sky are doing
that is because they are not using the standard set of values. For
example that 5f value you've used as an example is not a value defined
by the standard which is available free from etsi.org, though you have
to register. The one you want is EN 300 468. Sky appear to be using
the "content_nibble" values to flag certain types of content. Going by
their website it looks like those values indicate things like
"contains violence" or "pay-per-view". But it doesn't seem to be 100%.
As for the category data, the problem is: how do we figure out what
that 5f represents? Sky don't display categories on the EPG in their
decoders, AFAICS. They do have categories on their website, but only
the top level ones (i.e. the 5 in 5f is defined in the standard as
meaning "children's / youth programs", and that is what the Sky
website shows).
Where we have definitions they seem to be accurate. I.e. the codes
they use appear to mostly correspond to the standard, where they are
defined. For example, the Crocodile Hunter has code 91 which is
"nature/animals/environment" according to the standard.
What I have now is a patch that makes tv_grab_dvb output only the
"user_nibble" codes, and decode them by using the codes from the
standard. Where we don't have a definition it defaults back to the top
level category code (i.e. 5f would be listed as "children's / youth
programs", the same as 50). I have also added a switch to just use the
top level categories as well. However I want to clean up the
tv_grab_dvb code a bit and put the table of mappings into a config
file so people can change the categories if they think they are wrong.
Cheers,
Steve