Microsoft DirectX 8.0 |
The IComponentType interface is implemented on ComponentType objects, which contains methods for setting and retrieving various properties for a Component. Every Component object has an associated ComponentType object that is set or retrieved with the get_Type and put_Type methods.
MethodName Description Clone Creates a new copy of this component type. get_Category Retrieves the component category. get_MediaFormatType Retrieves the DirectShow media format type as a BSTR. get__MediaFormatType Retrieves the DirectShow media format type as a GUID. get_MediaMajorType Retrieves the DirectShow media major type as a BSTR. get__MediaMajorType Retrieves the DirectShow media major type as a GUID. get_MediaSubType Retrieves the DirectShow media subtype as a BSTR. get__MediaSubType Retrieves the DirectShow media subtype as a GUID. get_MediaType Retrieves the DirectShow AM_MEDIA_TYPE media type structure for the component. put_Category Sets the component category. put_MediaFormatType Sets the DirectShow media format type. put__MediaFormatType Sets the DirectShow media format type. put_MediaMajorType Sets the DirectShow media major type. put__MediaMajorType Sets the DirectShow media major type. put_MediaSubType Sets the DirectShow media subtype. put__MediaSubType Sets the DirectShow media subtype. put_MediaType Sets the DirectShow AM_MEDIA_TYPE media type structure for the component.
Creates a new copy of this component type.
Syntax
HRESULT Clone( IComponentType** NewCT );
Parameters
- NewCT
- [out, retval] Address of the IComponentType interface pointer that will be set to the returned interface.
Return Value
Returns S_OK if successful. If the method fails, error information can be retrieved using the standard COM IErrorInfo interface.
Retrieves the component category.
Syntax
HRESULT get_Category( ComponentCategory* Category );
Parameters
- Category
- [out, retval] Pointer to a ComponentCategory datatype that will receive the category.
Return Value
Returns S_OK if successful. If the method fails, error information can be retrieved using the standard COM IErrorInfo interface.
Remarks
The ComponentCategory enum is defined in bdatypes.h as follows:typedef enum ComponentCategory { CategoryNotSet = -1, CategoryOther = 0, CategoryVideo = 1, CategoryAudio = 2, CategoryText = 3, CategoryData = 4, } ComponentCategory;
Retrieves the DirectShow media format type as a BSTR.
Syntax
HRESULT get_MediaFormatType( BSTR* MediaFormatType );
Parameters
- MediaFormatType
- [out, retval] Pointer to a BSTR that will receive the GUID.
Return Value
Returns S_OK if successful. If the method fails, error information can be retrieved using the standard COM IErrorInfo interface.
Retrieves the DirectShow media format type as a GUID.
Syntax
HRESULT get__MediaFormatType( GUID *MediaFormatType );
Parameters
- MediaFormatType
- [out, retval] Pointer to a GUID that will receive the format type.
Return Value
Returns S_OK if successful. If the method fails, error information can be retrieved using the standard COM IErrorInfo interface.
Remarks
This method is available through C++ only. Note the two underscores in the method name as compared to the one underscore for the method that uses a BSTR as a parameter.
Retrieves the DirectShow media major type as a BSTR.
Syntax
HRESULT get_MediaMajorType( BSTR* MediaMajorType );
Parameters
- MediaMajorType
- [out, retval] Pointer to a BSTR that will receive the GUID.
Return Value
Returns S_OK if successful. If the method fails, error information can be retrieved using the standard COM IErrorInfo interface.
Retrieves the DirectShow media format type as a GUID.
Syntax
HRESULT get__MediaMajorType( GUID *MediaMajorType );
Parameters
- MediaMajorType
- [out, retval] Pointer to a GUID that will receive the major type.
Return Value
Returns S_OK if successful. If the method fails, error information can be retrieved using the standard COM IErrorInfo interface.
Remarks
This method is available through C++ only. Note the two underscores in the method name as compared to the one underscore for the method that uses a BSTR as a parameter.
Retrieves the DirectShow media subtype as a BSTR.
Syntax
HRESULT get_MediaSubType( BSTR* MediaSubType );
Parameters
- MediaSubType
- [out, retval] Pointer to a BSTR that will receive the GUID.
Return Value
Returns S_OK if successful. If the method fails, error information can be retrieved using the standard COM IErrorInfo interface.
Retrieves the DirectShow media subtype as a GUID.
Syntax
HRESULT get__MediaSubType( GUID *MediaSubType );
Parameters
- MediaSubType
- [out, retval] Pointer to a GUID that will receive the major type.
Return Value
Returns S_OK if successful. If the method fails, error information can be retrieved using the standard COM IErrorInfo interface.
Remarks
This method is available through C++ only. Note the two underscores in the method name as compared to the one underscore for the method that uses a BSTR as a parameter.
Retrieves the DirectShow AM_MEDIA_TYPE media type structure for the component.
Syntax
HRESULT get_MediaType( AM_MEDIA_TYPE* MediaType );
Parameters
- MediaType
- [out, retval] Pointer to an AM_MEDIA_TYPE structure that will be filled in with the values associated with the current ComponentType.
Return Value
Returns S_OK if successful. If the method fails, error information can be retrieved using the standard COM IErrorInfo interface.
Sets the component category.
Syntax
HRESULT put_Category( ComponentCategory Category );
Parameters
- Category
- [in] A ComponentCategory value that specifies the new category for this component type.
Return Value
Returns S_OK if successful. If the method fails, error information can be retrieved using the standard COM IErrorInfo interface.
Remarks
The ComponentCategory enum is defined in bdatypes.h as follows:typedef enum ComponentCategory { CategoryNotSet = -1, CategoryOther = 0, CategoryVideo = 1, CategoryAudio = 2, CategoryText = 3, CategoryData = 4, } ComponentCategory;
Sets the DirectShow media format type.
Syntax
HRESULT put_MediaFormatType( BSTR MediaFormatType );
Parameters
- MediaFormatType
- [in] BSTR that specifies the GUID.
Return Value
Returns S_OK if successful. If the method fails, error information can be retrieved using the standard COM IErrorInfo interface.
Sets the DirectShow media format type.
Syntax
HRESULT put__MediaFormatType( REFCLSID MediaFormatType );
Parameters
- MediaFormatType
- [in] REFCLSID that specifies the media format type.
Return Value
Returns S_OK if successful. If the method fails, error information can be retrieved using the standard COM IErrorInfo interface.
Remarks
This method is available through C++ only. Note the two underscores in the method name as compared to the one underscore for the method that uses a BSTR as a parameter.
Sets the DirectShow media major type.
Syntax
HRESULT put_MediaMajorType( BSTR MediaMajorType );
Parameters
- MediaMajorType
- [in] BSTR that specifies the GUID.
Return Value
Returns S_OK if successful. If the method fails, error information can be retrieved using the standard COM IErrorInfo interface.
Sets the DirectShow media major type.
Syntax
HRESULT put__MediaMajorType( REFCLSID MediaMajorType );
Parameters
- MediaMajorType
- [in] REFCLSID that specifies the media major type.
Return Value
Returns S_OK if successful. If the method fails, error information can be retrieved using the standard COM IErrorInfo interface.
Remarks
This method is available through C++ only. Note the two underscores in the method name as compared to the one underscore for the method that uses a BSTR as a parameter.
Sets the DirectShow media subtype.
Syntax
HRESULT put_MediaSubType( BSTR MediaSubType );
Parameters
- MediaSubType
- [in] BSTR that specifies the GUID.
Return Value
Returns S_OK if successful. If the method fails, error information can be retrieved using the standard COM IErrorInfo interface.
Sets the DirectShow media subtype.
Syntax
HRESULT put__MediaSubType( REFCLSID MediaSubType );
Parameters
- MediaSubType
- [in] REFCLSID that specifies the media sub type.
Return Value
Returns S_OK if successful. If the method fails, error information can be retrieved using the standard COM IErrorInfo interface.
Remarks
This method is available through C++ only. Note the two underscores in the method name as compared to the one underscore for the method that uses a BSTR as a parameter.
Sets the DirectShow AM_MEDIA_TYPE media type structure for the component.
Syntax
HRESULT put_MediaType( AM_MEDIA_TYPE MediaType );
Parameters
- MediaType
- [in] AM_MEDIA_TYPE structure that specifies the major type, subtype, format, etc.
Return Value
Returns S_OK if successful. If the method fails, error information can be retrieved using the standard COM IErrorInfo interface.