Exemple #1
0
        public Video(List <Frame> videoFrames, int frameRate)
        {
            latency = 0;
            fps     = frameRate;
            frames  = videoFrames;

            VideoPlayback video = new VideoPlayback(frames[0].x, frames[0].y, fps);

            latency = video.CalculateLatency(this); //Calculate latency
        }
        /// <summary>
        /// Given a video object, it will play the video into the console.
        /// </summary>
        /// <param name="video1"></param>

        public static void PlayVideo(Video video1)
        {
            VideoPlayback videoWindow = new VideoPlayback(video1.frames[0].x, video1.frames[0].y, video1.fps);
            double        time        = videoWindow.PlayVideo(video1).Result;

            Console.Clear();
            Console.WriteLine("Playback info: ");
            Console.WriteLine("Expected FPS: " + video1.fps + " Actual FPS: " + Math.Round(video1.frames.Count / (time / 10000), 3));
            Console.WriteLine("DIMX: " + video1.frames[0].x + " DIMY: " + video1.frames[0].y + " Frame Count: " + video1.frames.Count);
        }