Microsoft DirectX 9.0

IPinConnection::DynamicQueryAccept

The DynamicQueryAccept method queries whether the pin can accept the specified media type while the graph is running with the current connection to this pin.

Syntax

HRESULT DynamicQueryAccept(
  const AM_MEDIA_TYPE *pmt
);

Parameters

pmt

[in] Pointer to an AM_MEDIA_TYPE structure that specifies the media type.

Return Value

Returns an HRESULT value. Possible values include the following.

Value Description
S_OK Media type is acceptable.
VFW_E_TYPE_NOT_ACCEPTED Media type is not acceptable.

Remarks

If this method succeeds, the pin can accept the media type on the next sample or in a call to IPin::ReceiveConnection.

An application or filter can call this method to determine whether the filter graph must be reconfigured. If the pin can accept the specified media type, there is no need to reconfigure the graph.

Although the IPin::QueryAccept method also determines whether a pin can accept a format type, it does not guarantee that the pin can switch to that format while the filter is running. If you need to switch formats while the filter is running, call DynamicQueryAccept instead.

See Also