Microsoft DirectX 9.0 |
Given a list of media types, the TryMediaTypes method tries to complete a connection using one of those types.
Syntax
virtual HRESULT TryMediaTypes(
IPin *pReceivePin,
const CMediaType *pmt,
IEnumMediaTypes *pEnum
);
Parameters
pReceivePin
Pointer to the receiving pin's IPin interface.
pmt
Pointer to a CMediaType object that limits the possible media types, or NULL.
pEnum
Pointer to an IEnumMediaTypes interface, used to enumerate the list of media types.
Return Value
Returns an HRESULT value. Possible values include those in the following table.
Value | Description |
S_OK | Success. |
VFW_E_NO_ACCEPTABLE_TYPES | Did not find an acceptable media type. |
Remarks
For each media type returned by the IEnumMediaTypes interface, this method attempts a connection by calling the CBasePin::AttemptConnection method.
If the pmt parameter is non-NULL, the pin skips media types that do not match this type. The pmt parameter can specify a partial media type. A partial media type has a value of GUID_NULL for either the major type, the subtype, or the format. The GUID_NULL value matches any type, similar to a "wildcard" value.
See Also