CSourceStream::CheckMediaType

 
Microsoft DirectShow 9.0

CSourceStream::CheckMediaType

The CheckMediaType method determines if the pin accepts a specific media type. This method implements the pure virtual CBasePin::CheckMediaType method.

Syntax

  virtual HRESULT CheckMediaType(
    const CMediaType *pMediaType
);

Parameters

pMediaType

Pointer to a CMediaType object that contains the proposed media type.

Return Value

Returns one of the HRESULT values shown in the following table.

Value Description
S_OK This pin supports this media type.
E_FAIL The pin does not support this media type.

Remarks

By default, the pin supports a single media type. This method retrieves the supported type by calling the single-parameter version of the CSourceStream::GetMediaType method, and compares it to the proposed type. If your pin supports more than one media type, override this method.

Requirements

**  Header:** Declared in Source.h; include Streams.h.

**  Library:** Use Strmbase.lib (retail builds) or Strmbasd.lib (debug builds).

See Also