Advertisement
Guest User

How to programatically disable the auto-focus of a webcam

a guest
Dec 4th, 2011
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. IAMCameraControl *pCameraControl;
  2. HRESULT hr;
  3. hr = pFilter->QueryInterface(IID_IAMCameraControl, (void **)&pCameraControl);
  4. if (hr == S_OK) {
  5. long defaultFocusValue;
  6. hr = pCameraControl->GetRange(CameraControl_Focus,
  7. NULL, // min
  8. NULL, // max
  9. NULL, // minstep
  10. &defaultFocusValue, // default
  11. NULL); // capflags
  12. hr = pCameraControl->Set(CameraControl_Focus, // property
  13. defaultFocusValue, // value
  14. CameraControl_Flags_Manual);
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement