You can display DVB subtitles and DVB Teletext from a transport stream using MPlatform or MFormats SDK.
Here what you need to do:
1. Create an instance of the object and load a file.
The objects may be:
- MFile for MPlatform SDK
- MFReader for MFormats SDK
2. Check if there are any subtitle tracks available.
Get "file::info::subtitle_tracks" property with PropsGet method:
- string tracksNumber = "";
- myFile.PropsGet("file::info::subtitle_tracks", out tracksNumber );
3. You can also get detailed info about the subtitle track if needed.
For example, to get the subtitle index for track 0:
- string subtitleCodecName = "";
- myFile.PropsGet("file::info::subtitle.0::codec_name", out subtitleCodecName);
Possible properties:
- file::info::subtitle.0::idx - subtitle index
- file::info::subtitle.0::codec_name - subtitle codec name
- file::info::subtitle.0::time_base - subtitle time base
- file::info::subtitle.0::start_time - subtitle start time
- file::info::subtitle.0::duration - subtitle duration
4. Set the subtitle track index to be displayed.
For example, track 0:
- myFile.PropsSet("file::subtitle_track", "0");
5. DVB Teletext specifics
For displaying the video teletext, it's needed to set these props in addition to subtitle_track:
Computer\HKEY_CURRENT_USER\SOFTWARE\Medialooks\MFormats\MFReader -> teletext.force_ffmpeg = "true"
Computer\HKEY_CURRENT_USER\SOFTWARE\Medialooks\MFormats\MFReader -> teletext_page = "888"
(888 - default value. If you don't have this key in your registry - just create it)