IAMVideoControl Interface
Top  Previous  Next

Description

Provides an ability to flip a picture horizontally and/or vertically, set up a trigger mode, issue the software trigger, and list the available frame rates.


Methods

HRESULT GetMode ( IPin *pPin
, long *pFlags )
Retrieves the video control properties.  

HRESULT SetMode ( IPin
*pPin, long Flags )
Sets the video control properties.  

HRESULT GetCaps ( IPin
*pPin, long *pFlags )
Requests availability of the video control properties.  
 
HRESULT GetCurrentActualFrameRate ( IPin
*pPin, LONGLONG *pFrameRate )
Retrieves the actual frame rate, expressed as a frame duration in 100-nanosecond units.  
 
HRESULT GetFrameRateList ( IPin
*pPin, long iIndex, SIZE Dimensions, long *ListSize, LONGLONG **FrameRates )
Retrieves a list of available frame rates for the specified video mode.  
 
HRESULT GetMaxAvailableFrameRate( IPin
*pPin, long iIndex, SIZE Dimensions, LONGLONG *pFrameRate )
Retrieves the maximum frame rate available for the specified video mode.  

Parameters

pPin  
[in] Pointer to the video capture pin.  
pFlags / Flags  
[in/out] New value or pointer to the value specifying a combination of the video control flags:  
VideoControlFlag_FlipHorizontal - specifies that the picture is flipped horizontally.  
VideoControlFlag_FlipVertical - specifies that the picture is flipped vertically.  
VideoControlFlag_ExternalTriggerEnable - specifies that the camera is set to the trigger mode.  
VideoControlFlag_Trigger - issues a software trigger signal.  
pFrameRate  
[in/out] Pointer to the frame rate. The frame rate is expressed as frame duration in 100-nanosecond units.  
iIndex  
[in] Index of the video mode to query for the frame rates.  
Dimensions  
[in] Frame image size (width and height) in pixels  
ListSize  
[out] Pointer to the number of elements in the list of frame rates.  
FrameRates  
[in] Address of a pointer to an array of frame rates in 100-nanosecond units.  
 
 
Return Values

S_OK  
Success  
E_FAIL  
Failure.  
E_INVALIDARG  
Invalid argument.  
 

Example


This C++ code request a pointer to IAMVideoControl interface from the video capture filter, and sets the camera into the trigger mode with the horizontal image flipping:

IAMVideoProcAmp *pVideoControl;
HRESULT hr;
hr = pFilter->QueryInterface(IID_IAMVideoControl, (void **)&pVideoControl);
if(hr==S_OK)
{
   hr=pVideoControl->Set(VideoProcAmp_Gain,0,VideoProcAmp_Flags_Auto);
   hr=pVideoControl->Set(VideoProcAmp_Brightess,64,VideoProcAmp_Flags_Manual);
}
 
 
Remarks

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