WPF中的视频捕获 [英] video capture in wpf
本文介绍了WPF中的视频捕获的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在引用链接 DirectX.Capture类库 [ ^ ]
用于视频捕获并在预览按钮上单击我写"
capture.PreviewWindow = image1.Source;
错误在哪里
无法将类型"System.Windows.Media.ImageSource"隐式转换为"System.Windows.Forms.Control" ...
我也参考
在WPF中从网络摄像头捕获视频的问题 [
i am refering the link DirectX.Capture Class Library[^]
for video capture and on preview button click i write
capture.PreviewWindow = image1.Source;
where the error is
Cannot implicitly convert type ''System.Windows.Media.ImageSource'' to ''System.Windows.Forms.Control''...
i also refer
problem with capturing video from webcam in WPF[^]
this link but i am not getting what i have to do..
what is solution in wpf...
my code is..
<pre lang="cs">try
{
if (capture.PreviewWindow == null)
{
capture.PreviewWindow = mediaElement1;
//mnuPreview.Checked = true;
}
else
{
capture.PreviewWindow = null;
// mnuPreview.Checked = false;
}
}
catch (Exception ex)
{
System.Windows.MessageBox.Show("Unable to enable/disable preview. Please submit a bug report.\n\n" + ex.Message + "\n\n" + ex.ToString());
}
推荐答案
http://msdn.microsoft.com/en-us/library/aa970915.aspx [
这篇关于WPF中的视频捕获的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文