IPinConnection::DynamicQueryAccept method (strmif.h)

[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

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(
  [in] const AM_MEDIA_TYPE *pmt
);

Parameters

[in] pmt

Pointer to an AM_MEDIA_TYPE structure that specifies the media type.

Return value

Returns an HRESULT value. Possible values include the following.

Return code 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.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header strmif.h (include Dshow.h)
Library Strmiids.lib

See also

Dynamic Format Changes

Error and Success Codes

IPinConnection Interface