SetMediaType
Collapse the table of content
Expand the table of content

IMediaSample::SetMediaType method

The SetMediaType method sets the media type for the sample.

Syntax


HRESULT SetMediaType(
   AM_MEDIA_TYPE *pMediaType
);

Parameters

pMediaType

Pointer to an AM_MEDIA_TYPE structure that specifies the media type.

Return value

Returns an HRESULT value. Possible values include those shown in the following table.

Return codeDescription
S_OK

Success

E_OUTOFMEMORY

Insufficient memory

 

Remarks

By default, every sample has the same media type as the previous sample. (The pin connection determines the original media type.) Call this method to make limited changes to the media type, such as changing the palette. To make a significant change to the media type, the pins might need to reconnect and renegotiate the media type.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Strmif.h (include Dshow.h)

Library

Strmiids.lib

See also

Error and Success Codes
IMediaSample Interface

 

 

Show:
© 2016 Microsoft