次の方法で共有


CMediaSample::SetMediaType (Compact 2013)

3/26/2014

Sets the media type for the CMediaSample object.

Syntax

HRESULT SetMediaType(
  AM_MEDIA_TYPE* pMediaType 
);

Parameters

  • pMediaType
    Pointer to a pointer to a media type structure to be set.

Return Value

Returns an HRESULT value.

Remarks

This member function implements the IMediaSample::SetMediaType method.

It deletes the previous media type if one exists, makes a copy of the media type passed in, sets m_pMediaType to the copy of the media type, and sets the value of the m_dwFlags Sample_TypeChanged flag to TRUE.

Requirements

Header

dshow.h,
Streams.h

Library

ole32.lib,
Ole32auth.lib,
Strmbase.lib,
Strmiids.lib,
uuid.lib

See Also

Reference

CMediaSample Class