public void Stop() { if (_innerPlayout != null) { var playout = _innerPlayout; _innerPlayout = null; playout.CurrentPlayItemChanged -= Playout_CurrentPlayItemChanged; playout.NextPlayItemChanged -= Playout_NextPlayItemChanged; playout.Stop(); playout.Dispose(); OnStateChanged(); } }
public void Start() { if (_innerPlayout == null) { PlayoutSettings settings = GetPlayoutSettings(); var playout = new PlayoutSystem(_preview, _playlist, settings, this.Log, ChannelSwitcher.Instance, _filePathResolver, settings.CGItems); playout.CurrentPlayItemChanged += Playout_CurrentPlayItemChanged; playout.NextPlayItemChanged += Playout_NextPlayItemChanged; playout.Start(); _innerPlayout = playout; OnStateChanged(); } }