View Full Version : Gain control

September 6, 2005, 18:28:46
Hi, I'm not sure that's the right place to post this question... I'm tryin to control the gain property of my DFK21F04 through a code made by myself and so not with the imaging control library.

I do the following:

IAMVideoProcAmp *pProcAmp =NULL;
hr = m_pSrcFilter->QueryInterface(IID_IAMVideoProcAmp, (void **)&pProcAmp);

hr is 0 and I get the working pointer to ProcAmp

now when I try to simply do this:

hr = pProcAmp->GetRange(VideoProcAmp_Brightness,&Min,&Max,&Stepping,&Def,&CapsFlags);

all works fine, but when I try to get or set infos on the VideoProcAmp_Gain doing this:

hr = pProcAmp->GetRange(VideoProcAmp_Gain,&Min,&Max,&Stepping,&Def,&CapsFlags);

I get in this error

hr = -2147023728
from DX Error lookup:
Description: The specified property ID is not supported for the specified property set."

I've seen I can set the Gain property in the IC Imaging Control software that came with the camera.... Is there any other way to control the gain property other than that tried upper?

Many Thanks,
Juri Capovilla

Stefan Geissler
September 7, 2005, 08:59:19
Hello Juri,

The VideoProcAmp_Gain is not supported by the DCAM camera. It has been mapped to VideoProcAmp_Contrast. This was done in DirectX 7, because this version had no VideoProcAmp_Gain. So use VideoProcAmp_Contrast to control the gain of your camera.