ICodecComponentManager

概述

Codec组件管理类接口定义。

主要提供以下功能:

  • 获取Codec编解码组件数量以及编解码能力集表。

  • 创建/销毁Codec组件。

起始版本: 4.1

相关模块:Codec

汇总

Public 成员函数

名称 描述
GetComponentNum ([out] int count) 获取Codec编解码组件数量。
GetComponentCapabilityList ([out] struct CodecCompCapability[] capList, [in] int count) 获取编解码能力集表。
CreateComponent ([out] ICodecComponent component, [out] unsigned int componentId, [in] String compName, [in] long appData, [in] ICodecCallback callbacks) 创建Codec组件实例。
DestoryComponent ([in] unsigned int componentId) 销毁组件实例。

成员函数说明

CreateComponent()

ICodecComponentManager::CreateComponent ([out] ICodecComponent component, [out] unsigned int componentId, [in] String compName, [in] long appData, [in] ICodecCallback callbacks )

描述 创建Codec组件实例。

根据组件名称创建Codec组件实例。

起始版本: 4.1

参数:

名称 描述
component 指向Codec组件的指针。
componentId 创建组件的Id。
compName 组件名称。
appData 指向应用程序定义的值的指针,该值将在回调期间返回。
callbacks 回调接口,指向OMX_CALLBACKTYPE结构的指针,详见ICodecCallback

返回:

HDF_SUCCESS 表示创建组件成功。

HDF_ERR_INVALID_PARAM 表示参数无效,创建组件失败。

HDF_FAILURE 表示执行失败。

其他值表示底层返回失败,具体错误码详见OpenMAX IL定义的OMX_ERRORTYPE。

DestoryComponent()

ICodecComponentManager::DestoryComponent ([in] unsigned int componentId)

描述 销毁组件实例。

销毁指定的Codec组件。

起始版本: 4.1

参数:

名称 描述
componentId 需要销毁的Codec组件。

返回:

HDF_SUCCESS 表示销毁组件成功。

HDF_ERR_INVALID_PARAM 表示参数无效,销毁组件失败。

HDF_FAILURE 表示执行失败。

其他值表示底层返回失败,具体错误码详见OpenMAX IL定义的OMX_ERRORTYPE。

GetComponentCapabilityList()

ICodecComponentManager::GetComponentCapabilityList ([out] struct CodecCompCapability[] capList, [in] int count )

描述 获取编解码能力集表。

用户可通过此接口了解Codec模块提供了哪些编解码能力,对应的能力体现在CodecCompCapability结构体。

起始版本: 4.1

参数:

名称 描述
capList 返回全部组件的能力集表CodecCompCapability
count 编解码组件数量,由GetComponentNum获得。

返回:

HDF_SUCCESS 表示获取能力集表成功。

HDF_ERR_INVALID_PARAM 表示参数无效,获取能力集表失败。

HDF_FAILURE 表示执行失败。

其他值表示底层返回失败。

GetComponentNum()

ICodecComponentManager::GetComponentNum ([out] int count)

描述 获取Codec编解码组件数量。

通过此接口获取Codec编解码组件数量,用来获取全部编解码能力集。

起始版本: 4.1

参数:

名称 描述
count 编解码组件数量。

返回:

HDF_SUCCESS 表示获取编解码组件数量成功。

HDF_ERR_INVALID_PARAM 表示参数无效,获取编解码组件数量失败。

HDF_FAILURE 表示执行失败。

其他值表示底层返回失败。