diff --git a/en/device_api/hdi/codec/codec_common_type.h b/en/device_api/hdi/codec/codec_common_type.h
index 437273d4b3ec0057c62ad97d6bbae3ca669a5ac1..bb4f94f89f9a31e3ec744970879eb6a62272985a 100644
--- a/en/device_api/hdi/codec/codec_common_type.h
+++ b/en/device_api/hdi/codec/codec_common_type.h
@@ -51,63 +51,63 @@ extern "C" {
* @brief Enumerates the codec types.
*/
typedef enum {
- VIDEO_DECODER, /**< Video decoder */
- VIDEO_ENCODER, /**< Video encoder */
- AUDIO_DECODER, /**< Audio decoder */
- AUDIO_ENCODER, /**< Audio encoder */
- INVALID_TYPE, /**< Invalid type */
+ VIDEO_DECODER, /**< Video decoder. */
+ VIDEO_ENCODER, /**< Video encoder. */
+ AUDIO_DECODER, /**< Audio decoder. */
+ AUDIO_ENCODER, /**< Audio encoder. */
+ INVALID_TYPE, /**< Invalid type. */
} CodecType;
/**
* @brief Enumerates the codec profiles.
*/
typedef enum {
- INVALID_PROFILE = 0, /**< Invalid profile */
- AAC_LC_PROFILE = 0x1000, /**< AAC-Low Complex */
- AAC_MAIN_PROFILE, /**< AAC-Main */
- AAC_HE_V1_PROFILE, /**< HEAAC, AAC+, or AACPlusV1 */
- AAC_HE_V2_PROFILE, /**< AAC++ or AACPlusV2 */
- AAC_LD_PROFILE, /**< AAC-Low Delay */
- AAC_ELD_PROFILE, /**< AAC-Enhanced Low Delay */
- AVC_BASELINE_PROFILE = 0x2000, /**< H.264 Baseline */
- AVC_MAIN_PROFILE, /**< H.264 Main */
- AVC_HIGH_PROFILE, /**< H.264 High */
- HEVC_MAIN_PROFILE = 0x3000, /**< H.265 Main */
- HEVC_MAIN_10_PROFILE, /**< H.265 Main 10bit */
+ INVALID_PROFILE = 0, /**< Invalid profile. */
+ AAC_LC_PROFILE = 0x1000, /**< AAC-Low Complex. */
+ AAC_MAIN_PROFILE, /**< AAC-Main. */
+ AAC_HE_V1_PROFILE, /**< HEAAC, AAC+, or AACPlusV1. */
+ AAC_HE_V2_PROFILE, /**< AAC++ or AACPlusV2. */
+ AAC_LD_PROFILE, /**< AAC-Low Delay. */
+ AAC_ELD_PROFILE, /**< AAC-Enhanced Low Delay. */
+ AVC_BASELINE_PROFILE = 0x2000, /**< H.264 Baseline. */
+ AVC_MAIN_PROFILE, /**< H.264 Main. */
+ AVC_HIGH_PROFILE, /**< H.264 High. */
+ HEVC_MAIN_PROFILE = 0x3000, /**< H.265 Main. */
+ HEVC_MAIN_10_PROFILE, /**< H.265 Main 10bit. */
} Profile;
/**
* @brief Enumerates the audio sampling rates.
*/
typedef enum {
- AUD_SAMPLE_RATE_8000 = 8000, /**< 8 kHz */
- AUD_SAMPLE_RATE_12000 = 12000, /**< 12 kHz */
- AUD_SAMPLE_RATE_11025 = 11025, /**< 11.025 kHz */
- AUD_SAMPLE_RATE_16000 = 16000, /**< 16 kHz */
- AUD_SAMPLE_RATE_22050 = 22050, /**< 22.050 kHz */
- AUD_SAMPLE_RATE_24000 = 24000, /**< 24 kHz */
- AUD_SAMPLE_RATE_32000 = 32000, /**< 32 kHz */
- AUD_SAMPLE_RATE_44100 = 44100, /**< 44.1 kHz */
- AUD_SAMPLE_RATE_48000 = 48000, /**< 48 kHz */
- AUD_SAMPLE_RATE_64000 = 64000, /**< 64 kHz */
- AUD_SAMPLE_RATE_96000 = 96000, /**< 96 kHz */
- AUD_SAMPLE_RATE_INVALID, /**< Invalid sampling rate */
+ AUD_SAMPLE_RATE_8000 = 8000, /**< 8 kHz. */
+ AUD_SAMPLE_RATE_12000 = 12000, /**< 12 kHz. */
+ AUD_SAMPLE_RATE_11025 = 11025, /**< 11.025 kHz. */
+ AUD_SAMPLE_RATE_16000 = 16000, /**< 16 kHz. */
+ AUD_SAMPLE_RATE_22050 = 22050, /**< 22.050 kHz. */
+ AUD_SAMPLE_RATE_24000 = 24000, /**< 24 kHz. */
+ AUD_SAMPLE_RATE_32000 = 32000, /**< 32 kHz. */
+ AUD_SAMPLE_RATE_44100 = 44100, /**< 44.1 kHz. */
+ AUD_SAMPLE_RATE_48000 = 48000, /**< 48 kHz. */
+ AUD_SAMPLE_RATE_64000 = 64000, /**< 64 kHz. */
+ AUD_SAMPLE_RATE_96000 = 96000, /**< 96 kHz. */
+ AUD_SAMPLE_RATE_INVALID, /**< Invalid sampling rate. */
} AudioSampleRate;
/**
* @brief Defines the alignment.
*/
typedef struct {
- int32_t widthAlignment; /**< Value to align with the width */
- int32_t heightAlignment; /**< Value to align with the height */
+ int32_t widthAlignment; /**< Value to align with the width. */
+ int32_t heightAlignment; /**< Value to align with the height. */
} Alignment;
/**
* @brief Defines a rectangle.
*/
typedef struct {
- int32_t width; /**< Width of the rectangle */
- int32_t height; /**< Height of the rectangle */
+ int32_t width; /**< Width of the rectangle. */
+ int32_t height; /**< Height of the rectangle. */
} Rect;
/**
@@ -122,22 +122,22 @@ typedef struct {
* @brief Enumerates the playback capabilities.
*/
typedef enum {
- CODEC_CAP_ADAPTIVE_PLAYBACK = 0x1, /**< Adaptive playback */
- CODEC_CAP_SECURE_PLAYBACK = 0x2, /**< Secure playback */
- CODEC_CAP_TUNNEL_PLAYBACK = 0x4, /**< Tunnel playback */
- CODEC_CAP_MULTI_PLANE = 0x10000, /**< Multi-plane (video image plane and audio tunnel plane) playback */
+ CODEC_CAP_ADAPTIVE_PLAYBACK = 0x1, /**< Adaptive playback. */
+ CODEC_CAP_SECURE_PLAYBACK = 0x2, /**< Secure playback. */
+ CODEC_CAP_TUNNEL_PLAYBACK = 0x4, /**< Tunnel playback. */
+ CODEC_CAP_MULTI_PLANE = 0x10000, /**< Multi-plane (video image plane and audio tunnel plane) playback. */
} CodecCapsMask;
/**
* @brief Enumerates the codec processing modes.
*/
typedef enum {
- PROCESS_BLOCKING_INPUT_BUFFER = 0X1, /**< Input buffer in sync mode */
- PROCESS_BLOCKING_OUTPUT_BUFFER = 0X2, /**< Output buffer in sync mode */
- PROCESS_BLOCKING_CONTROL_FLOW = 0X4, /**< Control flow in sync mode */
- PROCESS_NONBLOCKING_INPUT_BUFFER = 0X100, /**< Input buffer in async mode */
- PROCESS_NONBLOCKING_OUTPUT_BUFFER = 0X200, /**< Output buffer in async mode */
- PROCESS_NONBLOCKING_CONTROL_FLOW = 0X400, /**< Control flow in async mode */
+ PROCESS_BLOCKING_INPUT_BUFFER = 0X1, /**< Input buffer in sync mode. */
+ PROCESS_BLOCKING_OUTPUT_BUFFER = 0X2, /**< Output buffer in sync mode. */
+ PROCESS_BLOCKING_CONTROL_FLOW = 0X4, /**< Control flow in sync mode. */
+ PROCESS_NONBLOCKING_INPUT_BUFFER = 0X100, /**< Input buffer in async mode. */
+ PROCESS_NONBLOCKING_OUTPUT_BUFFER = 0X200, /**< Output buffer in async mode. */
+ PROCESS_NONBLOCKING_CONTROL_FLOW = 0X400, /**< Control flow in async mode. */
} CodecProcessMode;
#ifdef __cplusplus
diff --git a/en/device_api/hdi/codec/codec_component_manager.h b/en/device_api/hdi/codec/codec_component_manager.h
index a233c055b3891818e917043def326b2e11c40ee0..7b967930a81d942927790813727138168b180656 100644
--- a/en/device_api/hdi/codec/codec_component_manager.h
+++ b/en/device_api/hdi/codec/codec_component_manager.h
@@ -120,7 +120,7 @@ struct CodecComponentManager {
*
* @since 3.1
*/
- int32_t (*DestoryComponent)(struct CodecComponentType *component);
+ int32_t (*DestroyComponent)(struct CodecComponentType *component);
};
/**
diff --git a/en/device_api/hdi/codec/codec_component_type.h b/en/device_api/hdi/codec/codec_component_type.h
index df88c1b7cdc40c11269abc537193430bf906b37d..465506f62b2e39d0897c337151eadaf3e4ca8ab3 100644
--- a/en/device_api/hdi/codec/codec_component_type.h
+++ b/en/device_api/hdi/codec/codec_component_type.h
@@ -85,17 +85,17 @@ typedef enum {
* For the packed sampling format, only the first data is used, and the data of each channel is interleaved.
*/
typedef enum {
- AUDIO_SAMPLE_FMT_U8, /**< Unsigned 8 bits, packed */
- AUDIO_SAMPLE_FMT_S16, /**< Signed 16 bits, packed */
- AUDIO_SAMPLE_FMT_S32, /**< Signed 32 bits, packed */
- AUDIO_SAMPLE_FMT_FLOAT, /**< Float, packed */
- AUDIO_SAMPLE_FMT_DOUBLE, /**< Double, packed */
- AUDIO_SAMPLE_FMT_U8P, /**< Unsigned 8 bits, planar */
- AUDIO_SAMPLE_FMT_S16P, /**< Signed 16 bits, planar */
- AUDIO_SAMPLE_FMT_S32P, /**< Signed 32 bits, planar */
- AUDIO_SAMPLE_FMT_FLOATP, /**< Float, planar */
- AUDIO_SAMPLE_FMT_DOUBLEP, /**< Double, planar */
- AUDIO_SAMPLE_FMT_INVALID, /**< Invalid sampling format */
+ AUDIO_SAMPLE_FMT_U8, /**< Unsigned 8 bits, packed. */
+ AUDIO_SAMPLE_FMT_S16, /**< Signed 16 bits, packed. */
+ AUDIO_SAMPLE_FMT_S32, /**< Signed 32 bits, packed. */
+ AUDIO_SAMPLE_FMT_FLOAT, /**< Float, packed. */
+ AUDIO_SAMPLE_FMT_DOUBLE, /**< Double, packed. */
+ AUDIO_SAMPLE_FMT_U8P, /**< Unsigned 8 bits, planar. */
+ AUDIO_SAMPLE_FMT_S16P, /**< Signed 16 bits, planar. */
+ AUDIO_SAMPLE_FMT_S32P, /**< Signed 32 bits, planar. */
+ AUDIO_SAMPLE_FMT_FLOATP, /**< Float, planar. */
+ AUDIO_SAMPLE_FMT_DOUBLEP, /**< Double, planar. */
+ AUDIO_SAMPLE_FMT_INVALID, /**< Invalid sampling format. */
} AudioSampleFormat;
/**
@@ -148,8 +148,8 @@ typedef struct {
* @brief Defines the audio and video encoding and decoding capabilities.
*/
typedef union {
- VideoPortCap video; /**< Video encoding and decoding capabilities */
- AudioPortCap audio; /**< Audio encoding and decoding capabilities */
+ VideoPortCap video; /**< Video encoding and decoding capabilities. */
+ AudioPortCap audio; /**< Audio encoding and decoding capabilities. */
} PortCap;
/**
@@ -195,8 +195,8 @@ enum CodecBufferType {
* @brief Enumerates the shared memory types.
*/
enum ShareMemTypes {
- READ_WRITE_TYPE = 0x1, /**< Readable and writable shared memory */
- READ_ONLY_TYPE = 0x2, /**< Readable shared memory */
+ READ_WRITE_TYPE = 0x1, /**< Readable and writable shared memory. */
+ READ_ONLY_TYPE = 0x2, /**< Readable shared memory. */
};
/**
@@ -223,10 +223,10 @@ struct OmxCodecBuffer {
* @brief Enumerates the extended codec indexes.
*/
enum OmxIndexCodecExType {
- OMX_IndexExtBufferTypeStartUnused = OMX_IndexKhronosExtensions + 0x00a00000, /**< Extended BufferType index */
- OMX_IndexParamSupportBufferType, /**< SupportBuffer */
- OMX_IndexParamUseBufferType, /**< UseBuffer */
- OMX_IndexParamGetBufferHandleUsage, /**< GetBufferHandleUsage */
+ OMX_IndexExtBufferTypeStartUnused = OMX_IndexKhronosExtensions + 0x00a00000, /**< Extended BufferType index. */
+ OMX_IndexParamSupportBufferType, /**< SupportBuffer. */
+ OMX_IndexParamUseBufferType, /**< UseBuffer. */
+ OMX_IndexParamGetBufferHandleUsage, /**< GetBufferHandleUsage. */
};
/**
@@ -262,30 +262,30 @@ struct EventInfo {
* @brief Defines the SupportBuffer.
*/
struct SupportBufferType {
- uint32_t size; /**< Size of the structure */
- union OMX_VERSIONTYPE version; /**< Component version */
- uint32_t portIndex; /**< Port index */
- uint32_t bufferTypes; /**< Supported buffer types */
+ uint32_t size; /**< Size of the structure. */
+ union OMX_VERSIONTYPE version; /**< Component version. */
+ uint32_t portIndex; /**< Port index. */
+ uint32_t bufferTypes; /**< Supported buffer types. */
};
/**
* @brief Define the UseBuffer.
*/
struct UseBufferType {
- uint32_t size; /**< Size of the structure */
- union OMX_VERSIONTYPE version; /**< Component version */
- uint32_t portIndex; /**< Port index */
- uint32_t bufferType; /**< Buffer type */
+ uint32_t size; /**< Size of the structure. */
+ union OMX_VERSIONTYPE version; /**< Component version. */
+ uint32_t portIndex; /**< Port index. */
+ uint32_t bufferType; /**< Buffer type. */
};
/**
* @brief Defines the BufferHandleUsage.
*/
struct GetBufferHandleUsageParams {
- uint32_t size; /**< Size of the structure */
- union OMX_VERSIONTYPE version; /**< Component version */
- uint32_t portIndex; /**< Port index */
- uint32_t usage; /**< Usage */
+ uint32_t size; /**< Size of the structure. */
+ union OMX_VERSIONTYPE version; /**< Component version. */
+ uint32_t portIndex; /**< Port index. */
+ uint32_t usage; /**< Usage. */
};
#ifdef __cplusplus
diff --git a/zh-cn/device_api/hdi/codec/codec_common_type.h b/zh-cn/device_api/hdi/codec/codec_common_type.h
index 0d9b6b911cb1e9038ccc29eb7d2145e1bc41721e..83cfd54657ab8f286dca243f9a2de647dfbe3ce0 100644
--- a/zh-cn/device_api/hdi/codec/codec_common_type.h
+++ b/zh-cn/device_api/hdi/codec/codec_common_type.h
@@ -48,96 +48,96 @@ extern "C" {
#endif /* __cplusplus */
/**
- * @brief 枚举编解码的类型
+ * @brief 枚举编解码的类型。
*/
typedef enum {
- VIDEO_DECODER, /**< 视频解码类型 */
- VIDEO_ENCODER, /**< 视频编码类型 */
- AUDIO_DECODER, /**< 音频解码类型 */
- AUDIO_ENCODER, /**< 音频编码类型 */
- INVALID_TYPE, /**< 无效类型 */
+ VIDEO_DECODER, /**< 视频解码类型。 */
+ VIDEO_ENCODER, /**< 视频编码类型。 */
+ AUDIO_DECODER, /**< 音频解码类型。 */
+ AUDIO_ENCODER, /**< 音频编码类型。 */
+ INVALID_TYPE, /**< 无效类型。 */
} CodecType;
/**
- * @brief 枚举Codec规格
+ * @brief 枚举Codec规格。
*/
typedef enum {
- INVALID_PROFILE = 0, /**< 无效的规格 */
- AAC_LC_PROFILE = 0x1000, /**< AAC低复杂度规格 */
- AAC_MAIN_PROFILE, /**< AAC主规格 */
- AAC_HE_V1_PROFILE, /**< AAC高效率和频带重现规格,又称为HEAAC,AAC+,或者AACPlusV1 */
- AAC_HE_V2_PROFILE, /**< AAC高效率和频带重现以及变量立体声规格,又称为AAC++或者AACPlusV2 */
- AAC_LD_PROFILE, /**< AAC低延迟规格 */
- AAC_ELD_PROFILE, /**< AAC增强型低延迟规格 */
- AVC_BASELINE_PROFILE = 0x2000, /**< H.264低规格 */
- AVC_MAIN_PROFILE, /**< H.264主规格 */
- AVC_HIGH_PROFILE, /**< H.264高规格 */
- HEVC_MAIN_PROFILE = 0x3000, /**< H.265主规格 */
- HEVC_MAIN_10_PROFILE, /**< H.265 10比特主规格 */
+ INVALID_PROFILE = 0, /**< 无效的规格。 */
+ AAC_LC_PROFILE = 0x1000, /**< AAC低复杂度规格。 */
+ AAC_MAIN_PROFILE, /**< AAC主规格。 */
+ AAC_HE_V1_PROFILE, /**< AAC高效率和频带重现规格,又称为HEAAC,AAC+,或者AACPlusV1。 */
+ AAC_HE_V2_PROFILE, /**< AAC高效率和频带重现以及变量立体声规格,又称为AAC++或者AACPlusV2。 */
+ AAC_LD_PROFILE, /**< AAC低延迟规格。 */
+ AAC_ELD_PROFILE, /**< AAC增强型低延迟规格。 */
+ AVC_BASELINE_PROFILE = 0x2000, /**< H.264低规格。 */
+ AVC_MAIN_PROFILE, /**< H.264主规格。 */
+ AVC_HIGH_PROFILE, /**< H.264高规格。 */
+ HEVC_MAIN_PROFILE = 0x3000, /**< H.265主规格。 */
+ HEVC_MAIN_10_PROFILE, /**< H.265 10比特主规格。 */
} Profile;
/**
- * @brief 枚举音频采样率
+ * @brief 枚举音频采样率。
*/
typedef enum {
- AUD_SAMPLE_RATE_8000 = 8000, /**< 8K采样率 */
- AUD_SAMPLE_RATE_12000 = 12000, /**< 12K采样率 */
- AUD_SAMPLE_RATE_11025 = 11025, /**< 11.025K采样率 */
- AUD_SAMPLE_RATE_16000 = 16000, /**< 16K采样率 */
- AUD_SAMPLE_RATE_22050 = 22050, /**< 22.050K采样率 */
- AUD_SAMPLE_RATE_24000 = 24000, /**< 24K采样率 */
- AUD_SAMPLE_RATE_32000 = 32000, /**< 32K采样率 */
- AUD_SAMPLE_RATE_44100 = 44100, /**< 44.1K采样率 */
- AUD_SAMPLE_RATE_48000 = 48000, /**< 48K采样率 */
- AUD_SAMPLE_RATE_64000 = 64000, /**< 64K采样率 */
- AUD_SAMPLE_RATE_96000 = 96000, /**< 96K采样率 */
- AUD_SAMPLE_RATE_INVALID, /**< 无效采样率 */
+ AUD_SAMPLE_RATE_8000 = 8000, /**< 8K采样率。 */
+ AUD_SAMPLE_RATE_12000 = 12000, /**< 12K采样率。 */
+ AUD_SAMPLE_RATE_11025 = 11025, /**< 11.025K采样率。 */
+ AUD_SAMPLE_RATE_16000 = 16000, /**< 16K采样率。 */
+ AUD_SAMPLE_RATE_22050 = 22050, /**< 22.050K采样率。 */
+ AUD_SAMPLE_RATE_24000 = 24000, /**< 24K采样率。 */
+ AUD_SAMPLE_RATE_32000 = 32000, /**< 32K采样率。 */
+ AUD_SAMPLE_RATE_44100 = 44100, /**< 44.1K采样率。 */
+ AUD_SAMPLE_RATE_48000 = 48000, /**< 48K采样率。 */
+ AUD_SAMPLE_RATE_64000 = 64000, /**< 64K采样率。 */
+ AUD_SAMPLE_RATE_96000 = 96000, /**< 96K采样率。 */
+ AUD_SAMPLE_RATE_INVALID, /**< 无效采样率。 */
} AudioSampleRate;
/**
-* @brief 对齐结构定义,包含宽高的对齐值
+* @brief 对齐结构定义,包含宽高的对齐值。
*/
typedef struct {
- int32_t widthAlignment; /**< 宽的对齐值 */
- int32_t heightAlignment; /**< 高的对齐值 */
+ int32_t widthAlignment; /**< 宽的对齐值。 */
+ int32_t heightAlignment; /**< 高的对齐值。 */
} Alignment;
/**
- * @brief 矩形的定义
+ * @brief 矩形的定义。
*/
typedef struct {
- int32_t width; /**< 矩形的宽 */
- int32_t height; /**< 矩形的高 */
+ int32_t width; /**< 矩形的宽。 */
+ int32_t height; /**< 矩形的高。 */
} Rect;
/**
- * @brief 取值范围的定义
+ * @brief 取值范围的定义。
*/
typedef struct {
- int32_t min; /**< 最小值 */
- int32_t max; /**< 最大值 */
+ int32_t min; /**< 最小值。 */
+ int32_t max; /**< 最大值。 */
} RangeValue;
/**
- * @brief 枚举播放能力
+ * @brief 枚举播放能力。
*/
typedef enum {
- CODEC_CAP_ADAPTIVE_PLAYBACK = 0x1, /**< 自适应播放能力 */
- CODEC_CAP_SECURE_PLAYBACK = 0x2, /**< 安全播放能力 */
- CODEC_CAP_TUNNEL_PLAYBACK = 0x4, /**< 通道播放能力 */
- CODEC_CAP_MULTI_PLANE = 0x10000, /**< 视频图像平面/音频通道平面能力 */
+ CODEC_CAP_ADAPTIVE_PLAYBACK = 0x1, /**< 自适应播放能力。 */
+ CODEC_CAP_SECURE_PLAYBACK = 0x2, /**< 安全播放能力。 */
+ CODEC_CAP_TUNNEL_PLAYBACK = 0x4, /**< 通道播放能力。 */
+ CODEC_CAP_MULTI_PLANE = 0x10000, /**< 视频图像平面/音频通道平面能力。 */
} CodecCapsMask;
/**
- * @brief 枚举编解码处理模式
+ * @brief 枚举编解码处理模式。
*/
typedef enum {
- PROCESS_BLOCKING_INPUT_BUFFER = 0X1, /**< 同步模式输入buffer */
- PROCESS_BLOCKING_OUTPUT_BUFFER = 0X2, /**< 同步模式输出buffer */
- PROCESS_BLOCKING_CONTROL_FLOW = 0X4, /**< 同步模式控制流 */
- PROCESS_NONBLOCKING_INPUT_BUFFER = 0X100, /**< 异步模式输入buffer */
- PROCESS_NONBLOCKING_OUTPUT_BUFFER = 0X200, /**< 异步模式输出buffer */
- PROCESS_NONBLOCKING_CONTROL_FLOW = 0X400, /**< 异步模式控制流 */
+ PROCESS_BLOCKING_INPUT_BUFFER = 0X1, /**< 同步模式输入buffer。 */
+ PROCESS_BLOCKING_OUTPUT_BUFFER = 0X2, /**< 同步模式输出buffer。 */
+ PROCESS_BLOCKING_CONTROL_FLOW = 0X4, /**< 同步模式控制流。 */
+ PROCESS_NONBLOCKING_INPUT_BUFFER = 0X100, /**< 异步模式输入buffer。 */
+ PROCESS_NONBLOCKING_OUTPUT_BUFFER = 0X200, /**< 异步模式输出buffer。 */
+ PROCESS_NONBLOCKING_CONTROL_FLOW = 0X400, /**< 异步模式控制流。 */
} CodecProcessMode;
#ifdef __cplusplus
diff --git a/zh-cn/device_api/hdi/codec/codec_component_manager.h b/zh-cn/device_api/hdi/codec/codec_component_manager.h
index ddf40378b07007bf9decd7b037a38a01add87440..5135e3a2e91461789a5a9803c2040bed6775c0bc 100644
--- a/zh-cn/device_api/hdi/codec/codec_component_manager.h
+++ b/zh-cn/device_api/hdi/codec/codec_component_manager.h
@@ -118,7 +118,7 @@ struct CodecComponentManager {
*
* @since 3.1
*/
- int32_t (*DestoryComponent)(struct CodecComponentType *component);
+ int32_t (*DestroyComponent)(struct CodecComponentType *component);
};
/**
diff --git a/zh-cn/device_api/hdi/codec/codec_component_type.h b/zh-cn/device_api/hdi/codec/codec_component_type.h
index 68858eb89ba4a03b400a4074ac241effd83a9b8f..7d63e77d4df5d9a4b67b19e5a1ce3ef5371f2fb8 100644
--- a/zh-cn/device_api/hdi/codec/codec_component_type.h
+++ b/zh-cn/device_api/hdi/codec/codec_component_type.h
@@ -52,234 +52,234 @@ extern "C" {
#endif /* __cplusplus */
/**
- * @brief 采样格式最大值
+ * @brief 采样格式最大值。
*/
#define SAMPLE_FMT_NUM 32
/**
- * @brief 定义UUID长度
+ * @brief 定义UUID长度。
*/
#define UUID_LENGTH 128
/**
- * @brief 枚举音视频编解码组件类型
+ * @brief 枚举音视频编解码组件类型。
*/
typedef enum {
- MEDIA_ROLETYPE_IMAGE_JPEG = 0, /**< 图像JPEG媒体类型 */
- MEDIA_ROLETYPE_VIDEO_AVC, /**< 视频H.264媒体类型 */
- MEDIA_ROLETYPE_VIDEO_HEVC, /**< 视频H.265媒体类型 */
- MEDIA_ROLETYPE_AUDIO_FIRST = 0x10000, /**< 音频编解码器类型 */
- MEDIA_ROLETYPE_AUDIO_AAC = 0x10000, /**< 音频AAC媒体类型 */
- MEDIA_ROLETYPE_AUDIO_G711A, /**< 音频G711A媒体类型 */
- MEDIA_ROLETYPE_AUDIO_G711U, /**< 音频G711U媒体类型 */
- MEDIA_ROLETYPE_AUDIO_G726, /**< 音频G726媒体类型 */
- MEDIA_ROLETYPE_AUDIO_PCM, /**< 音频PCM媒体类型 */
- MEDIA_ROLETYPE_AUDIO_MP3, /**< 音频MP3媒体类型 */
- MEDIA_ROLETYPE_INVALID, /**< 无效媒体类型 */
+ MEDIA_ROLETYPE_IMAGE_JPEG = 0, /**< 图像JPEG媒体类型。 */
+ MEDIA_ROLETYPE_VIDEO_AVC, /**< 视频H.264媒体类型。 */
+ MEDIA_ROLETYPE_VIDEO_HEVC, /**< 视频H.265媒体类型。 */
+ MEDIA_ROLETYPE_AUDIO_FIRST = 0x10000, /**< 音频编解码器类型。 */
+ MEDIA_ROLETYPE_AUDIO_AAC = 0x10000, /**< 音频AAC媒体类型。 */
+ MEDIA_ROLETYPE_AUDIO_G711A, /**< 音频G711A媒体类型。 */
+ MEDIA_ROLETYPE_AUDIO_G711U, /**< 音频G711U媒体类型。 */
+ MEDIA_ROLETYPE_AUDIO_G726, /**< 音频G726媒体类型。 */
+ MEDIA_ROLETYPE_AUDIO_PCM, /**< 音频PCM媒体类型。 */
+ MEDIA_ROLETYPE_AUDIO_MP3, /**< 音频MP3媒体类型。 */
+ MEDIA_ROLETYPE_INVALID, /**< 无效媒体类型。 */
} AvCodecRole;
/**
- * @brief 枚举音频采样格式
+ * @brief 枚举音频采样格式。
*
* 对于planar的采样格式,每个声道的数据是独立存储在data中;
* 对于packed的采样格式,只使用第一个data,每个声道的数据是交错存储的。
*/
typedef enum {
- AUDIO_SAMPLE_FMT_U8, /**< 无符号8位整型,打包格式 */
- AUDIO_SAMPLE_FMT_S16, /**< 带符号16位整型, 打包格式 */
- AUDIO_SAMPLE_FMT_S32, /**< 带符号32位整型, 打包格式 */
- AUDIO_SAMPLE_FMT_FLOAT, /**< 浮点型, 打包格式 */
- AUDIO_SAMPLE_FMT_DOUBLE, /**< 双精度浮点型, 打包格式 */
- AUDIO_SAMPLE_FMT_U8P, /**< 无符号8位整型, 平面格式 */
- AUDIO_SAMPLE_FMT_S16P, /**< 带符号16位整型, 平面格式 */
- AUDIO_SAMPLE_FMT_S32P, /**< 带符号32位整型, 平面格式 */
- AUDIO_SAMPLE_FMT_FLOATP, /**< 浮点型, 平面格式 */
- AUDIO_SAMPLE_FMT_DOUBLEP, /**< 双精度浮点型, 平面格式 */
- AUDIO_SAMPLE_FMT_INVALID, /**< 无效采样格式 */
+ AUDIO_SAMPLE_FMT_U8, /**< 无符号8位整型,打包格式。 */
+ AUDIO_SAMPLE_FMT_S16, /**< 带符号16位整型, 打包格式。 */
+ AUDIO_SAMPLE_FMT_S32, /**< 带符号32位整型, 打包格式。 */
+ AUDIO_SAMPLE_FMT_FLOAT, /**< 浮点型, 打包格式。 */
+ AUDIO_SAMPLE_FMT_DOUBLE, /**< 双精度浮点型, 打包格式。 */
+ AUDIO_SAMPLE_FMT_U8P, /**< 无符号8位整型, 平面格式。 */
+ AUDIO_SAMPLE_FMT_S16P, /**< 带符号16位整型, 平面格式。 */
+ AUDIO_SAMPLE_FMT_S32P, /**< 带符号32位整型, 平面格式。 */
+ AUDIO_SAMPLE_FMT_FLOATP, /**< 浮点型, 平面格式。 */
+ AUDIO_SAMPLE_FMT_DOUBLEP, /**< 双精度浮点型, 平面格式。 */
+ AUDIO_SAMPLE_FMT_INVALID, /**< 无效采样格式。 */
} AudioSampleFormat;
/**
- * @brief 支持的像素格式数组大小
+ * @brief 支持的像素格式数组大小。
*/
#define PIX_FORMAT_NUM 16
/**
- * @brief 定义视频编解码能力
+ * @brief 定义视频编解码能力。
*/
typedef struct {
- Rect minSize; /**< 支持的最小分辨率 */
- Rect maxSize; /**< 支持的最大分辨率 */
- Alignment whAlignment; /**< 宽高对齐值 */
- RangeValue blockCount; /**< 支持的块数量范围 */
- RangeValue blocksPerSecond; /**< 每秒可处理的块数量范围 */
- Rect blockSize; /**< 支持的块大小 */
- int32_t supportPixFmts[PIX_FORMAT_NUM]; /**< 支持的像素格式,详见{@link OMX_COLOR_FORMATTYPE} */
+ Rect minSize; /**< 支持的最小分辨率。 */
+ Rect maxSize; /**< 支持的最大分辨率。 */
+ Alignment whAlignment; /**< 宽高对齐值。 */
+ RangeValue blockCount; /**< 支持的块数量范围。 */
+ RangeValue blocksPerSecond; /**< 每秒可处理的块数量范围。 */
+ Rect blockSize; /**< 支持的块大小。 */
+ int32_t supportPixFmts[PIX_FORMAT_NUM]; /**< 支持的像素格式,详见{@link OMX_COLOR_FORMATTYPE}。 */
} VideoPortCap;
/**
- * @brief 支持的音频采样格式数组大小
+ * @brief 支持的音频采样格式数组大小。
*/
#define SAMPLE_FORMAT_NUM 12
/**
- * @brief 支持的音频采样率数组大小
+ * @brief 支持的音频采样率数组大小。
*/
#define SAMPLE_RATE_NUM 16
/**
- * @brief 支持的音频通道数组大小
+ * @brief 支持的音频通道数组大小。
*/
#define CHANNEL_NUM 16
/**
- * @brief 定义音频编解码能力
+ * @brief 定义音频编解码能力。
*/
typedef struct {
- int32_t sampleFormats[SAMPLE_FMT_NUM]; /**< 支持的音频采样格式,详见{@link AudioSampleFormat} */
- int32_t sampleRate[SAMPLE_RATE_NUM]; /**< 支持的音频采样率,详见{@link AudioSampleRate} */
- int32_t channelLayouts[CHANNEL_NUM]; /**< 支持的音频通道数channel layouts */
- int32_t channelCount[CHANNEL_NUM]; /**< 支持的音频通道数*/
+ int32_t sampleFormats[SAMPLE_FMT_NUM]; /**< 支持的音频采样格式,详见{@link AudioSampleFormat}。 */
+ int32_t sampleRate[SAMPLE_RATE_NUM]; /**< 支持的音频采样率,详见{@link AudioSampleRate}。 */
+ int32_t channelLayouts[CHANNEL_NUM]; /**< 支持的音频通道数channel layouts. */
+ int32_t channelCount[CHANNEL_NUM]; /**< 支持的音频通道数。*/
} AudioPortCap;
/**
- * @brief 定义音视频编解码能力
+ * @brief 定义音视频编解码能力。
*/
typedef union {
- VideoPortCap video; /**< 视频编解码能力 */
- AudioPortCap audio; /**< 音频编解码能力 */
+ VideoPortCap video; /**< 视频编解码能力。 */
+ AudioPortCap audio; /**< 音频编解码能力。 */
} PortCap;
/**
- * @brief 组件名称大小
+ * @brief 组件名称大小。
*/
#define NAME_LENGTH 32
/**
- * @brief 支持的profile数组大小
+ * @brief 支持的profile数组大小。
*/
#define PROFILE_NUM 256
/**
- * @brief 定义Codec编解码能力
+ * @brief 定义Codec编解码能力。
*/
typedef struct {
- AvCodecRole role; /**< 媒体类型 */
- CodecType type; /**< 编解码类型 */
- char compName[NAME_LENGTH]; /**< 编解码组件名称 */
- int32_t supportProfiles[PROFILE_NUM]; /**< 支持的profiles,详见{@link Profile} */
- int32_t maxInst; /**< 最大实例 */
- bool isSoftwareCodec; /**< 软件编解码还是硬件编解码 */
- int32_t processModeMask; /**< 编解码处理模式掩码,详见{@link CodecProcessMode}. */
- uint32_t capsMask; /**< 编解码播放能力掩码,详见{@link CodecCapsMask}. */
- RangeValue bitRate; /**< 支持的码率范围 */
- PortCap port; /**< 支持的音视频编解码能力 */
+ AvCodecRole role; /**< 媒体类型。 */
+ CodecType type; /**< 编解码类型。 */
+ char compName[NAME_LENGTH]; /**< 编解码组件名称。 */
+ int32_t supportProfiles[PROFILE_NUM]; /**< 支持的profiles,详见{@link Profile}。 */
+ int32_t maxInst; /**< 最大实例。 */
+ bool isSoftwareCodec; /**< 软件编解码还是硬件编解码。 */
+ int32_t processModeMask; /**< 编解码处理模式掩码,详见{@link CodecProcessMode}。 */
+ uint32_t capsMask; /**< 编解码播放能力掩码,详见{@link CodecCapsMask}。 */
+ RangeValue bitRate; /**< 支持的码率范围。 */
+ PortCap port; /**< 支持的音视频编解码能力。 */
} CodecCompCapability;
/**
- * @brief 定义buffer类型
+ * @brief 定义buffer类型。
*/
enum CodecBufferType {
- CODEC_BUFFER_TYPE_INVALID = 0, /**< 无效buffer类型 */
- CODEC_BUFFER_TYPE_VIRTUAL_ADDR = 0x1, /**< 虚拟地址类型 */
- CODEC_BUFFER_TYPE_AVSHARE_MEM_FD = 0x2, /**< 共享内存类型 */
- CODEC_BUFFER_TYPE_HANDLE = 0x4, /**< handle类型 */
- CODEC_BUFFER_TYPE_DYNAMIC_HANDLE = 0x8, /**< 动态handle类型 */
+ CODEC_BUFFER_TYPE_INVALID = 0, /**< 无效buffer类型。 */
+ CODEC_BUFFER_TYPE_VIRTUAL_ADDR = 0x1, /**< 虚拟地址类型。 */
+ CODEC_BUFFER_TYPE_AVSHARE_MEM_FD = 0x2, /**< 共享内存类型。 */
+ CODEC_BUFFER_TYPE_HANDLE = 0x4, /**< handle类型。 */
+ CODEC_BUFFER_TYPE_DYNAMIC_HANDLE = 0x8, /**< 动态handle类型。 */
};
/**
- * @brief 枚举共享内存类型
+ * @brief 枚举共享内存类型。
*/
enum ShareMemTypes {
- READ_WRITE_TYPE = 0x1, /**< 可读可写的共享内存类型 */
- READ_ONLY_TYPE = 0x2, /**< 可读的共享内存类型 */
+ READ_WRITE_TYPE = 0x1, /**< 可读可写的共享内存类型。 */
+ READ_ONLY_TYPE = 0x2, /**< 可读的共享内存类型。 */
};
/**
- * @brief Codec buffer信息的定义
+ * @brief Codec buffer信息的定义。
*/
struct OmxCodecBuffer {
- uint32_t bufferId; /**< buffer ID */
- uint32_t size; /**< 结构体大小 */
- union OMX_VERSIONTYPE version; /**< 组件版本信息 */
- enum CodecBufferType bufferType; /**< buffer类型 */
- uint8_t *buffer; /**< 编码或者解码使用的buffer */
- uint32_t bufferLen; /**< buffer大小 */
- uint32_t allocLen; /**< 申请的buffer大小 */
- uint32_t filledLen; /**< 填充的buffer大小 */
- uint32_t offset; /**< 有效数据从缓冲区开始的起始偏移量 */
- int32_t fenceFd; /**< 该描述符来自buffer消费者,Codec等待成功后才可以使用输入或者输出buffer */
- enum ShareMemTypes type; /**< 共享内存类型 */
- int64_t pts; /**< 时间戳 */
- uint32_t flag; /**< 标志 */
+ uint32_t bufferId; /**< buffer ID。 */
+ uint32_t size; /**< 结构体大小。 */
+ union OMX_VERSIONTYPE version; /**< 组件版本信息。 */
+ enum CodecBufferType bufferType; /**< buffer类型。 */
+ uint8_t *buffer; /**< 编码或者解码使用的buffer。 */
+ uint32_t bufferLen; /**< buffer大小。 */
+ uint32_t allocLen; /**< 申请的buffer大小。 */
+ uint32_t filledLen; /**< 填充的buffer大小。 */
+ uint32_t offset; /**< 有效数据从缓冲区开始的起始偏移量。 */
+ int32_t fenceFd; /**< 该描述符来自buffer消费者,Codec等待成功后才可以使用输入或者输出buffer。 */
+ enum ShareMemTypes type; /**< 共享内存类型。 */
+ int64_t pts; /**< 时间戳。 */
+ uint32_t flag; /**< 标志。 */
};
/**
- * @brief 枚举Codec扩展index
+ * @brief 枚举Codec扩展index。
*/
enum OmxIndexCodecExType {
- OMX_IndexExtBufferTypeStartUnused = OMX_IndexKhronosExtensions + 0x00a00000, /**< BufferType 扩展index */
- OMX_IndexParamSupportBufferType, /**< SupportBuffer类型 */
- OMX_IndexParamUseBufferType, /**< UseBuffer类型 */
- OMX_IndexParamGetBufferHandleUsage, /**< GetBufferHandleUsage类型 */
+ OMX_IndexExtBufferTypeStartUnused = OMX_IndexKhronosExtensions + 0x00a00000, /**< BufferType 扩展index。 */
+ OMX_IndexParamSupportBufferType, /**< SupportBuffer类型。 */
+ OMX_IndexParamUseBufferType, /**< UseBuffer类型。 */
+ OMX_IndexParamGetBufferHandleUsage, /**< GetBufferHandleUsage类型。 */
};
/**
- * @brief 枚举Codec扩展编码类型
+ * @brief 枚举Codec扩展编码类型。
*/
enum OmxVideoExType {
- OMX_VIDEO_CodingHEVC = 11, /**< HEVC编码类型 */
+ OMX_VIDEO_CodingHEVC = 11, /**< HEVC编码类型。 */
};
/**
- * @brief 定义组件版本信息
+ * @brief 定义组件版本信息。
*/
struct CompVerInfo {
- char compName[NAME_LENGTH]; /**< 组件名称 */
- uint8_t compUUID[UUID_LENGTH]; /**< 组件的UUID标识符 */
- union OMX_VERSIONTYPE compVersion; /**< OMX组件版本信息 */
- union OMX_VERSIONTYPE specVersion; /**< 构建组件所依据的规范的版本信息 */
+ char compName[NAME_LENGTH]; /**< 组件名称。 */
+ uint8_t compUUID[UUID_LENGTH]; /**< 组件的UUID标识符。 */
+ union OMX_VERSIONTYPE compVersion; /**< OMX组件版本信息。 */
+ union OMX_VERSIONTYPE specVersion; /**< 构建组件所依据的规范的版本信息。 */
};
/**
- * @brief 定义事件上报信息
+ * @brief 定义事件上报信息。
*/
struct EventInfo {
- int8_t *appData; /**< 设置回调时给入的上层实例 */
- uint32_t appDataLen; /**< appData字节数 */
- uint32_t data1; /**< 事件上报携带的数据1 */
- uint32_t data2; /**< 事件上报携带的数据2 */
- int8_t *eventData; /**< 事件上报携带的数据信息 */
- uint32_t eventDataLen; /**< eventData字节数 */
+ int8_t *appData; /**< 设置回调时给入的上层实例。 */
+ uint32_t appDataLen; /**< appData字节数。 */
+ uint32_t data1; /**< 事件上报携带的数据1。 */
+ uint32_t data2; /**< 事件上报携带的数据2。 */
+ int8_t *eventData; /**< 事件上报携带的数据信息。 */
+ uint32_t eventDataLen; /**< eventData字节数。 */
};
/**
- * @brief SupportBuffer类型定义.
+ * @brief SupportBuffer类型定义。
*/
struct SupportBufferType {
- uint32_t size; /**< 结构体大小 */
- union OMX_VERSIONTYPE version; /**< 组件版本信息 */
- uint32_t portIndex; /**< 端口索引 */
- uint32_t bufferTypes; /**< 支持的所有Buffer类型 */
+ uint32_t size; /**< 结构体大小。 */
+ union OMX_VERSIONTYPE version; /**< 组件版本信息。 */
+ uint32_t portIndex; /**< 端口索引。 */
+ uint32_t bufferTypes; /**< 支持的所有Buffer类型。 */
};
/**
- * @brief UseBuffer类型定义
+ * @brief UseBuffer类型定义。
*/
struct UseBufferType {
- uint32_t size; /**< 结构体大小 */
- union OMX_VERSIONTYPE version; /**< 组件版本信息 */
- uint32_t portIndex; /**< 端口索引 */
- uint32_t bufferType; /**< Buffer类型 */
+ uint32_t size; /**< 结构体大小。 */
+ union OMX_VERSIONTYPE version; /**< 组件版本信息。 */
+ uint32_t portIndex; /**< 端口索引。 */
+ uint32_t bufferType; /**< Buffer类型。 */
};
/**
- * @brief BufferHandleUsage类型定义
+ * @brief BufferHandleUsage类型定义。
*/
struct GetBufferHandleUsageParams {
- uint32_t size; /**< 结构体大小 */
- union OMX_VERSIONTYPE version; /**< 组件版本信息 */
- uint32_t portIndex; /**< 端口索引 */
- uint32_t usage; /**< usage */
+ uint32_t size; /**< 结构体大小。 */
+ union OMX_VERSIONTYPE version; /**< 组件版本信息。 */
+ uint32_t portIndex; /**< 端口索引。 */
+ uint32_t usage; /**< 申请内存的使用场景。 */
};
#ifdef __cplusplus