示例#1
0
        public void SetVideoInformation(string p)
        {
            VideoInformation vi = new VideoInformationRetrieval.VideoInformationRetrieval().GetVideoInformation(FilePath);

            durationLabel.Content = duration +
                                    (vi.duration.Minutes < 10 ? "0" + vi.duration.Minutes : vi.duration.Minutes.ToString())
                                    + ":" + (vi.duration.Seconds < 10 ? "0"
                                             + vi.duration.Seconds : vi.duration.Seconds.ToString());
            framesPerSecond.Content = framesSecond + vi.frameRate;
        }
        public Bitmap GetPreviewBitmap(VideoType type)
        {
            Bitmap b    = new Bitmap(100, 100);
            string path = VideoPaths.FirstOrDefault(v => v.Value == type).Key;

            if (false == string.IsNullOrEmpty(path))
            {
                b = new VideoInformationRetrieval.VideoInformationRetrieval().GetVideoFrame(path, 0, TimeSpan.FromSeconds(0));
            }
            return(b);
        }