/// <summary> /// 从视频中截取一帧 /// </summary> private void GetOneFrameImageFromVideo() { //ThreadPool.QueueUserWorkItem(m => //{ FFmpegHelper.GetOneFrameImageFromVideo(this.VideoPath, this._thumbnailPath, () => { if (System.IO.File.Exists(_thumbnailPath)) { App.Current.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Background, new Action(() => { this.imgFirstFrame.Source = new BitmapImage(new Uri(_thumbnailPath, UriKind.RelativeOrAbsolute)) { CacheOption = BitmapCacheOption.OnLoad, }; })); } //}); }); }