IAMCameraControl Interface
Top  Previous  Next

Description

Provides programmatic control over the camera exposure.


Methods

HRESULT Get ( long Property
, long *pValue, long *Flags )
Retrieves the value of a specific camera control property.  

HRESULT Set ( long
Property, long lValue, long Flags );
Sets the value of a specific camera control property.  

HRESULT GetRange ( long
Property, long *pMin, long *pMax, long *pSteppingDelta, long *pDefault, long *pFlags );
Retrieves values associated with the range of a specified camera property.  


Parameters

Property  
[in] Value that specifies the camera property. Use the following value:  
CameraControl_Exposure - to control the camera's shutter.  
pValue / lValue  
[in/out] New value or pointer to the value of the specified property.  
pValue  
[in] New value of the specified property.  
pMin  
[out] Pointer to the minimum range for the specified property.  
pMax  
[out] Pointer to the maximum range for the specified property.  
pSteppingDelta  
[out] Pointer to the step size for the specified property.  
pDefault  
[out] Pointer to the default value of the specified property.  
Flags / pFlags  
[in/out] Value or pointer to the value indicating whether the camera property is automatic or manual:  
CameraControl_Flags_Auto - sets the property's automatic flag.  
CameraControl_Flags_Manual - sets the property's manual flag.  
 
Return Values

S_OK  
Success  
E_FAIL  
Failure.  
E_INVALIDARG  
Invalid argument.  
 

Example


This C++ code request a pointer to IAMCameraControl interface from the video capture filter and sets the shutter value to 512:

IAMCameraControl *pCameraControl;
HRESULT hr;
hr = pFilter->QueryInterface(IID_IAMCameraControl, (void **)&pCameraControl);
if(hr==S_OK)
{
   hr=pCameraControl->Set(CameraControl_Exposure,512,Camera Control_Flags_Manual);
}
 
 
Remarks

IAMCameraControl is a standard DirectShow interface. Refer to Microsoft DirectX SDK documentation for more details.