Ejemplo n.º 1
0
        /// <summary>
        /// Stops playback on all initialized streams.
        /// </summary>
        public void Stop()
        {
            logger.Info("");

            var state = player.GetState();

            if (state != ESPlayer.ESPlayerState.Paused && state != ESPlayer.ESPlayerState.Playing)
            {
                return;
            }

            try
            {
                _dataClock.Stop();
                DisableTransfer();
                StopClockGenerator();

                player.Stop();
                stateChangedSubject.OnNext(PlayerState.Idle);
            }
            catch (InvalidOperationException ioe)
            {
                logger.Error(ioe);
            }
        }
Ejemplo n.º 2
0
        private void ClosePlayer()
        {
            logger.Info("");

            DetachEventHandlers();

            _playerClock.SetPlayerClockSource(null);

            player.Stop();
            player.Close();
        }
Ejemplo n.º 3
0
        private void ClosePlayer()
        {
            logger.Info("");

            DetachEventHandlers();

            _playerClock.SetPlayerClockSource(null);

            player.Stop();
            player.Close();
            player.Dispose();
            player = new ESPlayer.ESPlayer();

            foreach (var stream in esStreams)
            {
                if (stream == null)
                {
                    continue;
                }

                stream.IsConfigured = false;
                stream.SetPlayer(player);
            }
        }