Microsoft DirectX 8.1 (C++)

CMediaType::CMediaType

Constructor method.

Syntax

CMediaType(void);

CMediaType(
    const GUID *majortype
);

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

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

Parameters

majortype

Pointer to a major type GUID.

mtype

Reference to an AM_MEDIA_TYPE structure.

cmtype

Reference to a CMediaType object.

phr

Pointer to a variable that receives an HRESULT value. This parameter can be a NULL pointer. Otherwise, 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. If the majortype parameter is specified, the constructor initializes the major type GUID. If the mtype or cmtype parameter is specified, the constructor copies the media type information (including the format block) into the new object.

See Also