MediaPortal/MediaPortal-1 — pull request #5 by jblomb (2012-01-29 11:31:04+00:00)
Title: Teletext subtitle page number from TS Service information packets

See discussion at http://forum.team-mediaportal.com/submit-code-patches-mediaportal-tv-server-etc-325/teletext-subtitle-page-based-service-information-105180/

This is a patch that adds support for selecting the correct teletext subtitle page based on the Service Information packets in the TS stream.

Right now MP uses flags from the teletext stream itself to find the subtitle page and language, but on many channels this is not enough. SVT uses the same teletext stream for several channels, and the same goes for TV4. TCM Nordic has a couple of swedish subtitle pages and one of them just shows garbled text. MP often finds the wrong subtitle page, and shows subtitles belonging to another channel, or shows hard-of-hearing subtitles when I don't want them.

In the TS service information packets it is listed which subtitle pages are available, in which language, and if they are hard-of-hearing subs. This patch checks those entries against language preferences and saves the correct subtitle page number. SubtitleSelector never need to check the teletext flags - it can just use the saved page number instead. The patch only checks for teletext subtitle type 2, but it wouldn't be hard to add a checkbox "Display hard-of-hearing subs" to TVClient config and if the checkbox is checked - also include type 5 subs.