为什么WIN7下DirectShow摄像头打不开

Strong08 2012-12-10 11:15:51
为什么WIN7下DirectShow摄像头打不开,注释如下代码就可以打开了,但是注释这段代码应该有问题哦
// Fix upsidedown video // If we are using a still pin, ask for a picture
if (videoControl != null)
{
VideoControlFlags pCapsFlags;

IPin pPin = DsFindPin.ByCategory(capFilter, PinCategory.Capture, 0);
hr = videoControl.GetCaps(pPin, out pCapsFlags);
DsError.ThrowExceptionForHR(hr);

if ((pCapsFlags & VideoControlFlags.FlipVertical) > 0)
{
hr = videoControl.GetMode(pPin, out pCapsFlags);
DsError.ThrowExceptionForHR(hr);
hr = videoControl.SetMode(pPin, 0);// Tell the camera to send an image
}
}
...全文
209 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
Strong08 2012-12-13
  • 打赏
  • 举报
回复
自己给自己顶下哦,寻找高手~~

110,536

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧