public TsReaderStreamInfoHandler(ISubtitleStream subtitleStream)
        {
            if (subtitleStream == null)
            {
                return;
            }
            int subtitleStreamCount = 0;

            _subtitleStream = subtitleStream;
            subtitleStream.GetSubtitleStreamCount(ref subtitleStreamCount);
            if (subtitleStreamCount > 0)
            {
                StreamInfo subStream = new StreamInfo(null, NO_STREAM_INDEX, VideoPlayer.GetNoSubsName(), 0);
                AddUnique(subStream);
            }
            for (int i = 0; i < subtitleStreamCount; ++i)
            {
                //FIXME: language should be passed back also as LCID
                SubtitleLanguage language = new SubtitleLanguage();
                subtitleStream.GetSubtitleStreamLanguage(i, ref language);
                int lcid = BaseDXPlayer.LookupLcidFromName(language.lang);
                // Note: the "type" is no longer considered in MP1 code as well, so I guess DVBSub3 only supports Bitmap subs at all.
                string     name      = language.lang;
                StreamInfo subStream = new StreamInfo(null, i, name, lcid);
                AddUnique(subStream);
            }
        }
        public TsReaderTeletextInfoHandler(ITeletextSource teletextSource)
        {
            if (teletextSource == null)
            {
                return;
            }
            int teletextStreamCount = 0;

            _teletextSource = teletextSource;
            teletextSource.GetTeletextStreamCount(ref teletextStreamCount);
            if (teletextStreamCount > 0)
            {
                StreamInfo subStream = new StreamInfo(null, NO_STREAM_INDEX, VideoPlayer.GetNoSubsName(), 0);
                AddUnique(subStream);
            }
            for (int i = 0; i < teletextStreamCount; ++i)
            {
                //FIXME: language should be passed back also as LCID
                SubtitleLanguage language = new SubtitleLanguage();
                teletextSource.GetTeletextStreamLanguage(i, ref language);
                int        lcid      = BaseDXPlayer.LookupLcidFromName(language.lang);
                string     name      = language.lang;
                StreamInfo subStream = new StreamInfo(null, i, name, lcid);
                AddUnique(subStream);
            }
        }
        public MpcStreamInfoHandler()
        {
            var subtitleCount = MpcSubtitles.GetCount();

            for (int i = 0; i < subtitleCount; ++i)
            {
                string     subtitleTrackName = MpcSubtitles.GetTrackName(i);
                int        lcid      = BaseDXPlayer.LookupLcidFromName(subtitleTrackName);
                StreamInfo subStream = new StreamInfo(null, i, subtitleTrackName, lcid);
                AddUnique(subStream);
            }
            AddUnique(new StreamInfo(null, subtitleCount + 1, VideoPlayer.GetNoSubsName(), 0));
        }