Dear ImageEn,
I need to manually focus a web camera that supports auto focus. I can do it from within the video dialog -> camera control -> set focus or
(ImageEnView1.IO.DShowParams.ShowPropertyPages(iepVideoInput, ietFilter,false)),
but I cannot do it programmatically. There is no focus setter in DShowParams as in a translated MS directshow file:
--Get/Set on the IAMCameraControl interface
code snippet from DShow.pas at http://www.micrel.cz/Dx/
(translation by Hiroyuki Hori
Mail: hori@ingjapan.ne.jp
Homepage: http://www.ingjapan.ne.jp/hori/index-e.html)
...
TCameraControlProperty = (
CameraControl_Pan,
CameraControl_Tilt,
CameraControl_Roll,
CameraControl_Zoom,
CameraControl_Exposure,
CameraControl_Iris,
CameraControl_Focus
);
TCameraControlFlags = (
CameraControl_Flags_Manual,
CameraControl_Flags_Auto
);
IAMCameraControl = interface(IUnknown)
['{C6E13370-30AC-11d0-A18C-00A0C9118956}']
function GetRange(Property_: TCameraControlProperty;
var pMin, pMax, pSteppingDelta, pDefault, pCapsFlags: Longint): HResult; stdcall;
function Set_(Property_: TCameraControlProperty; lValue: Longint;
Flags: TCameraControlFlags): HResult; stdcall;
function Get(Property_: TCameraControlProperty; var lValue: Longint;
var Flags: TCameraControlFlags): HResult; stdcall;
end;
...
What should I do to set focus manually?
Thanks
tbilalis