为什么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
}
}
// 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
}
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货