Exemplo n.º 1
0
        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;
        }
Exemplo n.º 2
0
        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;
        }