[mythtv] DVB teletext/subtitles

Daniel Kristjansson danielk at cuymedia.net
Mon Nov 21 23:40:48 UTC 2011


On Mon, 2011-11-21 at 09:21 +0100, Karl Dietz wrote:
> I've looked at AvFormatDecoder::ScanTeletextCaptions and saw it handles
> only page types 1 (initial teletext page) and 2 (teletext subtitle page)
> but not 5 (teletext subtitle page for hearing impaired people).
> 
> Is there a way to signal this difference in target audience?

Not at the moment, but usually this will be pretty obvious to the
user as the language will be the same as the broadcast language
for the teletext for the hearing impaired and will be different
for others. In the US most captions are for the hearing impaired
but those of us with good hearing use them as well when watching
TV under less than ideal listening environments.

> Can you give me a hint on where to look for a place to hook up a
> function that injects the correct addition to the teletext descriptor of
> the PMT depending on the DVB ids?

Sure, but we only do that for ATSC currently. It is in
  MPEGStreamData::CreatePMTSingleProgram()
look for
"if (sd && !MPEGDescriptor::Find(gdesc, DescriptorID::caption_service))"
It sd is a ATSCStreamData pointer initialized using a dynamic cast
so this code is only executed if this MPEGStreamData is really an
ATSCStreamData and there is no caption service descriptor on the the PMT
already. It then looks for VCT tables and extracts any caption_service
descriptors and plops them into gdesc which is later added to the
PMT being generated. The tvct and cvct are later returned via
    if (sd)
    {
        sd->ReturnCachedTVCTTables(tvct);
        sd->ReturnCachedCVCTTables(cvct);
    }
This is so they are not lost to the ATSCStreamData's memory manager.

Something very similar could locate teletext and subtitling descriptors
in other DVB tables.

Note: Currently these descriptors are passed through during recording
if they are in the original PMT, unless _strip_pmt_descriptors is set,
but they are not copied from any other tables.

The code that locates the descriptors during playback is in
  AvFormatDecoder::ScanTeletextCaptions()
I misstated how this works before, it only looks if the stream type
is StreamID::PrivData, not for any other stream. It does not look
for DescriptorID::subtitle it only looks at DescriptorID::teletext.

-- Daniel



More information about the mythtv-dev mailing list