/// <summary>
        /// Performs actions when the command has been executed.
        /// This is useful to notify exceptions or update the state of the media.
        /// </summary>
        public override void PostProcess()
        {
            MediaCore.State.UpdateFixedContainerProperties();

            if (ExceptionResult == null)
            {
                MediaCore.State.UpdateMediaState(PlaybackStatus.Stop);
                MediaCore.SendOnMediaOpened();
            }
            else
            {
                MediaCore.State.UpdateMediaState(PlaybackStatus.Close);
                MediaCore.SendOnMediaFailed(ExceptionResult);
            }

            MediaCore.Log(MediaLogMessageType.Debug, $"Command {CommandType}: Completed");
        }
Exemplo n.º 2
0
        /// <inheritdoc />
        public override void PostProcess()
        {
            MediaCore.State.UpdateFixedContainerProperties();

            if (ExceptionResult == null)
            {
                MediaCore.State.UpdateMediaState(PlaybackStatus.Stop);
                MediaCore.SendOnMediaOpened();
            }
            else
            {
                MediaCore.ResetPosition();
                MediaCore.State.UpdateMediaState(PlaybackStatus.Close);
                MediaCore.SendOnMediaFailed(ExceptionResult);
            }

            this.LogDebug(Aspects.EngineCommand, $"{CommandType} Completed");
        }