DirectShow关掉自动曝光(手动设置曝光值)代码如下所示:

1
2
3
4
5
6
7
8
9
IBaseFilter* pBF;
// Bind Device Filter. We know the device because the id was passed in
if (!BindFilter(iDeviceID, &pBF)) {
return S_FALSE;
}

IAMCameraControl *pCtrl;
pBF->QueryInterface(IID_IAMCameraControl, (void **)&pCtrl );
pCtrl->Set( CameraControl_Exposure, -10, CameraControl_Flags_Manual ); // -10为手动设置的曝光值