Hi friends, I'm looking for Autofocus API for DirectShow on ES400. My partner is not able to make it works. He uses these parameters :
Set(6, defaultValue, 1) : 6 is CameraControl_Focus / 1 is CameraControl_Flags_Auto / And defaultValue is not used cause flag is auto (it equals 200).
And he gets this erros : 0x80070057 Can someone provide me with a sample please ? Many thanks.
Autofocus API sample |
3 Replies
Hi Vijay, The partner asks me this clarification. Have you got any idea ?
Could you please provide us the int value for VideoProcAmp_AutoFocus property?
Into strmif.h from windows mobile 6.5.3 DTK there is the following enum but no reference to AutoFocus:
typedef
enum tagVideoProcAmpProperty
{ VideoProcAmp_Brightness = 0,
VideoProcAmp_Contrast = VideoProcAmp_Brightness + 1,
VideoProcAmp_Hue = VideoProcAmp_Contrast + 1,
VideoProcAmp_Saturation = VideoProcAmp_Hue + 1,
VideoProcAmp_Sharpness = VideoProcAmp_Saturation + 1,
VideoProcAmp_Gamma = VideoProcAmp_Sharpness + 1,
VideoProcAmp_ColorEnable = VideoProcAmp_Gamma + 1,
VideoProcAmp_WhiteBalance = VideoProcAmp_ColorEnable + 1,
VideoProcAmp_BacklightCompensation = VideoProcAmp_WhiteBalance + 1
} VideoProcAmpProperty;
Hi Matthieu, The int value for VideoProcAmp_AutoFocus property is 25, this property is defined as ENUM_AUTO_FOCUS in enum CUST_DEV_PROP (file:adapterprops.h,in cameradriver module). Auto focus takes ~1 sec to take effect, so after setting this property you need to wait 1sec before calling the autofocus again. Thanks, Vijay
Hi Matthieu,
There is a custom defined property value for autofocus - VideoProcAmp_AutoFocus
Have you tried the following: hr = ->Set(VideoProcAmp_AutoFocus, 0, CameraControl_Flags_Auto); if(hr !=S_OK ){ RETAILMSG (1, (TEXT("Failed to start AF - %d\n"),GetLastError())); }
Thanks, Vijay