protected override bool EnumerateStreams(bool forceRefresh) { //FIXME: TSReader only offers Audio in IAMStreamSelect, it would be cleaner to expose subs as well. bool refreshed = base.EnumerateStreams(forceRefresh); if (refreshed) { // If base class has refreshed the stream infos, then update the subtitle streams. ISubtitleStream subtitleStream = _tsReader as ISubtitleStream; if (subtitleStream != null) { _streamInfoSubtitles = new TsReaderStreamInfoHandler(subtitleStream); } } return(refreshed); }
public override void SetSubtitle(string subtitle) { EnumerateStreams(); TsReaderStreamInfoHandler tsStreamInfoHandler = _streamInfoSubtitles as TsReaderStreamInfoHandler; if (tsStreamInfoHandler == null) { return; } if (tsStreamInfoHandler.EnableStream(subtitle)) { _subtitleRenderer.RenderSubtitles = !tsStreamInfoHandler.DisableSubs; SaveSubtitlePreference(); } }