带有帧访问权限的wpf视频 [英] Video in wpf with frame access
问题描述
你好,
我一直在努力在谷歌上回答这个问题。
我想创建ac#wpf应用程序来播放视频avi文件。我想访问每个视频帧进行一些图像处理。
从我所看到的,c#中没有本地控制来执行此操作(使用。 net 4)。
人们说应该可以使用DirectX和XNA。我一直在玩XNA,但在wpf应用程序中找不到任何播放视频的说明。
我想要的是有人指点我正确的方向?
亲切的问候....
John
Hello,
I''ve been struggling to answer this on Google.
I would like to create a c# wpf application to play video avi files. I would like to get access to each video frame to do some image processing.
From what I can see there is no native control in c# to do this (using .net 4).
People say that it should be possible with DirectX and XNA. I have been playing around with XNA but can''t find any instructions for playing video in a wpf application.
What I would like is someone to point me in the right direction?
Kind regards....
John
推荐答案
你可以在WPF中使用winforms控件,所以我想你想创建一个使用DX来做你想做的控件,然后插入就这样。我发现使用这些控件可以创建渲染问题,我这样做是为了导入winforms windows媒体播放器控件,因为WPF中的视频支持有多糟糕(这真的很糟糕,而且我不是'尝试做任何你想做的事情都很复杂。
WPF是DirectX,所以我希望有办法创建直接使用DirectX的东西,中间没有winforms图层。
You can use a winforms control in WPF, so I''d think you want to create a control that uses DX to do what you want, and then insert it that way. I''ve found that using those sort of controls can create rendering issues, I did that to import a winforms windows media player control, because of how bad the video support is in WPF ( it''s truly awful, and I wasn''t trying to do anything as complex as what you want to do ).
WPF IS DirectX though, so I''d have hoped there would be a way to create something that uses DirectX directly, without a winforms layer in the middle.
这篇关于带有帧访问权限的wpf视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!