Microsoft DirectX 8.0 |
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.
IUnknown methods Description QueryInterface Retrieves pointers to supported interfaces. AddRef Increments the reference count. Release Decrements the reference count. IMediaParamInfo methods Description GetParamCount Retrieves the number of parameters that the object supports. GetParamInfo Retrieves information about a specified parameter. GetParamText Retrieves an array of text strings that describe the parameter. GetNumTimeFormats Retrieves the number of time formats that the object supports. GetSupportedTimeFormat Retrieves a supported time format. GetCurrentTimeFormat Retrieves the current time format.
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_OK Success. E_POINTER NULL pointer argument.
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_OK Success. E_INVALIDARG Index out of range. E_POINTER NULL pointer argument.
Remarks
Call the GetParamCount method to retrieve the number of parameters that the object supports.
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_OK Success. E_INVALIDARG Index out of range. E_POINTER NULL pointer argument.
Return Value
If the method succeeds, *ppwchText points to a string with the following format:
Name\0Unit\0Enum1\0Enum2\0...EnumN\0\0where
- Name is the name of the parameter.
- Unit is the name of the units; for example, milliseconds.
- Enum1 through EnumN are descriptive names for the parameter's enumerated values. (Applies only to parameters of type MPT_ENUM.)
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.
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_OK Success. E_POINTER NULL pointer argument.
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_OK Success. E_INVALIDARG Index out of range. E_POINTER NULL pointer argument.
Remarks
Call the GetNumTimeFormats method to retrieve the number of time formats that the object supports.
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_OK Success. E_POINTER NULL 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.