Microsoft DirectX 8.1 (C++)

IAMStreamConfig::GetNumberOfCapabilities

The GetNumberOfCapabilities method retrieves the number of format capabilities that this pin supports.

Syntax

HRESULT GetNumberOfCapabilities(
  int *piCount,
  int *piSize
);

Parameters

piCount

[out] Pointer to a variable that receives the number of format capabilities.

piSize

[out] Pointer to a variable that receives the size of the configuration structure in bytes. See Remarks for more information.

Return Values

Returns an HRESULT value. Possible values include the following.

Return code Description
S_OK Success.
E_POINTER NULL pointer value.
VFW_E_NOT_CONNECTED The input pin is not connected.

Remarks

An output pin can support more than one set of format capabilities. This method returns the total number of capabilities that the pin supports; the number is returned in the piCount parameter. To retrieve a particular set of capabilities, call the IAMStreamConfig::GetStreamCaps method. Format capabilities are indexed from zero, so the value returned in piCount is one more than the upper bound.

Depending on the pin's format type, the GetStreamCaps method returns either a VIDEO_STREAM_CONFIG_CAPS structure (for video) or an AUDIO_STREAM_CONFIG_CAPS structure (for audio). The piSize parameter receives the size of the structure, in bytes.

On some compression filters, this method fails if the filter's input pin is not connected.

See Also