On TV4 Science Fiction I have noticed that every time I watch the channel I have to manually select subtitle page 890 to display subtitles, although I have selected swe as the default language. I finally decided to look into the problem and here are my findings:
In the logs I noticed:
...but page 90-92 are not valid pages. They are supposed to be 890-892.
Took some time to figure it out..
in TsReader/PmtParser:
There you can see that magazine number can be 0-7. BUT in the ETS specification it states that:
"Magazine number 8: A packet with a magazine value of 0 is referred to as belonging to magazine 8."
Add something like if (teletext_magazine_number == 0) teletext_magazine_number=8;
...and it's working again.
log after patch:
Attached is a patch for TsReader.
for a great program!!
In the logs I noticed:
Code:
2010-03-09 10:00:06.290290 [Debug][(10)]: Page 90 is of type 2 and in lang swe
2010-03-09 10:00:06.293290 [Debug][(10)]: Page 91 is of type 2 and in lang nor
2010-03-09 10:00:06.294290 [Debug][(10)]: Page 92 is of type 2 and in lang dan
...but page 90-92 are not valid pages. They are supposed to be 890-892.
Took some time to figure it out..
in TsReader/PmtParser:
Code:
int teletext_magazine_number = (b3 & 0x07); // last(lsb) 3 bits
int teletext_page_number = (section.Data[pointer + varBytes*j + 6]);
int real_page_tens = (teletext_page_number & 0xF0) >> 4;
int real_page_units = teletext_page_number & 0x0F;
int real_page = teletext_magazine_number*100 + real_page_tens*10 + real_page_units;
There you can see that magazine number can be 0-7. BUT in the ETS specification it states that:
"Magazine number 8: A packet with a magazine value of 0 is referred to as belonging to magazine 8."
Add something like if (teletext_magazine_number == 0) teletext_magazine_number=8;
...and it's working again.
log after patch:
Code:
2010-03-09 10:40:48.276963 [Debug][(10)]: Page 890 is of type 2 and in lang swe
2010-03-09 10:40:48.278964 [Debug][(10)]: Page 891 is of type 2 and in lang nor
2010-03-09 10:40:48.279964 [Debug][(10)]: Page 892 is of type 2 and in lang dan
Attached is a patch for TsReader.
for a great program!!