public BindablePlayout(IPlayPreview preview, IPlaylist3 playlist, IMediaFilePathResolver filePathResolver) { _preview = preview; _playlist = playlist; _filePathResolver = filePathResolver; //_playRecorder = playRecorder; }
public PlayoutSystem(IPlayPreview preview, IPlaylist3 playlist, PlayoutSettings settings, ILog log, IChannelSwitcher switcher, IMediaFilePathResolver filePathResolver, CGItemCollection cgItems) { _playlist = playlist; var player = new Player(preview, settings, log, DefaultDateTimeService.Instance, filePathResolver); _scheduler = new PlayScheduler(player, playlist, DefaultDateTimeService.Instance, switcher, cgItems); _scheduler.CurrentPlayItemChanged += OnCurrentPlayItemChanged; _scheduler.NextPlayItemChanged += OnNextPlayItemChanged; }
public PlayScheduler(IPlayer player, IPlaylist3 playlist, IDateTimeService dateTimeService, IChannelSwitcher switcher, CGItemCollection cgItems) { _player = player; _player.ItemLoaded += Player_ItemLoaded; _player.ItemStarted += Player_ItemStarted; _player.ItemStopped += Player_ItemStopped; _playlist = playlist; _dateTimeService = dateTimeService; _switcher = switcher; _cgItems = cgItems; }
//private Uri _sourceUri; //private DispatcherTimer timer; //private ProcessCount processCount; //private double _playlistDuration; //private DateTime? _playlistStartTime; //private DateTime? _playlistStopTime; //private readonly DelegateCommand<object> _forcePlayCommand; public PlayoutViewModel(IPlaylist3 playlist, ITimer timer, IMediaFilePathResolver filePathResolver) { _playlist = playlist; _playlist.Changed += Playlist_Changed; _playout = new BindablePlayout(this, playlist, filePathResolver); _playout.StateChanged += OnPlayout_StateChanged; _startPlayoutCommand = new DelegateCommand(StartPlayout, CanStartPlayout); _stopPlayoutCommand = new DelegateCommand(StopPlayout, CanStopPlayout); _startDelayCommand = new DelegateCommand(StartDelay, CanStartDelay); _stopDelayCommand = new DelegateCommand(StopDelay, CanStopDelay); this.Timer = timer; //_forcePlayCommand = new DelegateCommand<object>(ForcePlay,CanForcePlay); }