DirectShow Animated Header -- IAMVideoControl Interface DirectShow Animated Header -- IAMVideoControl Interface* Microsoft DirectShow SDK
*Index  *Topic Contents
*Previous Topic: IAMVideoCompression
*Next Topic: IAMVideoCutListElement Interface

IAMVideoControl Interface


The IAMVideoControl interface allows you to flip a picture horizontally and/or vertically, to set up a stream so it can capture from an external trigger, for example, a push button on a camera, to simulate an external trigger in software, and to list the available frame rates.

This interface uses the video control flags in the VideoControlFlags enumeration.

When to Implement

Implement this interface when your filter needs to control the video image or to list the frame rates.

When to Use

Use this interface when your application runs on hardware which is capable of flipping and external triggering.

Methods in Vtable Order
IUnknown methods Description
QueryInterface Retrieves pointers to supported interfaces.
AddRef Increments the reference count.
Release Decrements the reference count.
IAMVideoControl methods Description
GetCaps Retrieves the capabilities of the underlying hardware.
SetMode Sets the video control mode of operation.
GetMode Retrieves the video control mode of operation.
GetCurrentActualFrameRate Retrieves the actual frame rate at which the device is streaming. For some devices, such as USB (Universal Serial Bus) and IEEE 1394 cameras, where the maximum framerate may be limited due to bandwidth availability. This is only available during video streaming.
GetMaxAvailableFrameRate Retrieves the maximum frame rate currently available based on bus bandwidth usage, for connections such as USB and 1394 camera devices where the maximum framerate may be limited due to bandwidth availability.
GetFrameRateList Retrieves a list of available frame rates.


IAMVideoControl::GetCaps

IAMVideoControl Interface

Retrieves the capabilities of the underlying hardware.

HRESULT GetCaps (
  IPin *pPin,
  long *pCapsFlags
  );

Parameters
pPin
[in] Pointer to the pin to query capabilities from.
pCapsFlags
[out] Pointer to a value representing a combination of the flags from the VideoControlFlags enumeration.
Return Values

Returns an HRESULT value that depends on the implementation of the interface.

Remarks

Possible capabilities include one or more of the following: flipping the picture horizontally, flipping the picture vertically, enabling external triggers, and simulating external triggers.


IAMVideoControl::GetCurrentActualFrameRate

IAMVideoControl Interface

Retrieves the actual frame rate, expressed as a frame duration in 100 nS units. USB (Universal Serial Bus) and IEEE 1394 cameras may provide lower frame rates than requested, due to bandwidth availability. This is only available during video streaming.

HRESULT GetCurrentActualFrameRate (
  IPin *pPin,
  LONGLONG *ActualFrameRate
  );

Parameters
pPin
[in] Pointer to the pin to retrieve the frame rate from.
ActualFrameRate
[out] Pointer to the frame rate in frame duration in 100 nS units.
Return Values

Returns an HRESULT value that depends on the implementation of the interface.


IAMVideoControl::GetFrameRateList

IAMVideoControl Interface

Retrieves a list of available frame rates.

HRESULT GetFrameRateList (
  IPin *pPin,
  long iIndex,
  SIZE Dimensions,
  long *ListSize,
  LONGLONG ** FrameRates
  );

Parameters
pPin
[in] Pointer to the pin to query list of frame rates from.
iIndex
[in] The index of the format to query for frame rates. This index corresponds to the order in which formats are enumerated by IAMStreamConfig::GetStreamCaps. The value must range between 0 and the number of supported VIDEO_STREAM_CONFIG_CAPS structures returned by IAMStreamConfig::GetNumberOfCapabilities) -1.
Dimensions
[in] The frame's image size (width and height) in pixels.
ListSize
[out] Pointer to the number of elements in the list of frame rates.
FrameRates
[out] An array of frame rates in 100 nSec units. Can be NULL if only ListSize is wanted.
Return Values

Returns an HRESULT value that depends on the implementation of the interface.

Remarks

It is the responsibility of the caller to free the memory through a call to CoTaskMemFree.


IAMVideoControl::GetMaxAvailableFrameRate

IAMVideoControl Interface

Retrieves the maximum frame rate currently available, based on bus bandwidth usage for connections, such as USB (Universal Serial Bus) and IEEE 1394, where the maximum framerate may be limited due to bandwidth availability.

HRESULT GetMaxAvailableFrameRate(
  IPin *pPin,
  long iIndex,
  SIZE Dimensions,
  LONGLONG * MaxAvailableFrameRate
  );

Parameters
pPin
[in] Pointer to the pin to maximum frame rate from.
iIndex
[in] The index of the format to query for maximum frame rate. This index corresponds to the order in which formats are enumerated by IAMStreamConfig::GetStreamCaps. The value must range between 0 and the number of supported VIDEO_STREAM_CONFIG_CAPS structures returned by IAMStreamConfig::GetNumberOfCapabilities) -1.
Dimensions
[in] The frame's image size (width and height) in pixels.
MaxAvailableFrameRate
[out] Pointer to the maximum available frame rate in frame duration in 100 nS units.
Return Values

Returns an HRESULT value that depends on the implementation of the interface.


IAMVideoControl::GetMode

IAMVideoControl Interface

Retrieves the video control mode of operation.

HRESULT GetMode (
  IPin *pPin,
  long *Mode
  );

Parameters
pPin
[in] Pointer to the pin to retrieve the video control mode from.
Mode
[out] Pointer to a value representing a combination of the flags from the VideoControlFlags enumeration, which specify the video control mode.
Return Values

Returns an HRESULT value that depends on the implementation of the interface.

Remarks

Possible modes of operation include one or more of the following: flip the picture horizontally, flip the picture vertically, enable external triggers, and simulate external triggers.


IAMVideoControl::SetMode

IAMVideoControl Interface

Sets the video control mode of operation.

HRESULT SetMode (
  IPin *pPin,
  long *Mode
  );

Parameters
pPin
[in] Pointer to the pin to set the video control mode on.
Mode
[in] Pointer to a value specifying a combination of the flags from the VideoControlFlags enumeration to set the video control mode.
Return Values

Returns an HRESULT value that depends on the implementation of the interface.

Remarks

Possible modes of operation include one or more of the following: flip the picture horizontally, flip the picture vertically, enable external triggers, and simulate external triggers.

© 1998 Microsoft Corporation. All rights reserved. Terms of Use.

*Top of Page