Beispiel #1
0
        void updateObservableVariables()
        {
            VideoClock      = getVideoClock();
            AudioClock      = audioPlayer.getAudioClock();
            PositionSeconds = videoDecoder.HasAudio == true ? AudioClock : VideoClock;

            StringBuilder builder = new StringBuilder();

            builder.AppendLine("State: " + VideoState.ToString());
            builder.AppendLine("Resolution: " + videoDecoder.Width + " x " + videoDecoder.Height + "@" + videoDecoder.FramesPerSecond.ToString("0.##"));
            builder.Append("Free Packets (" + videoDecoder.FrameQueue.FreePacketQueueState.ToString() + ") ");
            builder.AppendLine(": " + videoDecoder.FrameQueue.NrFreePacketsInQueue + "/" + videoDecoder.FrameQueue.MaxFreePackets);

            builder.Append("Video Packets (" + videoDecoder.FrameQueue.VideoPacketQueueState.ToString() + ") ");
            builder.AppendLine(": " + videoDecoder.FrameQueue.NrVideoPacketsInQueue + "/" + videoDecoder.FrameQueue.MaxVideoPackets);

            builder.Append("Audio Packets (" + videoDecoder.FrameQueue.AudioPacketQueueState.ToString() + ") ");
            builder.AppendLine(": " + videoDecoder.FrameQueue.NrAudioPacketsInQueue + "/" + videoDecoder.FrameQueue.MaxAudioPackets);
            builder.AppendLine("Audio State: " + audioPlayer.Status.ToString());
            builder.AppendLine("Buffering: " + videoDecoder.FrameQueue.IsBuffering.ToString());
            builder.AppendLine("Packet Errors (V / A): " + videoDecoder.FrameQueue.NrVideoPacketReadErrors.ToString() + " / " + videoDecoder.FrameQueue.NrAudioPacketReadErrors.ToString());

            builder.AppendLine("Nr Frames Dropped: " + NrFramesDropped + " / " + NrFramesRendered);
            builder.AppendLine("Video Clock: " + VideoClock.ToString("#.####"));
            builder.AppendLine("Audio Clock: " + AudioClock.ToString("#.####"));

            builder.AppendLine("Frame Pts: " + framePts);
            builder.AppendLine("Keyframe: " + isKeyFrame.ToString());

            videoRender.InfoText = builder.ToString();

            videoRender.SubtitleItem = Subtitles.getSubtitle(VideoClock);
        }