private void ReleaseStreamSource() { if (source != null) { source.StopParserAndWorkerThreads(); source = null; } }
private void CreateNewMediaSourceAndPlay() { int id = GetStreamIdxFromChannelId(App.EngineInstance.GetCurPlayingChannelID); #if STREAM_SOURCE2 source = new CmmbStreamSource2(id, App.EngineInstance); #else source = new CmmbStreamSource(id, App.EngineInstance); #endif MediaPlayer.Volume = 100; this.MediaPlayer.SetSource(source); }