Microsoft DirectX 8.0

IMediaParamInfo Interface

Retrieves information about the parameters that an object supports. The set of parameters that an object supports will not change over the lifetime of an application. To set parameter values, use the IMediaParams interface.

Methods in Vtable Order

IUnknown methodsDescription
QueryInterfaceRetrieves pointers to supported interfaces.
AddRefIncrements the reference count.
ReleaseDecrements the reference count.
IMediaParamInfo methodsDescription
GetParamCountRetrieves the number of parameters that the object supports.
GetParamInfoRetrieves information about a specified parameter.
GetParamTextRetrieves an array of text strings that describe the parameter.
GetNumTimeFormatsRetrieves the number of time formats that the object supports.
GetSupportedTimeFormatRetrieves a supported time format.
GetCurrentTimeFormatRetrieves the current time format.

IMediaParamInfo::GetParamCount

IMediaParamInfo Interface

Retrieves the number of parameters that the object supports.

Syntax

HRESULT GetParamCount(
    DWORD *pdwParams
);

Parameters

pdwParams
[out] Pointer to a variable that receives the number of parameters.

Return Value

Returns an HRESULT value. Possible values include the following:

S_OKSuccess.
E_POINTERNULL pointer argument.

IMediaParamInfo::GetParamInfo

IMediaParamInfo Interface

Retrieves information about a specified parameter.

Syntax

HRESULT GetParamInfo(
    DWORD dwParamIndex,
    MP_PARAMINFO *pInfo
);

Parameters

dwParamIndex
[in] Zero-based index of the parameter.
pInfo
[out] Pointer to an MP_PARAMINFO structure that is filled with the parameter information.

Return Value

Returns an HRESULT value. Possible values include the following:

S_OKSuccess.
E_INVALIDARGIndex out of range.
E_POINTERNULL pointer argument.

Remarks

Call the GetParamCount method to retrieve the number of parameters that the object supports.

IMediaParamInfo::GetParamText

IMediaParamInfo Interface

Retrieves a series of text strings that describe the parameter.

Syntax

HRESULT GetParamText(
    DWORD dwParamIndex,
    WCHAR **ppwchText
);

Parameters

dwParamIndex
[in] Zero-based index of the parameter.
ppwchText
[out] Address of a variable that receives a pointer to a series of Unicode™ strings.

Return Value

Returns an HRESULT value. Possible values include the following:

S_OKSuccess.
E_INVALIDARGIndex out of range.
E_POINTERNULL pointer argument.

Return Value

If the method succeeds, *ppwchText points to a string with the following format:

Name\0Unit\0Enum1\0Enum2\0...EnumN\0\0

where

The application can display these values within its user interface. They are not guaranteed to follow a consistent naming scheme. If the user's computer is using an international code page, the method might return a localized string corresponding to that code page.

The object uses the CoTaskMemAlloc function to allocate memory for the string. After you call this method, call CoTaskMemFree to free the buffer.

IMediaParamInfo::GetNumTimeFormats

IMediaParamInfo Interface

Retrieves the number of time formats that the object supports.

Syntax

HRESULT GetNumTimeFormats(
    DWORD *pdwNumTimeFormats
);

Parameters

pdwNumTimeFormats
[out] Pointer to a variable that receives the number of supported time formats.

Return Value

Returns an HRESULT value. Possible values include the following:

S_OKSuccess.
E_POINTERNULL pointer argument.

IMediaParamInfo::GetSupportedTimeFormat

IMediaParamInfo Interface

Retrieves a supported time format.

Syntax

HRESULT GetSupportedTimeFormat(
    DWORD dwFormatIndex,
    GUID *pguidTimeFormat
);

Parameters

dwFormatIndex
[in] Index of the time format to retrieve.
pguidTimeFormat
[out] Pointer to a variable that receives a time format GUID.

Return Value

Returns an HRESULT value. Possible values include the following:

S_OKSuccess.
E_INVALIDARGIndex out of range.
E_POINTERNULL pointer argument.

Remarks

Call the GetNumTimeFormats method to retrieve the number of time formats that the object supports.

IMediaParamInfo::GetCurrentTimeFormat

IMediaParamInfo Interface

Retrieves the current time format.

Syntax

HRESULT GetCurrentTimeFormat(
    GUID *pguidTimeFormat,
    MP_TIMEDATA *pTimeData
);

Parameters

pguidTimeFormat
[out] Pointer to a variable that receives a time format GUID.
pTimeData
[out] Pointer to a variable that receives an MP_TIMEDATA value specifying the unit of measure for the new format.

Return Value

Returns an HRESULT value. Possible values include the following:

S_OKSuccess.
E_POINTERNULL pointer argument.

Remarks

The meaning of the value returned in the pTimeData parameter depends on the time format GUID. For more information, see IMediaParams::SetTimeFormat.