Freigeben über


CMediaType::CMediaType

 
Microsoft DirectShow 9.0

CMediaType::CMediaType

Constructor method.

Syntax

  CMediaType(void);

CMediaType(
    const GUID *majortype
);

CMediaType(
    const AM_MEDIA_TYPE& mtype,
    HRESULT *phr = NULL
);

CMediaType(
    const CMediaType& cmtype,
    HRESULT *phr = NULL
);

Parameters

majortype

Pointer to a major type GUID. The constructor initializes the major type GUID to this value.

mtype

Reference to an AM_MEDIA_TYPE structure. The constructor copies the media type to the new object, including the format block, if any.

cmtype

Reference to a CMediaType object. The constructor copies the media type to the new object, including the format block, if any.

phr

Pointer to a variable that receives an HRESULT value. This parameter can be a NULL pointer. Otherwise, the caller must set the value to S_OK before calling the constructor. If the constructor fails, it sets the value to a failure code.

Remarks

The constructor calls the CMediaType::InitMediaType method to initialize the media type.

Requirements

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

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

See Also