CMediaSample::SetMediaType
Microsoft DirectShow 9.0 |
CMediaSample::SetMediaType
The SetMediaType method sets the media type for the sample. This method implements the IMediaSample::SetMediaType method.
Syntax
HRESULT SetMediaType( AM_MEDIA_TYPE *pMediaType );
Parameters
pMediaType
Pointer to an AM_MEDIA_TYPE structure.
Return Value
Returns one of the HRESULT values shown in the following table.
Value | Description |
S_OK | Success |
E_OUTOFMEMORY | Insufficient memory |
Remarks
This method sets the CMediaSample::m_pMediaType member variable, which specifies the media type, and the CMediaSample::m_dwFlags member variable, which specifies whether the media type has changed.
This method makes a copy of the AM_MEDIA_TYPE structure.
Requirements
** Header:** Declared in Amfilter.h; include Streams.h.
** Library:** Use Strmbase.lib (retail builds) or Strmbasd.lib (debug builds).
See Also