// ONLY call from MP main thread! private void RetrieveBitmapSubtitles() { bitmapSubtitleCache.Clear(); try { // collect dvb bitmap subtitle options int streamCount = 0; dvbStreams.GetSubtitleStreamCount(ref streamCount); Debug.Assert(streamCount >= 0 && streamCount <= 100); for (int i = 0; i < streamCount; i++) { TSReaderPlayer.SUBTITLE_LANGUAGE subLang = new TSReaderPlayer.SUBTITLE_LANGUAGE(); dvbStreams.GetSubtitleStreamLanguage(i, ref subLang); SubtitleOption option = new SubtitleOption(); option.type = SubtitleType.Bitmap; option.language = subLang.lang; option.bitmapIndex = i; bitmapSubtitleCache.Add(option); Log.Debug("Retrieved bitmap option Lang : " + option.ToString()); } } catch (Exception e) { Log.Error(e); } }
// ONLY call from MP main thread! private void RetrieveBitmapSubtitles() { bitmapSubtitleCache.Clear(); try { // collect dvb bitmap subtitle options int streamCount = 0; dvbStreams.GetSubtitleStreamCount(ref streamCount); Debug.Assert(streamCount >= 0 && streamCount <= 100); for (int i = 0; i < streamCount; i++) { TSReaderPlayer.SUBTITLE_LANGUAGE subLang = new TSReaderPlayer.SUBTITLE_LANGUAGE(); dvbStreams.GetSubtitleStreamLanguage(i, ref subLang); SubtitleOption option = new SubtitleOption(); option.type = SubtitleType.Bitmap; option.language = subLang.lang; option.bitmapIndex = i; bitmapSubtitleCache.Add(option); Log.Debug("Retrieved bitmap option Lang : " + option.ToString()); } } catch (Exception e) { Log.Error(e); } }