Export (0) Print
Expand All

CMediaSample.SetMediaType method

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.

Return codeDescription
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

Amfilter.h (include Streams.h)

Library

Strmbase.lib (retail builds);
Strmbasd.lib (debug builds)

See also

CMediaSample Class

 

 

Community Additions

ADD
Show:
© 2014 Microsoft