| Microsoft DirectX 8.1 (C++) | 
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 describes the media type.
Return Value
Returns one of the following values.
| Return code | Description | 
| E_OUTOFMEMORY | Insufficient memory. | 
| S_OK | Success. | 
See Also