• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# CodecBase
2
3
4## Overview
5
6The CodecBase module provides the variables, attributes, and functions for basic audio and video multiplexing, demultiplexing, encoding, and decoding.
7
8**System capability**: SystemCapability.Multimedia.Media.CodecBase
9
10**Since**: 9
11
12### Media Codec Formats
13
14The table below lists the media codec formats. The type is a constant string.
15
16| Name                                                        | Description                                                  |
17| ------------------------------------------------------------ | ------------------------------------------------------ |
18| [OH_AVCODEC_MIMETYPE_AUDIO_AAC](#oh_avcodec_mimetype_audio_aac) | MIME type of the AAC audio codec.                           |
19| [OH_AVCODEC_MIMETYPE_AUDIO_FLAC](#oh_avcodec_mimetype_audio_flac) | MIME type of the Free Lossless Audio Codec (FLAC) audio codec.                          |
20| [OH_AVCODEC_MIMETYPE_AUDIO_OPUS](#oh_avcodec_mimetype_audio_opus) | MIME type of the Opus audio codec. <!--Del-->(This specification is not available yet.)<!--DelEnd-->        |
21| [OH_AVCODEC_MIMETYPE_AUDIO_G711MU](#oh_avcodec_mimetype_audio_g711mu) | MIME type of the G.711 mu-law audio codec.                        |
22| [OH_AVCODEC_MIMETYPE_AUDIO_RAW](#oh_avcodec_mimetype_audio_raw) | MIME type of raw audio streams.                        |
23| [OH_AVCODEC_MIMETYPE_AUDIO_VORBIS](#oh_avcodec_mimetype_audio_vorbis) | MIME type of the Vorbis audio decoder.                          |
24| [OH_AVCODEC_MIMETYPE_AUDIO_MPEG](#oh_avcodec_mimetype_audio_mpeg) | MIME type of the MP3 audio decoder.                             |
25| [OH_AVCODEC_MIMETYPE_AUDIO_VIVID](#oh_avcodec_mimetype_audio_vivid) | MIME type of the Audio Vivid audio decoder. <!--Del-->(This specification is not available yet.)<!--DelEnd-->     |
26| [OH_AVCODEC_MIMETYPE_AUDIO_AMR_NB](#oh_avcodec_mimetype_audio_amr_nb) | MIME type of the AMR-NB audio decoder.                          |
27| [OH_AVCODEC_MIMETYPE_AUDIO_AMR_WB](#oh_avcodec_mimetype_audio_amr_wb) | MIME type of the AMR-WB audio decoder.                          |
28| [OH_AVCODEC_MIMETYPE_AUDIO_APE](#oh_avcodec_mimetype_audio_ape) |MIME type of the APE audio decoder.                        |
29| [OH_AVCODEC_MIMETYPE_VIDEO_VVC](#oh_avcodec_mimetype_video_vvc) | MIME type of the VVC (H.266) video codec.                   |
30| [OH_AVCODEC_MIMETYPE_VIDEO_HEVC](#oh_avcodec_mimetype_video_hevc) | MIME type of the HEVC (H.265) video codec.                   |
31| [OH_AVCODEC_MIMETYPE_VIDEO_AVC](#oh_avcodec_mimetype_video_avc) | MIME type of the AVC (H.264) video codec.                    |
32| [OH_AVCODEC_MIMETYPE_VIDEO_H263](#oh_avcodec_mimetype_video_h263) | MIME type of the H.263 video codec.                    |
33| [OH_AVCODEC_MIMETYPE_VIDEO_MPEG4](#oh_avcodec_mimetype_video_mpeg4) | MIME type of the MPEG4 video encoder, which is used only for multiplexing MPEG4 video streams. (This function is deprecated in API version 11.)|
34| [OH_AVCODEC_MIMETYPE_VIDEO_MPEG4_PART2](#oh_avcodec_mimetype_video_mpeg4_part2) | MIME type of the MPEG4 Part 2 video codec.|
35| [OH_AVCODEC_MIMETYPE_VIDEO_MPEG2](#oh_avcodec_mimetype_video_mpeg2) | MIME type of the MPEG2 video codec.|
36| [OH_AVCODEC_MIMETYPE_IMAGE_JPG](#oh_avcodec_mimetype_image_jpg) | MIME type of the JPG image encoder, which is used only for multiplexing JPG covers.      |
37| [OH_AVCODEC_MIMETYPE_IMAGE_PNG](#oh_avcodec_mimetype_image_png) | MIME type of the PNG image encoder, which is used only for multiplexing PNG covers.      |
38| [OH_AVCODEC_MIMETYPE_IMAGE_BMP](#oh_avcodec_mimetype_image_bmp) | MIME type of the BMP image encoder, which is used only for multiplexing BMP covers.      |
39| [OH_AVCODEC_MIMETYPE_SUBTITLE_WEBVTT](#oh_avcodec_mimetype_subtitle_webvtt) |MIME type of the WEBVTT subtitle demuxer.                        |
40| [OH_AVCODEC_MIMETYPE_SUBTITLE_SRT](#oh_avcodec_mimetype_subtitle_srt) |MIME type of the SRT subtitle demuxer.                        |
41
42
43### Media Data Key-Value Pairs
44
45The table below lists the key-value pairs used to describe media data. The key type is a constant string, and the value type can be int32_t, int64_t, float, double, char *, or uint8_t *.
46
47The [OH_AVFormat](_core.md#functions) API is used to configure or query parameters.
48
49Key-value pairs dedicated for capability query:
50
51| Name                                                        | Description                                                        |
52| ------------------------------------------------------------ | ------------------------------------------------------------ |
53| [OH_FEATURE_PROPERTY_KEY_VIDEO_ENCODER_MAX_LTR_FRAME_COUNT](#oh_feature_property_key_video_encoder_max_ltr_frame_count)     | Maximum number of long-term reference (LTR) frames obtained during video encoding. The value type is int32_t.|
54
55Common key-value pairs of audio and video:
56
57| Name                                                        | Description                                                        |
58| ------------------------------------------------------------ | ------------------------------------------------------------ |
59| [OH_MD_KEY_CODEC_CONFIG](#oh_md_key_codec_config)            | Codec-specific data. In the case of video, data carried in **SPS/PPS** is transferred. In the case of audio, data carried in **extraData** is transferred. The value type is uint8_t\*. This key is optional. <!--Del-->(This key is not supported yet for the video codec.)<!--DelEnd--> |
60| [OH_MD_MAX_INPUT_BUFFER_COUNT](#oh_md_max_input_buffer_count) | Maximum number of input buffers. The value type is int32_t. This key is optional.     |
61| [OH_MD_MAX_OUTPUT_BUFFER_COUNT](#oh_md_max_output_buffer_count) | Maximum number of output buffers. The value type is int32_t. This key is optional.       |
62| [OH_MD_KEY_BITRATE](#oh_md_key_bitrate)                      | Bit rate. The value type is int64_t. This key is used in audio and video encoding scenarios. It is optional in video encoding scenarios.|
63| [OH_MD_KEY_PROFILE](#oh_md_key_profile)                      | Encoding grading. The value type is int32_t. For details, see [OH_AVCProfile](#oh_avcprofile), [OH_HEVCProfile](#oh_hevcprofile), and [OH_AACProfile](#oh_aacprofile). This key is optional.|
64| [OH_MD_KEY_MAX_INPUT_SIZE](#oh_md_key_max_input_size)        | Maximum size of an input stream to decode. The value type is int32_t. This key is optional.          |
65
66
67The table below lists the video-dedicated key-value pairs.
68
69| Name                                                        | Description                                                        |
70| ------------------------------------------------------------ | ------------------------------------------------------------ |
71| [OH_ED_KEY_TIME_STAMP](#oh_ed_key_time_stamp)                | Surface buffer timestamp. The value is of the int64_t type. This key is optional. (This key is deprecated from API version 14.)|
72| [OH_ED_KEY_EOS](#oh_ed_key_eos)                              | End of stream for the surface buffer. The value type is int32_t. This key is optional. (This key is deprecated from API version 14.)|
73| [OH_MD_KEY_WIDTH](#oh_md_key_width)                          | Video width. The value type is int32_t.                            |
74| [OH_MD_KEY_HEIGHT](#oh_md_key_height)                        | Video height. The value type is int32_t.                              |
75| [OH_MD_KEY_PIXEL_FORMAT](#oh_md_key_pixel_format)            | Video pixel format. The value type is int32_t. For details, see [OH_AVPixelFormat](_core.md#oh_avpixelformat).|
76| [OH_MD_KEY_FRAME_RATE](#oh_md_key_frame_rate)                | Video frame rate. The value type is double. This key is optional.                |
77| [OH_MD_KEY_RANGE_FLAG](#oh_md_key_range_flag)                | Video YUV value range flag. The value type is int32_t. The value **1** means a full range, and **0** means a limited range. This key is optional.|
78| [OH_MD_KEY_COLOR_PRIMARIES](#oh_md_key_color_primaries)      | Video primary color. The value type is int32_t. For details, see [OH_ColorPrimary](#oh_colorprimary). The video primary color complies with Table 2 in the H.273 standard. This key is optional.|
79| [OH_MD_KEY_TRANSFER_CHARACTERISTICS](#oh_md_key_transfer_characteristics) | Video transfer characteristics. The value type is int32_t. For details, see [OH_TransferCharacteristic](#oh_transfercharacteristic). The video transfer characteristics comply with Table 3 in the H.273 standard. This key is optional.|
80| [OH_MD_KEY_MATRIX_COEFFICIENTS](#oh_md_key_matrix_coefficients) | Video matrix coefficient. The value type is int32_t. For details, see [OH_MatrixCoefficient](#oh_matrixcoefficient). The video matrix coefficient complies with Table 4 in the H.273 standard. This key is optional.|
81| [OH_MD_KEY_VIDEO_STRIDE](#oh_md_key_video_stride)       | Stride of the video frame. The value type is int32_t. This key is optional.       |
82| [OH_MD_KEY_VIDEO_SLICE_HEIGHT](#oh_md_key_video_slice_height)    | Height of the video frame. The value type is int32_t. This key is optional.       |
83| [OH_MD_KEY_VIDEO_PIC_WIDTH](#oh_md_key_video_pic_width)       | Width of the video frame. The value type is int32_t. This key is optional.       |
84| [OH_MD_KEY_VIDEO_PIC_HEIGHT](#oh_md_key_video_pic_height)    | Height of the video frame. The value type is int32_t. This key is optional.       |
85| [OH_MD_KEY_VIDEO_ENABLE_LOW_LATENCY](#oh_md_key_video_enable_low_latency)   | Enabled status of low-latency video codec. The value type is int32_t. The value **1** means that low-latency video codec is enabled, and **0** means the opposite. This key is optional and used only in the configuration phase.|
86| [OH_MD_KEY_VIDEO_ENCODE_BITRATE_MODE](#oh_md_key_video_encode_bitrate_mode) | Video encoding bit rate mode. The value type is int32_t. For details, see [OH_BitrateMode](#oh_bitratemode-1). This key is optional.|
87| [OH_MD_KEY_QUALITY](#oh_md_key_quality)                      | Required encoding quality. The value type is int32_t. This key applies only to encoders configured in constant quality mode. This key is optional.|
88| [OH_MD_KEY_REQUEST_I_FRAME](#oh_md_key_request_i_frame)      | Request for immediate encoding of I-frames. The value type is int32_t. This key is optional.           |
89| [OH_MD_KEY_I_FRAME_INTERVAL](#oh_md_key_i_frame_interval)    | Key frame interval, in milliseconds. The value type is int32_t. This key is optional and is used only for video encoding.|
90| [OH_MD_KEY_VIDEO_ENCODER_ENABLE_TEMPORAL_SCALABILITY](#oh_md_key_video_encoder_enable_temporal_scalability)          | Enabled status of temporal scalability. The value type is int32_t. The value **1** means temporal scalability is enabled, and **0** means the opposite. This key is optional and used only in the configuration phase of video encoding.|
91| [OH_MD_KEY_VIDEO_ENCODER_TEMPORAL_GOP_SIZE](#oh_md_key_video_encoder_temporal_gop_size)       | Size of a temporal image group. The value type is int32_t. This key is valid only when temporal scalability is enabled. This key is optional and used only in the configuration phase of video encoding.|
92| [OH_MD_KEY_VIDEO_ENCODER_TEMPORAL_GOP_REFERENCE_MODE](#oh_md_key_video_encoder_temporal_gop_reference_mode)         | Reference mode in a temporal image group. The value type is int32_t. For details, see [OH_TemporalGopReferenceMode](#oh_temporalgopreferencemode-1). This key is valid only when temporal scalability is enabled. This key is optional and used only in the configuration phase of video encoding.|
93| [OH_MD_KEY_VIDEO_ENCODER_LTR_FRAME_COUNT](#oh_md_key_video_encoder_ltr_frame_count)        | Number of LTR frames. The value type is int32_t. The value must be within the supported value range. This key is optional and is used only for video encoding.|
94| [OH_MD_KEY_VIDEO_ENCODER_PER_FRAME_MARK_LTR](#oh_md_key_video_encoder_per_frame_mark_ltr)  | Whether the current frame is marked as an LTR frame. The value type is int32_t. The value **1** means that the frame is marked as an LTR frame, and **0** means the opposite. This key is optional and is used only for video encoding.|
95| [OH_MD_KEY_VIDEO_ENCODER_PER_FRAME_USE_LTR](#oh_md_key_video_encoder_per_frame_use_ltr)    | 	POC number of the LTR frame referenced by the current frame. The value type is int32_t. This key is optional and is used only for video encoding.|
96| [OH_MD_KEY_VIDEO_PER_FRAME_IS_LTR](#oh_md_key_video_per_frame_is_ltr)      | Whether the frame corresponding to the stream output from the current [OH_AVBuffer](_core.md#oh_avbuffer) is marked as an LTR frame. The value type is int32_t. The value **1** means that the frame is an LTR frame, and **0** means the opposite. This key is optional and is used only for video encoding.|
97| [OH_MD_KEY_VIDEO_PER_FRAME_POC](#oh_md_key_video_per_frame_poc)            | POC number of the frame. The value type is int32_t. This key is optional and is used only for video encoding.|
98| [OH_MD_KEY_VIDEO_ENCODER_QP_MAX](#oh_md_key_video_encoder_qp_max)       | Maximum Quantization Parameter (QP) allowed by the video encoder. The value type is int32_t. This key is optional and is used only for video encoding.|
99| [OH_MD_KEY_VIDEO_ENCODER_QP_MIN](#oh_md_key_video_encoder_qp_min)      | Minimum QP allowed by the video encoder. The value type is int32_t. This key is optional and is used only for video encoding.|
100| [OH_MD_KEY_VIDEO_ENCODER_QP_AVERAGE](#oh_md_key_video_encoder_qp_average)     |Average QP of video frames. The value type is int32_t. This key is optional and is used only for video encoding. |
101| [OH_MD_KEY_VIDEO_ENCODER_MSE](#oh_md_key_video_encoder_mse)     |Mean Squared Error (MSE) of video frames. The value type is double. This key is optional and is used only for video encoding. |
102| [OH_MD_KEY_VIDEO_ENCODER_REPEAT_PREVIOUS_FRAME_AFTER](#oh_md_key_video_encoder_repeat_previous_frame_after)         | Duration (in milliseconds) for which the last frame will be resubmitted repeatedly, if no new frame is available after the previous frame is submitted to the encoder. The value type is int32_t. This key is used only in the configuration phase of video encoding in surface mode.|
103| [OH_MD_KEY_VIDEO_ENCODER_REPEAT_PREVIOUS_MAX_COUNT](#oh_md_key_video_encoder_repeat_previous_max_count)         | Maximum number of times the encoder can repeat encoding the previous frame when no new frame is available. The value type is int32_t. This key takes effect only when **OH_MD_KEY_VIDEO_ENCODER_REPEAT_PREVIOUS_FRAME_AFTER** is available and is used only in the configuration phase.|
104| [OH_MD_KEY_VIDEO_DECODER_OUTPUT_COLOR_SPACE](#oh_md_key_video_decoder_output_color_space)    | Output color space of the video decoder. The value type is int32_t. The supported value is **OH_COLORSPACE_BT709_LIMIT**.|
105| [OH_MD_KEY_ROTATION](#oh_md_key_rotation)                    | Rotation angle of the surface. The value type is int32_t, and the value range is {0, 90, 180, 270}. The default value is 0. This key is optional and is used only for video decoding in surface mode  |
106| [OH_MD_KEY_SCALING_MODE](#oh_md_key_scaling_mode)            | Video scaling mode. The value type is int32_t. For details, see [OH_ScalingMode](#oh_scalingmode). This key is optional and is used only for video decoding in surface mode. You are advised to set the scaling mode by calling [OH_NativeWindow_NativeWindowSetScalingModeV2](../apis-arkgraphics2d/_native_window.md#oh_nativewindow_nativewindowsetscalingmodev2). (This key is deprecated from API version 14.)|
107| [OH_MD_KEY_VIDEO_CROP_TOP](#oh_md_key_video_crop_top)       | Top coordinate (y) of the cropped rectangle. The value type is int32_t. This key is optional and is used only for video decoding.|
108| [OH_MD_KEY_VIDEO_CROP_BOTTOM](#oh_md_key_video_crop_bottom)        | Bottom coordinate (y) of the cropped rectangle. The value type is int32_t. This key is optional and is used only for video decoding.|
109| [OH_MD_KEY_VIDEO_CROP_LEFT](#oh_md_key_video_crop_left)     | Left coordinate (x) of the cropped rectangle. The value type is int32_t. This key is optional and is used only for video decoding.|
110| [OH_MD_KEY_VIDEO_CROP_RIGHT](#oh_md_key_video_crop_right)     | Right coordinate (x) of the cropped rectangle. The value type is int32_t. This key is optional and is used only for video decoding.|
111| [OH_MD_KEY_VIDEO_DECODER_OUTPUT_ENABLE_VRR](#oh_md_key_video_decoder_output_enable_vrr)     | Whether the decoder enables the video variable frame rate feature. The value type is int32_t. This key is optional and is used only for video decoding.|
112
113The table below lists the audio-dedicated key-value pairs.
114
115| Name                                                        | Description                                                        |
116| ------------------------------------------------------------ | ------------------------------------------------------------ |
117| [OH_MD_KEY_AUDIO_SAMPLE_FORMAT](#oh_md_key_audio_sample_format) | Original audio format. The value type is int32_t. For details, see [OH_BitsPerSample](#oh_bitspersample-1).|
118| [OH_MD_KEY_AUD_CHANNEL_COUNT](#oh_md_key_aud_channel_count)  | Number of audio channels. The value type is int32_t.                          |
119| [OH_MD_KEY_AUD_SAMPLE_RATE](#oh_md_key_aud_sample_rate)      | Audio sampling rate. The value type is int32_t.                            |
120| [OH_MD_KEY_AUDIO_COMPRESSION_LEVEL](#oh_md_key_audio_compression_level) | Audio codec compression level. The value type is int32_t type. This key is used only for audio encoding. This key is optional.    |
121| [OH_MD_KEY_CHANNEL_LAYOUT](#oh_md_key_channel_layout)        | Required encoding channel layout. The value type is int64_t. This key applies only to encoders. For details, see [OH_AudioChannelLayout](_core.md#oh_audiochannellayout-1). |
122| [OH_MD_KEY_BITS_PER_CODED_SAMPLE](#oh_md_key_bits_per_coded_sample) | Number of bits for each coded sample. The value type is int32_t. This key applies to FLAC encoders. For details, see [OH_BitsPerSample](#oh_bitspersample-1). This key is optional.|
123| [OH_MD_KEY_SBR](#oh_md_key_sbr)                              | AAC SBR format. The value type is int32_t. This key applies to AAC encoders. This key is optional.|
124| [OH_MD_KEY_COMPLIANCE_LEVEL](#oh_md_key_compliance_level)    | FLAC compliance level. The value type is int32_t. This key is used only for audio encoding. This key is optional.         |
125| [OH_MD_KEY_AAC_IS_ADTS](#oh_md_key_aac_is_adts)              | AAC format, which can be ADTS or LATM. The value type is int32_t. This key applies to AAC decoders. This key is optional. |
126| [OH_MD_KEY_IDENTIFICATION_HEADER](#oh_md_key_identification_header) | Vorbis identification header. The value type is uint8_t\*. This key applies only to Vorbis decoders. This key is optional.|
127| [OH_MD_KEY_SETUP_HEADER](#oh_md_key_setup_header)            | Vorbis setup header. The value type is uint8_t\*. This key applies only to Vorbis decoders. This key is optional.|
128| [OH_MD_KEY_AUDIO_OBJECT_NUMBER](#oh_md_key_audio_object_number) | Number of audio objects. The value type is int32_t. This key is used only for Audio Vivid decoding. This key is optional.           |
129| [OH_MD_KEY_AUDIO_VIVID_METADATA](#oh_md_key_audio_vivid_metadata) | Audio Vivid metadata. The value type is uint8_t\*. This key is used only for Audio Vivid decoding. This key is optional.    |
130
131The table below lists the key-value pairs dedicated for multiplexing and demultiplexing.
132
133| Name                                                        | Description                                                        |
134| ------------------------------------------------------------ | ------------------------------------------------------------ |
135| [OH_MD_KEY_VIDEO_IS_HDR_VIVID](#oh_md_key_video_is_hdr_vivid) | Whether the video track in a media file is HDR Vivid. The value type is int32_t. This key is used for both multiplexing and demultiplexing. This key is optional. |
136| [OH_MD_KEY_START_TIME](#oh_md_key_start_time) | Start time of the first frame in a media file, measured in microseconds. The value type is int64_t. This key is optional.           |
137| [OH_MD_KEY_TRACK_START_TIME](#oh_md_key_track_start_time) | Start time of the track, measured in microseconds. The value type is int64_t. This key is optional.           |
138| [OH_MD_KEY_TRACK_TYPE](#oh_md_key_track_type)                | Track type in a media file. The value type is int32_t. For details, see [OH_MediaType](#oh_mediatype-1). This key is optional.|
139| [OH_MD_KEY_DURATION](#oh_md_key_duration)                    | Duration in a media file. The value type is int64_t. This key is optional.                 |
140| [OH_MD_KEY_TITLE](#oh_md_key_title)                          | Title in a media file. The value type is string. This key is optional.              |
141| [OH_MD_KEY_ARTIST](#oh_md_key_artist)                        | Artist in a media file. The value type is string. This key is optional.            |
142| [OH_MD_KEY_ALBUM](#oh_md_key_album)                          | Album in a media file. The value type is string. This key is optional.              |
143| [OH_MD_KEY_ALBUM_ARTIST](#oh_md_key_album_artist)            | Album artist of the input media. The value type is string. This key is optional.              |
144| [OH_MD_KEY_DATE](#oh_md_key_date)                            | Date in a media file, for example, 2024. The value type is string. This key is optional.   |
145| [OH_MD_KEY_COMMENT](#oh_md_key_comment)                      | Comment in a media file. The value type is string. This key is optional.              |
146| [OH_MD_KEY_GENRE](#oh_md_key_genre)                          | Genre in a media file. The value type is string. This key is optional.              |
147| [OH_MD_KEY_COPYRIGHT](#oh_md_key_copyright)                  | Copyright in a media file. The value type is string. This key is optional.              |
148| [OH_MD_KEY_LANGUAGE](#oh_md_key_language)                    | Language in a media file. The value type is string. This key is optional.              |
149| [OH_MD_KEY_DESCRIPTION](#oh_md_key_description)              | Description in a media file. The value type is string. This key is optional.              |
150| [OH_MD_KEY_LYRICS](#oh_md_key_lyrics)                        | Lyrics in a media file. The value type is string. This key is optional.              |
151| [OH_MD_KEY_TRACK_COUNT](#oh_md_key_track_count)              | Number of tracks in a media file. The value type is int32_t. This key is optional.        |
152| [OH_MD_KEY_BUFFER_DURATION](#oh_md_key_buffer_duration) | Duration corresponding to the audio, video, or subtitle sample carried in AVBuffer, in microseconds. The value type is int64_t. This key is optional.           |
153| [OH_MD_KEY_DECODING_TIMESTAMP](#oh_md_key_decoding_timestamp) | Decoding timestamp corresponding to the audio, video, or subtitle sample carried in AVBuffer, in microseconds. The value type is int64_t. This key is optional.           |
154| [OH_MD_KEY_CODEC_MIME](#oh_md_key_codec_mime)                | [MIME](#media-codec-formats) type of the codec. The value type is string. This key is optional.        |
155| [OH_MD_KEY_VIDEO_SAR](#oh_md_key_video_sar)                  | Aspect ratio of the sample. The value type is double.|
156| [OH_MD_KEY_CREATION_TIME](#oh_md_key_creation_time)          | Media file creation time. The value type is string.|
157
158
159## Summary
160
161
162### Files
163
164| Name| Description|
165| -------- | -------- |
166| [avcodec_audio_channel_layout.h](avcodec__audio__channel__layout_8h.md) | Declares the enums used for audio encoding and decoding.|
167| [native_avcodec_base.h](native__avcodec__base_8h.md) | Declares the native APIs used for basic audio and video multiplexing, demultiplexing, encoding, and decoding.|
168
169
170### Structs
171
172| Name| Description|
173| -------- | -------- |
174| struct  [OH_AVCodecAsyncCallback](_o_h___a_v_codec_async_callback.md) | Describes all the asynchronous callback function pointers of an **OH_AVCodec** instance. (This function is deprecated in API version 11.)|
175| struct  [OH_AVCodecCallback](_o_h___a_v_codec_callback.md) | Describes all the asynchronous callback function pointers of an **OH_AVCodec** instance.|
176| struct  [OH_AVDataSource](_o_h___a_v_data_source.md) | Describes a user-defined data source. |
177
178
179### Types
180
181| Name| Description|
182| -------- | -------- |
183| typedef struct NativeWindow [OHNativeWindow](#ohnativewindow) | Defines a struct for a native object for the graphics interface. |
184| typedef struct [OH_AVCodec](#oh_avcodec) [OH_AVCodec](#oh_avcodec) | Defines a struct for a native object for the audio and video codec interface. |
185| typedef void(\* [OH_AVCodecOnError](#oh_avcodeconerror)) ([OH_AVCodec](#oh_avcodec) \*codec, int32_t errorCode, void \*userData) | Defines the pointer to the function that is called to report error information when an error occurs during the running of an **OH_AVCodec** instance.|
186| typedef void(\* [OH_AVCodecOnStreamChanged](#oh_avcodeconstreamchanged)) ([OH_AVCodec](#oh_avcodec) \*codec, [OH_AVFormat](_core.md#oh_avformat) \*format, void \*userData) | Defines the pointer to the function that is called to report the new stream description when the resolution of the input video stream being decoded or the output video stream that has been encoded changes.<br>From API version 15, this function pointer is called to report the new stream description when the stream sampling rate, number of audio channels, or audio sampling format changes during audio decoding. The decoding formats that can detect these changes include <!--RP3--><!--RP3End-->AAC, FLAC, MP3, and VORBIS.|
187| typedef void(\* [OH_AVCodecOnNeedInputData](#oh_avcodeconneedinputdata)) ([OH_AVCodec](#oh_avcodec) \*codec, uint32_t index, [OH_AVMemory](_core.md#oh_avmemory) \*data, void \*userData) | Defines the pointer to the function that is called when new input data is required during the running of an **OH_AVCodec** instance. The function carries a buffer to fill in new input data. (This function is deprecated in API version 11.)|
188| typedef void(\* [OH_AVCodecOnNewOutputData](#oh_avcodeconnewoutputdata)) ([OH_AVCodec](#oh_avcodec) \*codec, uint32_t index, [OH_AVMemory](_core.md#oh_avmemory) \*data, [OH_AVCodecBufferAttr](_o_h___a_v_codec_buffer_attr.md) \*attr, void \*userData) | Defines the pointer to the function that is called when new output data is generated during the running of an **OH_AVCodec** instance. The function carries a buffer filled with new output data. (This function is deprecated in API version 11.)|
189| typedef void(\* [OH_AVCodecOnNeedInputBuffer](#oh_avcodeconneedinputbuffer)) ([OH_AVCodec](#oh_avcodec) \*codec, uint32_t index, [OH_AVBuffer](_core.md#oh_avbuffer) \*buffer, void \*userData) | Defines the pointer to the function that is called when new input data is required during the running of an **OH_AVCodec** instance. The function carries a buffer to fill in new input data.|
190| typedef void(\* [OH_AVCodecOnNewOutputBuffer](#oh_avcodeconnewoutputbuffer)) ([OH_AVCodec](#oh_avcodec) \*codec, uint32_t index, [OH_AVBuffer](_core.md#oh_avbuffer) \*buffer, void \*userData) | Defines the pointer to the function that is called when new output data is generated during the running of an **OH_AVCodec** instance. The function carries a buffer filled with new output data.|
191| typedef struct [OH_AVCodecAsyncCallback](_o_h___a_v_codec_async_callback.md) [OH_AVCodecAsyncCallback](#oh_avcodecasynccallback) | Defines all the asynchronous callback function pointers of an **OH_AVCodec** instance. (This function is deprecated in API version 11.)|
192| typedef struct [OH_AVCodecCallback](_o_h___a_v_codec_callback.md) [OH_AVCodecCallback](#oh_avcodeccallback) | Defines all the asynchronous callback function pointers of an **OH_AVCodec** instance.|
193| typedef int32_t(\* [OH_AVDataSourceReadAt](#oh_avdatasourcereadat)) (OH_AVBuffer \*data, int32_t length, int64_t pos) | Defines a function pointer used to provide the capability of obtaining user-defined media data. |
194| typedef struct [OH_AVDataSource](_o_h___a_v_data_source.md) [OH_AVDataSource](#oh_avdatasource) | Defines a struct for a user-defined data source. |
195| typedef enum [OH_MediaType](#oh_mediatype-1) [OH_MediaType](#oh_mediatype) | Defines an enum for the media types.|
196| typedef enum [OH_AACProfile](#oh_aacprofile-1) [OH_AACProfile](#oh_aacprofile) | Defines an enum for the Advanced Audio Coding (AAC) profiles.|
197| typedef enum [OH_AVCProfile](#oh_avcprofile-1) [OH_AVCProfile](#oh_avcprofile) | Defines an enum for the Advanced Video Coding (AVC) profiles.|
198| typedef enum [OH_HEVCProfile](#oh_hevcprofile-1) [OH_HEVCProfile](#oh_hevcprofile) | Defines an enum for the High Efficiency Video Coding (HEVC) profiles.|
199| typedef enum [OH_VVCProfile](#oh_vvcprofile-1) [OH_VVCProfile](#oh_vvcprofile) | Defines an enum for the VVC profiles.|
200| typedef enum [OH_H263Profile](#oh_h263profile-1) [OH_H263Profile](#oh_h263profile) | Defines an enum for the H.263 profiles.|
201| typedef enum [OH_MPEG2Profile](#oh_mpeg2profile-1) [OH_MPEG2Profile](#oh_mpeg2profile) | Defines an enum for the MPEG2 profiles.|
202| typedef enum [OH_MPEG4Profile](#oh_mpeg4profile-1) [OH_MPEG4Profile](#oh_mpeg4profile) | Defines an enum for the MPEG4 profiles.|
203| typedef enum [OH_AVOutputFormat](#oh_avoutputformat-1) [OH_AVOutputFormat](#oh_avoutputformat) | Defines an enum for the output file formats supported by a muxer.|
204| typedef enum [OH_AVSeekMode](#oh_avseekmode-1) [OH_AVSeekMode](#oh_avseekmode) | Defines an enum for the seek modes.|
205| typedef enum [OH_ScalingMode](#oh_scalingmode-1) [OH_ScalingMode](#oh_scalingmode) | Defines an enum for the scaling modes. This enum is used only in surface mode. (This type is deprecated from API version 14.)|
206| typedef enum [OH_BitsPerSample](#oh_bitspersample-1) [OH_BitsPerSample](#oh_bitspersample) | Defines an enum for the number of audio bits for each coded sample.|
207| typedef enum [OH_ColorPrimary](#oh_colorprimary-1) [OH_ColorPrimary](#oh_colorprimary) | Defines an enum for the primary colors.|
208| typedef enum [OH_TransferCharacteristic](#oh_transfercharacteristic-1) [OH_TransferCharacteristic](#oh_transfercharacteristic) | Defines an enum for the transfer characteristics.|
209| typedef enum [OH_MatrixCoefficient](#oh_matrixcoefficient-1) [OH_MatrixCoefficient](#oh_matrixcoefficient) | Defines an enum for the matrix coefficients.|
210| typedef enum [OH_AVCLevel](#oh_avclevel-1) [OH_AVCLevel](#oh_avclevel) | Defines an enum for the AVC levels. |
211| typedef enum [OH_HEVCLevel](#oh_hevclevel-1) [OH_HEVCLevel](#oh_hevclevel) | Defines an enum for the HEVC levels. |
212| typedef enum [OH_VVCLevel](#oh_vvclevel-1) [OH_VVCLevel](#oh_vvclevel) | Defines an enum for the VVC levels. |
213| typedef enum [OH_H263Level ](#oh_h263level-1) [OH_H263Level ](#oh_h263level) | Defines an enum for the H.263 levels. |
214| typedef enum [OH_MPEG2Level](#oh_mpeg2level-1) [OH_MPEG2Level](#oh_mpeg2level) | Defines an enum for the MPEG2 levels.|
215| typedef enum [OH_MPEG4Level](#oh_mpeg4level-1) [OH_MPEG4Level](#oh_mpeg4level) | Defines an enum for the MPEG4 levels.|
216| typedef enum [OH_TemporalGopReferenceMode](#oh_temporalgopreferencemode-1) [OH_TemporalGopReferenceMode](#oh_temporalgopreferencemode) | Defines an enum for the reference modes of temporal image groups. |
217| typedef enum [OH_BitrateMode](#oh_bitratemode-1) [OH_BitrateMode](#oh_bitratemode) | Defines an enum for the bit rate modes of an encoder. |
218
219
220### Enums
221
222| Name| Description|
223| -------- | -------- |
224| [AudioChannelSet](#audiochannelset) : uint64_t {<br>FRONT_LEFT = 1ULL &lt;&lt; 0U,<br>FRONT_RIGHT = 1ULL &lt;&lt; 1U,<br>FRONT_CENTER = 1ULL &lt;&lt; 2U,<br>LOW_FREQUENCY = 1ULL &lt;&lt; 3U,<br>BACK_LEFT = 1ULL &lt;&lt; 4U,<br>BACK_RIGHT = 1ULL &lt;&lt; 5U,<br>FRONT_LEFT_OF_CENTER = 1ULL &lt;&lt; 6U,<br>FRONT_RIGHT_OF_CENTER = 1ULL &lt;&lt; 7U,<br>BACK_CENTER = 1ULL &lt;&lt; 8U,<br>SIDE_LEFT = 1ULL &lt;&lt; 9U,<br>SIDE_RIGHT = 1ULL &lt;&lt; 10U,<br>TOP_CENTER = 1ULL &lt;&lt; 11U,<br>TOP_FRONT_LEFT = 1ULL &lt;&lt; 12U,<br>TOP_FRONT_CENTER = 1ULL &lt;&lt; 13U,<br>TOP_FRONT_RIGHT = 1ULL &lt;&lt; 14U,<br>TOP_BACK_LEFT = 1ULL &lt;&lt; 15U,<br>TOP_BACK_CENTER = 1ULL &lt;&lt; 16U,<br>TOP_BACK_RIGHT = 1ULL &lt;&lt; 17U,<br>STEREO_LEFT = 1ULL &lt;&lt; 29U,<br>STEREO_RIGHT = 1ULL &lt;&lt; 30U,<br>WIDE_LEFT = 1ULL &lt;&lt; 31U,<br>WIDE_RIGHT = 1ULL &lt;&lt; 32U,<br>SURROUND_DIRECT_LEFT = 1ULL &lt;&lt; 33U,<br>SURROUND_DIRECT_RIGHT = 1ULL &lt;&lt; 34U,<br>LOW_FREQUENCY_2 = 1ULL &lt;&lt; 35U,<br>TOP_SIDE_LEFT = 1ULL &lt;&lt; 36U,<br>TOP_SIDE_RIGHT = 1ULL &lt;&lt; 37U,<br>BOTTOM_FRONT_CENTER = 1ULL &lt;&lt; 38U,<br>BOTTOM_FRONT_LEFT = 1ULL &lt;&lt; 39U,<br>BOTTOM_FRONT_RIGHT = 1ULL &lt;&lt; 40U,<br>AMBISONICS_ACN0 = 1ULL &lt;&lt; 41U,<br>AMBISONICS_ACN1 = 1ULL &lt;&lt; 42U,<br>AMBISONICS_ACN2 = 1ULL &lt;&lt; 43U,<br>AMBISONICS_ACN3 = 1ULL &lt;&lt; 44U,<br>AMBISONICS_W = AMBISONICS_ACN0,<br>AMBISONICS_Y = AMBISONICS_ACN1,<br>AMBISONICS_Z = AMBISONICS_ACN2,<br>AMBISONICS_X = AMBISONICS_ACN3,<br>AMBISONICS_ACN4 = 1ULL &lt;&lt; 45U,<br>AMBISONICS_ACN5 = 1ULL &lt;&lt; 46U,<br>AMBISONICS_ACN6 = 1ULL &lt;&lt; 47U,<br>AMBISONICS_ACN7 = 1ULL &lt;&lt; 48U,<br>AMBISONICS_ACN8 = 1ULL &lt;&lt; 49U,<br>AMBISONICS_ACN9 = 1ULL &lt;&lt; 50U,<br>AMBISONICS_ACN10 = 1ULL &lt;&lt; 51U,<br>AMBISONICS_ACN11 = 1ULL &lt;&lt; 52U,<br>AMBISONICS_ACN12 = 1ULL &lt;&lt; 53U,<br>AMBISONICS_ACN13 = 1ULL &lt;&lt; 54U,<br>AMBISONICS_ACN14 = 1ULL &lt;&lt; 55U,<br>AMBISONICS_ACN15 = 1ULL &lt;&lt; 56U<br>} | Enumerates the audio channel sets. Each channel number is mapped to a variable of int64_t. (This function is deprecated in API version 11.)|
225| [AudioChannelLayout](#audiochannellayout) : uint64_t {<br>UNKNOWN_CHANNEL_LAYOUT = 0,<br>MONO = (AudioChannelSet::FRONT_CENTER),<br>STEREO = (AudioChannelSet::FRONT_LEFT \| AudioChannelSet::FRONT_RIGHT),<br>CH_2POINT1 = (STEREO \| AudioChannelSet::LOW_FREQUENCY),<br>CH_2_1 = (STEREO \| AudioChannelSet::BACK_CENTER),<br>SURROUND = (STEREO \| AudioChannelSet::FRONT_CENTER),<br>CH_3POINT1 = (SURROUND \| AudioChannelSet::LOW_FREQUENCY),<br>CH_4POINT0 = (SURROUND \| AudioChannelSet::BACK_CENTER),<br>CH_4POINT1 = (CH_4POINT0 \| AudioChannelSet::LOW_FREQUENCY),<br>CH_2_2 = (STEREO \| AudioChannelSet::SIDE_LEFT \| AudioChannelSet::SIDE_RIGHT),<br>QUAD = (STEREO \| AudioChannelSet::BACK_LEFT \| AudioChannelSet::BACK_RIGHT),<br>CH_5POINT0 = (SURROUND \| AudioChannelSet::SIDE_LEFT \| AudioChannelSet::SIDE_RIGHT),<br>CH_5POINT1 = (CH_5POINT0 \| AudioChannelSet::LOW_FREQUENCY),<br>CH_5POINT0_BACK = (SURROUND \| AudioChannelSet::BACK_LEFT \| AudioChannelSet::BACK_RIGHT),<br>CH_5POINT1_BACK = (CH_5POINT0_BACK \| AudioChannelSet::LOW_FREQUENCY),<br>CH_6POINT0 = (CH_5POINT0 \| AudioChannelSet::BACK_CENTER),<br>CH_6POINT0_FRONT = (CH_2_2 \| AudioChannelSet::FRONT_LEFT_OF_CENTER \| AudioChannelSet::FRONT_RIGHT_OF_CENTER),<br>HEXAGONAL = (CH_5POINT0_BACK \| AudioChannelSet::BACK_CENTER),<br>CH_6POINT1 = (CH_5POINT1 \| AudioChannelSet::BACK_CENTER),<br>CH_6POINT1_BACK = (CH_5POINT1_BACK \| AudioChannelSet::BACK_CENTER),<br>CH_6POINT1_FRONT = (CH_6POINT0_FRONT \| AudioChannelSet::LOW_FREQUENCY),<br>CH_7POINT0 = (CH_5POINT0 \| AudioChannelSet::BACK_LEFT \| AudioChannelSet::BACK_RIGHT),<br>CH_7POINT0_FRONT = (CH_5POINT0 \| AudioChannelSet::FRONT_LEFT_OF_CENTER \| AudioChannelSet::FRONT_RIGHT_OF_CENTER),<br>CH_7POINT1 = (CH_5POINT1 \| AudioChannelSet::BACK_LEFT \| AudioChannelSet::BACK_RIGHT),<br>CH_7POINT1_WIDE = (CH_5POINT1 \| AudioChannelSet::FRONT_LEFT_OF_CENTER \| AudioChannelSet::FRONT_RIGHT_OF_CENTER),<br>CH_7POINT1_WIDE_BACK, CH_3POINT1POINT2 = (CH_3POINT1 \| AudioChannelSet::TOP_FRONT_LEFT \| AudioChannelSet::TOP_FRONT_RIGHT),<br>CH_5POINT1POINT2 = (CH_5POINT1 \| AudioChannelSet::TOP_SIDE_LEFT \| AudioChannelSet::TOP_SIDE_RIGHT),<br>CH_5POINT1POINT4, CH_7POINT1POINT2 = (CH_7POINT1 \| AudioChannelSet::TOP_SIDE_LEFT \| AudioChannelSet::TOP_SIDE_RIGHT),<br>CH_7POINT1POINT4, CH_9POINT1POINT4 = (CH_7POINT1POINT4 \| AudioChannelSet::WIDE_LEFT \| AudioChannelSet::WIDE_RIGHT),<br>CH_9POINT1POINT6 = (CH_9POINT1POINT4 \| AudioChannelSet::TOP_SIDE_LEFT \| AudioChannelSet::TOP_SIDE_RIGHT),<br>CH_10POINT2, CH_22POINT2, OCTAGONAL = (CH_5POINT0 \| AudioChannelSet::BACK_LEFT \| AudioChannelSet::BACK_CENTER \| AudioChannelSet::BACK_RIGHT),<br>HEXADECAGONAL, STEREO_DOWNMIX = (AudioChannelSet::STEREO_LEFT \| AudioChannelSet::STEREO_RIGHT),<br>HOA_FIRST,<br>HOA_SECOND,<br>HOA_THIRD<br>} | Enumerates the types of the audio channel sets. The output format of the decoder is represented as the channel type of the codec. (This function is deprecated in API version 11.)|
226| [OH_MediaType](#oh_mediatype-1) {<br>MEDIA_TYPE_AUD = 0,<br>MEDIA_TYPE_VID = 1,<br>MEDIA_TYPE_SUBTITILE = 2<br>} | Enumerates the media types.|
227| [OH_AACProfile](#oh_aacprofile-1) {<br>AAC_PROFILE_LC = 0,<br>AAC_PROFILE_HE = 3,<br>AAC_PROFILE_HE_V2 = 4<br>} | Enumerates the AAC profiles.<!--Del--><br>(**AAC_PROFILE_HE** and **AAC_PROFILE_HE_V2** are not available yet.)<!--DelEnd--> |
228| [OH_AVCProfile](#oh_avcprofile-1) {<br>AVC_PROFILE_BASELINE = 0,<br>AVC_PROFILE_HIGH = 4,<br>AVC_PROFILE_MAIN = 8<br>} | Enumerates the AVC profiles.|
229| [OH_HEVCProfile](#oh_hevcprofile-1) {<br>HEVC_PROFILE_MAIN = 0,<br>HEVC_PROFILE_MAIN_10 = 1,<br>HEVC_PROFILE_MAIN_STILL = 2,<br>HEVC_PROFILE_MAIN_10_HDR10 = 3,<br>HEVC_PROFILE_MAIN_10_HDR10_PLUS = 4<br>} | Enumerates the HEVC profiles.<br>(**HEVC_PROFILE_MAIN_10_HDR10** and **HEVC_PROFILE_MAIN_10_HDR10_PLUS** are deprecated since API version 14.)|
230| [OH_VVCProfile](#oh_vvcprofile-1) {<br>VVC_PROFILE_MAIN_10 = 1, <br>VVC_PROFILE_MAIN_12 = 2, <br>VVC_PROFILE_MAIN_12_INTRA = 10, <br>VVC_PROFILE_MULTI_MAIN_10 = 17, <br>VVC_PROFILE_MAIN_10_444 = 33, <br>VVC_PROFILE_MAIN_12_444 = 34, <br>VVC_PROFILE_MAIN_16_444 = 36, <br>VVC_PROFILE_MAIN_12_444_INTRA = 42, <br>VVC_PROFILE_MAIN_16_444_INTRA = 44, <br>VVC_PROFILE_MULTI_MAIN_10_444 = 49, <br>VVC_PROFILE_MAIN_10_STILL = 65, <br>VVC_PROFILE_MAIN_12_STILL = 66, <br>VVC_PROFILE_MAIN_10_444_STILL = 97, <br>VVC_PROFILE_MAIN_12_444_STILL = 98, <br>VVC_PROFILE_MAIN_16_444_STILL = 100 <br>} | Enumerates the VVC profiles.|
231| [OH_H263Profile](#oh_h263profile-1) {<br>H263_PROFILE_BASELINE = 0,<br>H263_PROFILE_VERSION_1_BACKWARD_COMPATIBILITY = 2<br>} | Enumerates the H.263 profiles.|
232| [OH_MPEG2Profile](#oh_mpeg2profile-1) {<br>MPEG2_PROFILE_SIMPLE = 0,<br>MPEG2_PROFILE_MAIN = 1,<br>MPEG2_PROFILE_SNR = 2,<br>MPEG2_PROFILE_SPATIAL = 3,<br>MPEG2_PROFILE_HIGH = 4,<br>MPEG2_PROFILE_422 = 5<br>} | Enumerates the MPEG2 profiles.|
233| [OH_MPEG4Profile](#oh_mpeg4profile-1) {<br>MPEG4_PROFILE_SIMPLE = 0,<br>MPEG4_PROFILE_SIMPLE_SCALABLE = 1,<br>MPEG4_PROFILE_CORE = 2,<br>MPEG4_PROFILE_MAIN = 3,<br>MPEG4_PROFILE_NBIT = 4,<br>MPEG4_PROFILE_HYBRID = 5,<br>MPEG4_PROFILE_BASIC_ANIMATED_TEXTURE = 6,<br>MPEG4_PROFILE_SCALABLE_TEXTURE = 7,<br>MPEG4_PROFILE_SIMPLE_FA = 8,<br>MPEG4_PROFILE_ADVANCED_REAL_TIME_SIMPLE = 9,<br>MPEG4_PROFILE_CORE_SCALABLE = 10,<br>MPEG4_PROFILE_ADVANCED_CODING_EFFICIENCY = 11,<br>MPEG4_PROFILE_ADVANCED_CORE = 12,<br>MPEG4_PROFILE_ADVANCED_SCALABLE_TEXTURE = 13,<br>MPEG4_PROFILE_ADVANCED_SIMPLE = 17<br>} | Enumerates the MPEG4 profiles.|
234| [OH_AVOutputFormat](#oh_avoutputformat-1) {<br>AV_OUTPUT_FORMAT_DEFAULT = 0,<br>AV_OUTPUT_FORMAT_MPEG_4 = 2,<br>AV_OUTPUT_FORMAT_M4A = 6,<br>AV_OUTPUT_FORMAT_AMR = 8,<br>AV_OUTPUT_FORMAT_MP3 = 9,<br>AV_OUTPUT_FORMAT_WAV = 10, <br>AV_OUTPUT_FORMAT_AAC = 11<br>} | Enumerates the output file formats supported by a muxer.|
235| [OH_AVSeekMode](#oh_avseekmode-1) {<br>SEEK_MODE_NEXT_SYNC = 0,<br>SEEK_MODE_PREVIOUS_SYNC,<br>SEEK_MODE_CLOSEST_SYNC<br>} | Enumerates the seek modes.|
236| [OH_ScalingMode](#oh_scalingmode-1) {<br>SCALING_MODE_SCALE_TO_WINDOW = 1,<br>SCALING_MODE_SCALE_CROP = 2<br>} | Enumerates the scaling modes. (This enum is deprecated from API version 14.)|
237| [OH_BitsPerSample](#oh_bitspersample-1) {<br>SAMPLE_U8 = 0, SAMPLE_S16LE = 1,<br>SAMPLE_S24LE = 2, SAMPLE_S32LE = 3,<br>SAMPLE_F32LE = 4, SAMPLE_U8P = 5,<br>SAMPLE_S16P = 6, SAMPLE_S24P = 7,<br>SAMPLE_S32P = 8, SAMPLE_F32P = 9,<br>INVALID_WIDTH = -1<br>} | Enumerates the number of audio bits for each coded sample.|
238| [OH_ColorPrimary](#oh_colorprimary-1) {<br>COLOR_PRIMARY_BT709 = 1,<br>COLOR_PRIMARY_UNSPECIFIED = 2,<br>COLOR_PRIMARY_BT470_M = 4,<br>COLOR_PRIMARY_BT601_625 = 5,<br>COLOR_PRIMARY_BT601_525 = 6,<br>COLOR_PRIMARY_SMPTE_ST240 = 7,<br>COLOR_PRIMARY_GENERIC_FILM = 8,<br>COLOR_PRIMARY_BT2020 = 9,<br>COLOR_PRIMARY_SMPTE_ST428 = 10,<br>COLOR_PRIMARY_P3DCI = 11,<br>COLOR_PRIMARY_P3D65 = 12<br>} | Enumerates the primary colors.|
239| [OH_TransferCharacteristic](#oh_transfercharacteristic-1) {<br>TRANSFER_CHARACTERISTIC_BT709 = 1,<br>TRANSFER_CHARACTERISTIC_UNSPECIFIED = 2,<br>TRANSFER_CHARACTERISTIC_GAMMA_2_2 = 4,<br>TRANSFER_CHARACTERISTIC_GAMMA_2_8 = 5,<br>TRANSFER_CHARACTERISTIC_BT601 = 6,<br>TRANSFER_CHARACTERISTIC_SMPTE_ST240 = 7,<br>TRANSFER_CHARACTERISTIC_LINEAR = 8,<br>TRANSFER_CHARACTERISTIC_LOG = 9,<br>TRANSFER_CHARACTERISTIC_LOG_SQRT = 10,<br>TRANSFER_CHARACTERISTIC_IEC_61966_2_4 = 11,<br>TRANSFER_CHARACTERISTIC_BT1361 = 12,<br>TRANSFER_CHARACTERISTIC_IEC_61966_2_1 = 13,<br>TRANSFER_CHARACTERISTIC_BT2020_10BIT = 14,<br>TRANSFER_CHARACTERISTIC_BT2020_12BIT = 15,<br>TRANSFER_CHARACTERISTIC_PQ = 16,<br>TRANSFER_CHARACTERISTIC_SMPTE_ST428 = 17,<br>TRANSFER_CHARACTERISTIC_HLG = 18<br>} | Enumerates the transfer characteristics.|
240| [OH_MatrixCoefficient](#oh_matrixcoefficient-1) {<br>MATRIX_COEFFICIENT_IDENTITY = 0,<br>MATRIX_COEFFICIENT_BT709 = 1,<br>MATRIX_COEFFICIENT_UNSPECIFIED = 2,<br>MATRIX_COEFFICIENT_FCC = 4,<br>MATRIX_COEFFICIENT_BT601_625 = 5,<br>MATRIX_COEFFICIENT_BT601_525 = 6, MATRIX_COEFFICIENT_SMPTE_ST240 = 7,<br>MATRIX_COEFFICIENT_YCGCO = 8,<br>MATRIX_COEFFICIENT_BT2020_NCL = 9,<br>MATRIX_COEFFICIENT_BT2020_CL = 10,<br>MATRIX_COEFFICIENT_SMPTE_ST2085 = 11,<br>MATRIX_COEFFICIENT_CHROMATICITY_NCL = 12,<br>MATRIX_COEFFICIENT_CHROMATICITY_CL = 13,<br>MATRIX_COEFFICIENT_ICTCP = 14<br>} | Enumerates the matrix coefficients.|
241| [OH_AVCLevel](#oh_avclevel-1) {<br>AVC_LEVEL_1 = 0, <br>AVC_LEVEL_1b = 1, <br>AVC_LEVEL_11 = 2, <br>AVC_LEVEL_12 = 3,<br>AVC_LEVEL_13 = 4, <br>AVC_LEVEL_2 = 5, <br>AVC_LEVEL_21 = 6, <br>AVC_LEVEL_22 = 7,<br>AVC_LEVEL_3 = 8, <br>AVC_LEVEL_31 = 9, <br>AVC_LEVEL_32 = 10, <br>AVC_LEVEL_4 = 11,<br>AVC_LEVEL_41 = 12, <br>AVC_LEVEL_42 = 13, <br>AVC_LEVEL_5 = 14, <br>AVC_LEVEL_51 = 15, <br>AVC_LEVEL_52 = 16, <br>AVC_LEVEL_6 = 17, <br>AVC_LEVEL_61 = 18, <br>AVC_LEVEL_62 = 19<br>} | Enumerates the AVC levels. |
242| [OH_HEVCLevel](#oh_hevclevel-1) {<br>HEVC_LEVEL_1 = 0, <br>HEVC_LEVEL_2 = 1, <br>HEVC_LEVEL_21 = 2, <br>HEVC_LEVEL_3 = 3,<br>HEVC_LEVEL_31 = 4, <br>HEVC_LEVEL_4 = 5, <br>HEVC_LEVEL_41 = 6, <br>HEVC_LEVEL_5 = 7,<br>HEVC_LEVEL_51 = 8, <br>HEVC_LEVEL_52 = 9, <br>HEVC_LEVEL_6 = 10, <br>HEVC_LEVEL_61 = 11,<br>HEVC_LEVEL_62 = 12<br>} | Enumerates the HEVC levels. |
243| [OH_VVCLevel](#oh_vvclevel-1) {<br>VVC_LEVEL_1 = 16, <br>VVC_LEVEL_2 = 32, <br>VVC_LEVEL_21 = 35, <br>VVC_LEVEL_3 = 48, <br>VVC_LEVEL_31 = 51, <br>VVC_LEVEL_4 = 64, <br>VVC_LEVEL_41 = 67, <br>VVC_LEVEL_5 = 80, <br>VVC_LEVEL_51 = 83, <br>VVC_LEVEL_52 = 86, <br>VVC_LEVEL_6 = 96, <br>VVC_LEVEL_61 = 99, <br>VVC_LEVEL_62 = 102, <br>VVC_LEVEL_63 = 105, <br>VVC_LEVEL_155 = 255<br>} | Enumerates the VVC levels. |
244| [OH_H263Level ](#oh_h263level-1) {<br>H263_LEVEL_10 = 0, <br>H263_LEVEL_20 = 1, <br>H263_LEVEL_30 = 2, <br>H263_LEVEL_40 = 3, <br>H263_LEVEL_45 = 4, <br>H263_LEVEL_50 = 5, <br>H263_LEVEL_60 = 6, <br>H263_LEVEL_70 = 7<br>} | Enumerates the H.263 levels. |
245| [OH_MPEG2Level](#oh_mpeg2level-1) {<br>MPEG2_LEVEL_LL = 0,<br>MPEG2_LEVEL_ML = 1,<br>MPEG2_LEVEL_H14 = 2,<br>MPEG2_LEVEL_HL = 3<br> } | Enumerates the MPEG2 levels.|
246| [OH_MPEG4Level](#oh_mpeg4level-1) {<br>MPEG4_LEVEL_0 = 0,<br>MPEG4_LEVEL_0B = 1,<br>MPEG4_LEVEL_1 = 2,<br>MPEG4_LEVEL_2 = 3,<br>MPEG4_LEVEL_3 = 4,<br>MPEG4_LEVEL_3B = 5,<br>MPEG4_LEVEL_4 = 6,<br>MPEG4_LEVEL_4A = 7,<br>MPEG4_LEVEL_5 = 8,<br>MPEG4_LEVEL_6 = 9<br>} | Enumerates the MPEG4 levels.|
247| [OH_TemporalGopReferenceMode](#oh_temporalgopreferencemode-1) { <br>ADJACENT_REFERENCE = 0, <br>JUMP_REFERENCE = 1, <br>UNIFORMLY_SCALED_REFERENCE = 2 <br>} | Enumerates the reference modes of temporal image groups. |
248| [OH_BitrateMode](#oh_bitratemode-1) { <br>BITRATE_MODE_CBR = 0, <br>BITRATE_MODE_VBR = 1, <br>BITRATE_MODE_CQ = 2 } | Enumerates the bit rate modes of an encoder. |
249
250### Variables
251
252| Name| Description|
253| -------- | -------- |
254| const char \* [OH_AVCODEC_MIMETYPE_AUDIO_AAC](#oh_avcodec_mimetype_audio_aac) | Pointer to the key that describes the MIME type of the AAC audio codec.|
255| const char \* [OH_AVCODEC_MIMETYPE_AUDIO_FLAC](#oh_avcodec_mimetype_audio_flac) | Pointer to the key that describes the MIME type of the Free Lossless Audio Codec (FLAC) audio codec.|
256| const char \* [OH_AVCODEC_MIMETYPE_AUDIO_OPUS](#oh_avcodec_mimetype_audio_opus) | Pointer to the key that describes the MIME type of the Opus audio codec. <!--Del-->(This specification is not available yet.)<!--DelEnd-->  |
257| const char \* [OH_AVCODEC_MIMETYPE_AUDIO_G711MU](#oh_avcodec_mimetype_audio_g711mu) | Pointer to the key that describes the MIME type of the G.711 mu-law audio codec.|
258| const char \* [OH_AVCODEC_MIMETYPE_AUDIO_VORBIS](#oh_avcodec_mimetype_audio_vorbis) | Pointer to the key that describes the MIME type of the Vorbis audio decoder.|
259| const char \* [OH_AVCODEC_MIMETYPE_AUDIO_MPEG](#oh_avcodec_mimetype_audio_mpeg) | Pointer to the key that describes the MIME type of the MP3 audio decoder.|
260| const char \* [OH_AVCODEC_MIMETYPE_AUDIO_VIVID](#oh_avcodec_mimetype_audio_vivid) | Pointer to the key that describes the MIME type of the Audio Vivid audio decoder. <!--Del-->(This specification is not available yet.)<!--DelEnd-->  |
261| const char \* [OH_AVCODEC_MIMETYPE_AUDIO_AMR_NB](#oh_avcodec_mimetype_audio_amr_nb) | Pointer to the key that describes the MIME type of the AMR-NB audio decoder.|
262| const char \* [OH_AVCODEC_MIMETYPE_AUDIO_AMR_WB](#oh_avcodec_mimetype_audio_amr_wb) | Pointer to the key that describes the MIME type of the AMR-WB audio decoder.|
263| const char \* [OH_AVCODEC_MIMETYPE_AUDIO_APE](#oh_avcodec_mimetype_audio_ape) |Pointer to the key that describes the MIME type of the APE audio decoder.                        |
264| const char \* [OH_AVCODEC_MIMETYPE_VIDEO_VVC](#oh_avcodec_mimetype_video_vvc) | Pointer to the key that describes the MIME type of the VVC (H.266) video codec.|
265| const char \* [OH_AVCODEC_MIMETYPE_VIDEO_HEVC](#oh_avcodec_mimetype_video_hevc) | Pointer to the key that describes the MIME type of the HEVC (H.265) video codec.|
266| const char \* [OH_AVCODEC_MIMETYPE_VIDEO_AVC](#oh_avcodec_mimetype_video_avc) | Pointer to the key that describes the MIME type of the AVC (H.264) video codec.|
267| const char \* [OH_AVCODEC_MIMETYPE_VIDEO_H263](#oh_avcodec_mimetype_video_h263) | Pointer to the key that describes the MIME type of the H.263 video codec.                    |
268| const char \* [OH_AVCODEC_MIMETYPE_VIDEO_MPEG4](#oh_avcodec_mimetype_video_mpeg4) | Pointer to the key that describes the MIME type of the MPEG4 video encoder, which is used only for multiplexing MPEG4 video streams. (This function is deprecated in API version 11.)|
269| const char \* [OH_AVCODEC_MIMETYPE_VIDEO_MPEG2](#oh_avcodec_mimetype_video_mpeg2) | Pointer to the key that describes the MIME type of MPEG2 video codec.                       |
270| const char \* [OH_AVCODEC_MIMETYPE_VIDEO_MPEG4_PART2](#oh_avcodec_mimetype_video_mpeg4_part2) | Pointer to the key that describes the MIME type of MPEG4 Part 2 video codec.        |
271| const char \* [OH_AVCODEC_MIMETYPE_IMAGE_JPG](#oh_avcodec_mimetype_image_jpg) | Pointer to the key that describes the MIME type of the JPG image encoder, which is used only for multiplexing JPG covers.|
272| const char \* [OH_AVCODEC_MIMETYPE_IMAGE_PNG](#oh_avcodec_mimetype_image_png) | Pointer to the key that describes the MIME type of the PNG image encoder, which is used only for multiplexing PNG covers.|
273| const char \* [OH_AVCODEC_MIMETYPE_IMAGE_BMP](#oh_avcodec_mimetype_image_bmp) | Pointer to the key that describes the MIME type of the BMP image encoder, which is used only for multiplexing BMP covers.|
274| const char \* [OH_AVCODEC_MIMETYPE_SUBTITLE_WEBVTT](#oh_avcodec_mimetype_subtitle_webvtt) |Pointer to the key that describes the MIME type of the WEBVTT subtitle demuxer.                |
275| const char \* [OH_AVCODEC_MIMETYPE_SUBTITLE_SRT](#oh_avcodec_mimetype_subtitle_srt) |Pointer to the key that describes the MIME type of the SRT subtitle demuxer.                        |
276| const char \* [OH_FEATURE_PROPERTY_KEY_VIDEO_ENCODER_MAX_LTR_FRAME_COUNT](#oh_feature_property_key_video_encoder_max_ltr_frame_count) | Pointer to the key that describes the maximum number of LTR frames obtained during video encoding. The value type is int32_t. |
277| const char \* [OH_MD_KEY_CODEC_CONFIG](#oh_md_key_codec_config) | Pointer to the key that describes codec-specific data. In the case of video, data carried in **SPS/PPS** is transferred. In the case of audio, data carried in **extraData** is transferred. The value type is uint8_t\*. <!--Del-->(This key is not supported yet for the video codec.)<!--DelEnd--> |
278| const char \* [OH_MD_MAX_INPUT_BUFFER_COUNT](#oh_md_max_input_buffer_count) | Pointer to the key that describes the maximum number of input buffers. The value type is int32_t.|
279| const char \* [OH_MD_MAX_OUTPUT_BUFFER_COUNT](#oh_md_max_output_buffer_count) | Pointer to the key that describes the maximum number of output buffers. The value type is int32_t.|
280| const char \* [OH_MD_KEY_BITRATE](#oh_md_key_bitrate) | Pointer to the key that describes the bit rate. The value type is int64_t.|
281| const char \* [OH_MD_KEY_PROFILE](#oh_md_key_profile) | Pointer to the key that describes the encoding grading. The value type is int32_t. For details, see [OH_AVCProfile](#oh_avcprofile), [OH_HEVCProfile](#oh_hevcprofile), and [OH_AACProfile](#oh_aacprofile).|
282| const char \* [OH_MD_KEY_MAX_INPUT_SIZE](#oh_md_key_max_input_size) | Pointer to the key that describes the maximum size of an input stream to decode. The value type is int32_t.|
283| const char \* [OH_ED_KEY_TIME_STAMP](#oh_ed_key_time_stamp) | Pointer to the key that describes the surface buffer timestamp. The value is of the int64_t type. (This variable is deprecated from API version 14.)|
284| const char \* [OH_ED_KEY_EOS](#oh_ed_key_eos) | Pointer to the key that describes the end of stream for the surface buffer. The value type is int32_t. (This variable is deprecated from API version 14.)|
285| const char \* [OH_MD_KEY_WIDTH](#oh_md_key_width) | Pointer to the key that describes the video width. The value type is int32_t.|
286| const char \* [OH_MD_KEY_HEIGHT](#oh_md_key_height) | Pointer to the key that describes the video height. The value type is int32_t.|
287| const char \* [OH_MD_KEY_PIXEL_FORMAT](#oh_md_key_pixel_format) | Pointer to the key that describes the video pixel format. The value type is int32_t. For details, see [OH_AVPixelFormat](_core.md#oh_avpixelformat).|
288| const char \* [OH_MD_KEY_FRAME_RATE](#oh_md_key_frame_rate) | Pointer to the key that describes the video frame rate. The value type is double.|
289| const char \* [OH_MD_KEY_ROTATION](#oh_md_key_rotation) | Pointer to the key that describes the rotation angle of the surface. The value type is int32_t, and the value range is {0, 90, 180, 270}. The default value is 0. This key is used only for video decoding in surface mode.|
290| const char \* [OH_MD_KEY_RANGE_FLAG](#oh_md_key_range_flag) | Pointer to the key that describes the video YUV value range flag. The value type is int32_t. The value **1** means a full range, and **0** means a limited range.|
291| const char \* [OH_MD_KEY_COLOR_PRIMARIES](#oh_md_key_color_primaries) | Pointer to the key that describes the video primary color. The value type is int32_t. For details, see [OH_ColorPrimary](#oh_colorprimary). The video primary color complies with Table 2 in the H.273 standard.|
292| const char \* [OH_MD_KEY_TRANSFER_CHARACTERISTICS](#oh_md_key_transfer_characteristics) | Pointer to the key that describes the video transfer characteristics. The value type is int32_t. For details, see [OH_TransferCharacteristic](#oh_transfercharacteristic). The video transfer characteristics comply with Table 3 in the H.273 standard.|
293| const char \* [OH_MD_KEY_MATRIX_COEFFICIENTS](#oh_md_key_matrix_coefficients) | Pointer to the key that describes the video matrix coefficient. The value type is int32_t. For details, see [OH_MatrixCoefficient](#oh_matrixcoefficient). The video matrix coefficient complies with Table 4 in the H.273 standard.|
294| const char \* [OH_MD_KEY_SCALING_MODE](#oh_md_key_scaling_mode) | Pointer to the key that describes the video scaling mode. The value type is int32_t. For details, see [OH_ScalingMode](#oh_scalingmode). This key is optional and is used only for video decoding in surface mode. You are advised to set the scaling mode by calling [OH_NativeWindow_NativeWindowSetScalingModeV2](../apis-arkgraphics2d/_native_window.md#oh_nativewindow_nativewindowsetscalingmodev2). (This variable is deprecated from API version 14.)|
295| const char \* [OH_MD_KEY_VIDEO_CROP_TOP](#oh_md_key_video_crop_top) | Pointer to the key that describes the top coordinate (y) of the cropped rectangle. The value type is int32_t. |
296| const char \* [OH_MD_KEY_VIDEO_CROP_BOTTOM](#oh_md_key_video_crop_bottom) | Pointer to the key that describes the bottom coordinate (y) of the cropped rectangle. The value type is int32_t. |
297| const char \* [OH_MD_KEY_VIDEO_CROP_LEFT](#oh_md_key_video_crop_left) | Pointer to the key that describes the left coordinate (x) of the cropped rectangle. The value type is int32_t. |
298| const char \* [OH_MD_KEY_VIDEO_CROP_RIGHT](#oh_md_key_video_crop_right) | Pointer to the key that describes the right coordinate (x) of the cropped rectangle. The value type is int32_t.|
299| const char \* [OH_MD_KEY_VIDEO_DECODER_OUTPUT_ENABLE_VRR](#oh_md_key_video_decoder_output_enable_vrr) | Pointer to the key that specifies whether the decoder enables the video variable frame rate feature. The value type is int32_t.|
300| const char \* [OH_MD_KEY_VIDEO_STRIDE](#oh_md_key_video_stride) | Pointer to the key that describes the stride of the video frame. The value type is int32_t. |
301| const char \* [OH_MD_KEY_VIDEO_SLICE_HEIGHT](#oh_md_key_video_slice_height) | Pointer to the key that describes the height of the video frame. The value type is int32_t. |
302| const char \* [OH_MD_KEY_VIDEO_PIC_WIDTH](#oh_md_key_video_pic_width) | Pointer to the key that describes the width of the video frame. The value type is int32_t. |
303| const char \* [OH_MD_KEY_VIDEO_PIC_HEIGHT](#oh_md_key_video_pic_height) | Pointer to the key that describes the height of the video frame. The value type is int32_t. |
304| const char \* [OH_MD_KEY_VIDEO_ENABLE_LOW_LATENCY](#oh_md_key_video_enable_low_latency) | Pointer to the key that describes the enabled status of low-latency video codec. The value type is int32_t. The value **1** means that low-latency video codec is enabled, and **0** means the opposite. If enabled, the input and output data held by the video encoder or decoder does not exceed the amount required by the codec standard.  |
305| const char \* [OH_MD_KEY_VIDEO_ENCODE_BITRATE_MODE](#oh_md_key_video_encode_bitrate_mode) | Pointer to the key that describes the video encoding bit rate mode. The value type is int32_t. For details, see [OH_BitrateMode](#oh_bitratemode-1).|
306| const char \* [OH_MD_KEY_QUALITY](#oh_md_key_quality) | Pointer to the key that describes the required encoding quality. The value type is int32_t. This key applies only to encoders configured in constant quality mode.|
307| const char \* [OH_MD_KEY_REQUEST_I_FRAME](#oh_md_key_request_i_frame) | Pointer to the key that describes the request for immediate encoding of I-frames. The value type is int32_t.|
308| const char \* [OH_MD_KEY_I_FRAME_INTERVAL](#oh_md_key_i_frame_interval) | Pointer to the key that describes the key frame interval, in milliseconds. The value type is int32_t. This key is optional and is used only for video encoding.|
309| const char \* [OH_MD_KEY_VIDEO_ENCODER_ENABLE_TEMPORAL_SCALABILITY](#oh_md_key_video_encoder_enable_temporal_scalability) | Pointer to the key that describes the enabled status of temporal scalability. The value type is int32_t. The value **1** means temporal scalability is enabled, and **0** means the opposite. |
310| const char \* [OH_MD_KEY_VIDEO_ENCODER_TEMPORAL_GOP_SIZE](#oh_md_key_video_encoder_temporal_gop_size) | Pointer to the key that describes the size of a temporal image group. The value type is int32_t. This key is valid only when temporal scalability is enabled. |
311| const char \* [OH_MD_KEY_VIDEO_ENCODER_TEMPORAL_GOP_REFERENCE_MODE](#oh_md_key_video_encoder_temporal_gop_reference_mode) | Pointer to the key that describes the reference mode in a temporal image group. The value type is int32_t. For details, see [OH_TemporalGopReferenceMode](#oh_temporalgopreferencemode). This key is valid only when temporal scalability is enabled. |
312| const char \* [OH_MD_KEY_VIDEO_ENCODER_LTR_FRAME_COUNT](#oh_md_key_video_encoder_ltr_frame_count) | Pointer to the key that describes the number of LTR frames. The value type is int32_t. The value must be within the supported value range. This key is optional and is used only for video encoding. |
313| const char \* [OH_MD_KEY_VIDEO_ENCODER_PER_FRAME_MARK_LTR](#oh_md_key_video_encoder_per_frame_mark_ltr) | Pointer to the key that describes the key that marks the current frame as an LTR frame. The value type is int32_t. The value **1** means that the frame is marked as an LTR frame, and **0** means the opposite. This key is optional and is used only for video encoding. |
314| const char \* [OH_MD_KEY_VIDEO_ENCODER_PER_FRAME_USE_LTR](#oh_md_key_video_encoder_per_frame_use_ltr) | Pointer to the key that describes the POC number of the LTR frame referenced by the current frame. The value type is int32_t. This key is optional and is used only for video encoding. |
315| const char \* [OH_MD_KEY_VIDEO_PER_FRAME_IS_LTR](#oh_md_key_video_per_frame_is_ltr) | Pointer to the key that specifies whether the frame corresponding to the stream output from the current OH_AVBuffer is marked as an LTR frame. The value type is int32_t. The value **1** means that the frame is an LTR frame, and **0** means the opposite. This key is optional and is used only for video encoding. |
316| const char \* [OH_MD_KEY_VIDEO_PER_FRAME_POC](#oh_md_key_video_per_frame_poc) | Pointer to the key that describes the POC number of the frame. The value type is int32_t. This key is optional and is used only for video encoding. |
317| const char \* [OH_MD_KEY_VIDEO_ENCODER_QP_MAX](#oh_md_key_video_encoder_qp_max) | Pointer to the key that describes the maximum QP allowed by the video encoder. The value type is int32_t. |
318| const char \* [OH_MD_KEY_VIDEO_ENCODER_QP_MIN](#oh_md_key_video_encoder_qp_min) | Pointer to the key that describes the minimum QP allowed by the video encoder. The value type is int32_t. |
319| const char \* [OH_MD_KEY_VIDEO_ENCODER_QP_AVERAGE](#oh_md_key_video_encoder_qp_average) | Pointer to the key that describes the average QP of video frames. The value type is int32_t.|
320| const char \* [OH_MD_KEY_VIDEO_ENCODER_MSE](#oh_md_key_video_encoder_mse)     |Pointer to the key that describes the MSE of video frames. The value type is double. |
321| const char \* [OH_MD_KEY_VIDEO_ENCODER_REPEAT_PREVIOUS_FRAME_AFTER](#oh_md_key_video_encoder_repeat_previous_frame_after)    | Pointer to the key that specifies the duration (in milliseconds) for which the last frame will be resubmitted repeatedly, if no new frame is available after the previous frame is submitted to the encoder. The value type is int32_t.|
322| const char \* [OH_MD_KEY_VIDEO_ENCODER_REPEAT_PREVIOUS_MAX_COUNT](#oh_md_key_video_encoder_repeat_previous_max_count)    | Pointer to the key that describes the maximum number of times the encoder can repeat encoding the previous frame when no new frame is available. The value type is int32_t.|
323| const char \* [OH_MD_KEY_VIDEO_DECODER_OUTPUT_COLOR_SPACE](#oh_md_key_video_decoder_output_color_space)   | Pointer to the key that describes the output color space of the video decoder. The value type is int32_t. The supported value is **OH_COLORSPACE_BT709_LIMIT**.|
324| const char \* [OH_MD_KEY_AUDIO_SAMPLE_FORMAT](#oh_md_key_audio_sample_format) | Pointer to the key that describes the original audio format. The value type is int32_t. For details, see [OH_BitsPerSample](#oh_bitspersample-1).|
325| const char \* [OH_MD_KEY_AUD_CHANNEL_COUNT](#oh_md_key_aud_channel_count) | Pointer to the key that describes the number of audio channels. The value type is int32_t.|
326| const char \* [OH_MD_KEY_AUD_SAMPLE_RATE](#oh_md_key_aud_sample_rate) | Pointer to the key that describes the audio sampling rate. The value type is int32_t.|
327| const char \* [OH_MD_KEY_AUDIO_COMPRESSION_LEVEL](#oh_md_key_audio_compression_level) | Pointer to the key that describes the audio codec compression level. The value type is int32_t type. This key is used only for audio encoding.|
328| const char \* [OH_MD_KEY_CHANNEL_LAYOUT](#oh_md_key_channel_layout) | Pointer to the key that describes the required encoding channel layout. The value type is int64_t. This key applies only to encoders.|
329| const char \* [OH_MD_KEY_BITS_PER_CODED_SAMPLE](#oh_md_key_bits_per_coded_sample) | Pointer to the key that describes the number of bits for each coded sample. The value type is int32_t. This key applies to FLAC encoders. For details, see [OH_BitsPerSample](#oh_bitspersample-1).|
330| const char \* [OH_MD_KEY_SBR](#oh_md_key_sbr) | Pointer to the key that describes the AAC SBR format. The value type is int32_t. This key applies to AAC encoders.|
331| const char \* [OH_MD_KEY_COMPLIANCE_LEVEL](#oh_md_key_compliance_level) | Pointer to the key that describes the FLAC compliance level. The value type is int32_t. This key is used only for audio encoding.|
332| const char \* [OH_MD_KEY_AAC_IS_ADTS](#oh_md_key_aac_is_adts) | Pointer to the key that describes the AAC format, which can be ADTS or LATM. The value type is int32_t. This key applies to AAC decoders.|
333| const char \* [OH_MD_KEY_IDENTIFICATION_HEADER](#oh_md_key_identification_header) | Pointer to the key that describes the Vorbis identification header. The value type is uint8_t. This key applies only to Vorbis decoders.|
334| const char \* [OH_MD_KEY_SETUP_HEADER](#oh_md_key_setup_header) | Pointer to the key that describes the Vorbis setup header. The value type is uint8_t. This key applies only to Vorbis decoders.|
335| const char \* [OH_MD_KEY_AUDIO_OBJECT_NUMBER](#oh_md_key_audio_object_number) | Pointer to the key that describes the number of audio objects. The value type is int32_t. This key is used only for Audio Vivid decoding.|
336| const char \* [OH_MD_KEY_AUDIO_VIVID_METADATA](#oh_md_key_audio_vivid_metadata) | Pointer to the key that describes the Audio Vivid metadata. The value type is uint8_t\*. This key is used only for Audio Vivid decoding.|
337| const char \* [OH_MD_KEY_VIDEO_IS_HDR_VIVID](#oh_md_key_video_is_hdr_vivid) | Pointer to the key that describes whether the video track in a media file is HDR Vivid. The value type is int32_t. This key is used for both multiplexing and demultiplexing.|
338| const char \* [OH_MD_KEY_START_TIME](#oh_md_key_start_time) | Pointer to the key that describes the start time of the first frame in a media file, measured in microseconds. The value type is int64_t.    |
339| const char \* [OH_MD_KEY_TRACK_START_TIME](#oh_md_key_track_start_time) | Pointer to the key that describes the start time of the track, measured in microseconds. The value type is int64_t.    |
340| const char \* [OH_MD_KEY_TRACK_TYPE](#oh_md_key_track_type) | Pointer to the key that describes the track type in a media file. The value type is int32_t. For details, see [OH_MediaType](#oh_mediatype-1).|
341| const char \* [OH_MD_KEY_DURATION](#oh_md_key_duration) | Pointer to the key that describes the duration in a media file. The value type is int64_t.|
342| const char \* [OH_MD_KEY_TITLE](#oh_md_key_title) | Pointer to the key that describes the title in a media file. The value type is string.|
343| const char \* [OH_MD_KEY_ARTIST](#oh_md_key_artist) | Pointer to the key that describes the lyrics in a media file. The value type is string.|
344| const char \* [OH_MD_KEY_ALBUM](#oh_md_key_album) | Pointer to the key that describes the album in a media file. The value type is string.|
345| const char \* [OH_MD_KEY_ALBUM_ARTIST](#oh_md_key_album_artist) | Pointer to the key that describes the album artist of the input media. The value type is string.|
346| const char \* [OH_MD_KEY_DATE](#oh_md_key_date) | Pointer to the key that describes the date in a media file, for example, 2024. The value type is string.|
347| const char \* [OH_MD_KEY_COMMENT](#oh_md_key_comment) | Pointer to the key that describes the comment in a media file. The value type is string.|
348| const char \* [OH_MD_KEY_GENRE](#oh_md_key_genre) | Pointer to the key that describes the genre in a media file. The value type is string.|
349| const char \* [OH_MD_KEY_COPYRIGHT](#oh_md_key_copyright) | Pointer to the key that describes the copyright in a media file. The value type is string.|
350| const char \* [OH_MD_KEY_LANGUAGE](#oh_md_key_language) | Pointer to the key that describes the language in a media file. The value type is string.|
351| const char \* [OH_MD_KEY_DESCRIPTION](#oh_md_key_description) | Pointer to the key that describes the description in a media file. The value type is string.|
352| const char \* [OH_MD_KEY_LYRICS](#oh_md_key_lyrics) | Pointer to the key that describes the lyrics in a media file. The value type is string.|
353| const char \* [OH_MD_KEY_TRACK_COUNT](#oh_md_key_track_count) | Pointer to the key that describes the number of tracks in a media file. The value type is int32_t.|
354| const char \* [OH_MD_KEY_BUFFER_DURATION](#oh_md_key_buffer_duration) | Pointer to the key that describes the duration corresponding to the audio, video, or subtitle sample carried in AVBuffer, in microseconds. The value type is int64_t.      |
355| const char \* [OH_MD_KEY_DECODING_TIMESTAMP](#oh_md_key_decoding_timestamp) | Pointer to the key that describes the decoding timestamp corresponding to the audio, video, or subtitle sample carried in AVBuffer, in microseconds. The value type is int64_t. |
356| const char \* [OH_MD_KEY_CODEC_MIME](#oh_md_key_codec_mime) | Pointer to the key that describes the [MIME](#media-codec-formats) type of the codec. The value type is string.|
357| const char \* [OH_MD_KEY_VIDEO_SAR](#oh_md_key_video_sar) | Pointer to the key that describes the aspect ratio of the sample. The value type is double.|
358| const char \* [OH_MD_KEY_CREATION_TIME](#oh_md_key_creation_time) | Pointer to the key that describes the media file creation time. The value type is string.|
359
360
361## Type Description
362
363
364### OH_AACProfile
365
366```
367typedef enum OH_AACProfile OH_AACProfile
368```
369
370**Description**
371
372Defines an enum for the AAC profiles.
373
374**System capability**: SystemCapability.Multimedia.Media.CodecBase
375
376**Since**: 9
377
378
379### OH_AVCLevel
380
381```
382typedef enum OH_AVCLevel OH_AVCLevel
383```
384**Description**
385
386Defines an enum for the AVC levels.
387
388**System capability**: SystemCapability.Multimedia.Media.CodecBase
389
390**Since**: 12
391
392
393### OH_AVCodec
394
395```
396typedef struct OH_AVCodec OH_AVCodec
397```
398**Description**
399
400Defines a struct for a native object for the audio and video codec interface.
401
402**Since**: 9
403
404
405### OH_AVCodecAsyncCallback
406
407```
408typedef struct OH_AVCodecAsyncCallback OH_AVCodecAsyncCallback
409```
410
411**Description**
412
413Defines a struct for all the asynchronous callback function pointers of an **OH_AVCodec** instance. To ensure the normal running of **OH_AVCodec**, you must register the instance of this struct with the **OH_AVCodec** instance and process the information reported by the callback function.
414
415**System capability**: SystemCapability.Multimedia.Media.CodecBase
416
417**Since**: 9
418
419**Deprecated from**: 11
420
421**Substitute**: [OH_AVCodecCallback](#oh_avcodeccallback)
422
423**Parameters**
424
425| Name| Description|
426| -------- | -------- |
427| onError | Callback used to report a codec operation error. For details, see [OH_AVCodecOnError](#oh_avcodeconerror).|
428| onStreamChanged | Callback used to report a codec stream change. For details, see [OH_AVCodecOnStreamChanged](#oh_avcodeconstreamchanged).|
429| onNeedInputData | Callback used to report input data required. For details, see [OH_AVCodecOnNeedInputData](#oh_avcodeconneedinputdata).|
430| onNeedOutputData | Callback used to report output data generated. For details, see [OH_AVCodecOnNewOutputData](#oh_avcodeconnewoutputdata).|
431
432
433### OH_AVCodecCallback
434
435```
436typedef struct OH_AVCodecCallback OH_AVCodecCallback
437```
438
439**Description**
440
441Defines a struct for all the asynchronous callback function pointers of an **OH_AVCodec** instance. To ensure the normal running of **OH_AVCodec**, you must register the instance of this struct with the **OH_AVCodec** instance and process the information reported by the callback function.
442
443**System capability**: SystemCapability.Multimedia.Media.CodecBase
444
445**Since**: 11
446
447**Parameters**
448
449| Name| Description|
450| -------- | -------- |
451| onError | Callback used to report a codec operation error. For details, see [OH_AVCodecOnError](#oh_avcodeconerror).|
452| onStreamChanged | Callback used to report a codec stream change. For details, see [OH_AVCodecOnStreamChanged](#oh_avcodeconstreamchanged).|
453| onNeedInputBuffer | Callback used to report input data required. For details, see [OH_AVCodecOnNeedInputBuffer](#oh_avcodeconneedinputbuffer).|
454| onNewOutputBuffer | Callback used to report output data generated. For details, see [OH_AVCodecOnNewOutputBuffer](#oh_avcodeconnewoutputbuffer).|
455
456
457### OH_AVCodecOnError
458
459```
460typedef void(* OH_AVCodecOnError) (OH_AVCodec *codec, int32_t errorCode, void *userData)
461```
462
463**Description**
464
465Defines the pointer to the function that is called to report error information when an error occurs during the running of an **OH_AVCodec** instance.
466
467| Use Case| Error Code|
468| -------- | -------- |
469| Audio encoding/decoding| **AV_ERR_DRM_DECRYPT_FAILED**: DRM decryption failed. |
470| Video encoding/decoding | **AV_ERROR_NO_MEMORY**: System resources are insufficient.<br>**AV_ERROR_UNKNOWN**: An unknown error occurs. Analyze the error based on specific logs.<br>**AV_ERR_SERVICE_DIED**: The service is dead. |
471| Video decoding| **AV_ERR_VIDEO_UNSUPPORTED_COLOR_SPACE_CONVERSION**: The current input does not support CSC. |
472<!--RP1--><!--RP1End-->
473
474**System capability**: SystemCapability.Multimedia.Media.CodecBase
475
476**Since**: 9
477
478**Parameters**
479
480| Name| Description|
481| -------- | -------- |
482| codec | Pointer to an **OH_AVCodec** instance. |
483| errorCode | Error code. The returned error codes vary in scenarios. For details, see the table in the function description. |
484| userData | Pointer to the data on which the caller depends when executing the callback. |
485
486
487### OH_AVCodecOnNeedInputBuffer
488
489```
490typedef void(* OH_AVCodecOnNeedInputBuffer) (OH_AVCodec *codec, uint32_t index, OH_AVBuffer *buffer, void *userData)
491```
492
493**Description**
494
495Defines the pointer to the function that is called when new input data is required during the running of an **OH_AVCodec** instance. The function carries a buffer to fill in new input data.
496
497**System capability**: SystemCapability.Multimedia.Media.CodecBase
498
499**Since**: 11
500
501**Parameters**
502
503| Name| Description|
504| -------- | -------- |
505| codec | Pointer to an **OH_AVCodec** instance. |
506| index | Index of the new input buffer. |
507| buffer | Pointer to the data to fill in the new input buffer. |
508| userData | Pointer to the data on which the caller depends when executing the callback. |
509
510
511### OH_AVCodecOnNeedInputData
512
513```
514typedef void(* OH_AVCodecOnNeedInputData) (OH_AVCodec *codec, uint32_t index, OH_AVMemory *data, void *userData)
515```
516
517**Description**
518
519Defines the pointer to the function that is called when new input data is required during the running of an **OH_AVCodec** instance. The function carries a buffer to fill in new input data.
520
521**System capability**: SystemCapability.Multimedia.Media.CodecBase
522
523**Since**: 9
524
525**Deprecated from**: 11
526
527**Substitute**: [OH_AVCodecOnNeedInputBuffer](#oh_avcodeconneedinputbuffer)
528
529**Parameters**
530
531| Name| Description|
532| -------- | -------- |
533| codec | Pointer to an **OH_AVCodec** instance. |
534| index | Index of the new input buffer. |
535| data | Pointer to the data to fill in the new input buffer. |
536| userData | Pointer to the data on which the caller depends when executing the callback. |
537
538
539### OH_AVCodecOnNewOutputBuffer
540
541```
542typedef void(* OH_AVCodecOnNewOutputBuffer) (OH_AVCodec *codec, uint32_t index, OH_AVBuffer *buffer, void *userData)
543```
544
545**Description**
546
547Defines the pointer to the function that is called when new output data is generated during the running of an **OH_AVCodec** instance. The function carries a buffer filled with new output data.
548
549**System capability**: SystemCapability.Multimedia.Media.CodecBase
550
551**Since**: 11
552
553**Parameters**
554
555| Name| Description|
556| -------- | -------- |
557| codec | Pointer to an **OH_AVCodec** instance. |
558| index | Index of the new output buffer. |
559| buffer | Pointer to the data filled in the new output buffer. |
560| userData | Pointer to the data on which the caller depends when executing the callback. |
561
562
563### OH_AVCodecOnNewOutputData
564
565```
566typedef void(* OH_AVCodecOnNewOutputData) (OH_AVCodec *codec, uint32_t index, OH_AVMemory *data, OH_AVCodecBufferAttr *attr, void *userData)
567```
568
569**Description**
570
571Defines the pointer to the function that is called when new output data is generated during the running of an **OH_AVCodec** instance. The function carries a buffer filled with new output data. Note that the lifecycle of the pointer to the **OH_AVCodecBufferAttr** instance is valid only when the function pointer is being called. Do not access the pointer to the instance after the function pointer is called.
572
573**System capability**: SystemCapability.Multimedia.Media.CodecBase
574
575**Since**: 9
576
577**Deprecated from**: 11
578
579**Substitute**: [OH_AVCodecOnNewOutputBuffer](#oh_avcodeconnewoutputbuffer)
580
581**Parameters**
582
583| Name| Description|
584| -------- | -------- |
585| codec | Pointer to an **OH_AVCodec** instance. |
586| index | Index of the new output buffer. |
587| data | Pointer to the data filled in the new output buffer. |
588| attr | Pointer to the description information about the new output buffer. For details, see [OH_AVCodecBufferAttr](_o_h___a_v_codec_buffer_attr.md). |
589| userData | Pointer to the data on which the caller depends when executing the callback. |
590
591
592### OH_AVCodecOnStreamChanged
593
594```
595typedef void(* OH_AVCodecOnStreamChanged) (OH_AVCodec *codec, OH_AVFormat *format, void *userData)
596```
597
598**Description**
599
600Defines the pointer to the function that is called to report the new stream description when the resolution of the input video stream being decoded or the output video stream that has been encoded changes.<br>From API version 15, this function pointer is called to report the new stream description when the stream sampling rate, number of audio channels, or audio sampling format changes during audio decoding. The decoding formats that can detect these changes include <!--RP3--><!--RP3End-->AAC, FLAC, MP3, and VORBIS.<br>Note that the lifecycle of the pointer to the **OH_AVFormat** instance is valid only when the function pointer is being called. Do not access the pointer to the instance after the function pointer is called.
601
602**System capability**: SystemCapability.Multimedia.Media.CodecBase
603
604**Since**: 9
605
606**Parameters**
607
608| Name| Description|
609| -------- | -------- |
610| codec | Pointer to an **OH_AVCodec** instance. |
611| format | Pointer to the description information about the new output stream. |
612| userData | Pointer to the data on which the caller depends when executing the callback. |
613
614
615### OH_AVCProfile
616
617```
618typedef enum OH_AVCProfile OH_AVCProfile
619```
620
621**Description**
622
623Defines an enum for the AVC profiles.
624
625**System capability**: SystemCapability.Multimedia.Media.CodecBase
626
627**Since**: 9
628
629
630### OH_AVDataSource
631
632```
633typedef struct OH_AVDataSource OH_AVDataSource
634```
635
636**Description**
637
638Defines a struct for a user-defined data source.
639
640**System capability**: SystemCapability.Multimedia.Media.CodecBase
641
642**Since**: 12
643
644
645### OH_AVDataSourceReadAt
646
647```
648typedef int32_t(* OH_AVDataSourceReadAt) (OH_AVBuffer *data, int32_t length, int64_t pos)
649```
650
651**Description**
652
653Defines a function pointer used to provide the capability of obtaining user-defined media data.
654
655**System capability**: SystemCapability.Multimedia.Media.CodecBase
656
657**Since**: 12
658
659**Parameters**
660
661| Name| Description|
662| -------- | -------- |
663| data | Buffer to be filled in. |
664| length | Length of the data to read. |
665| pos | Offset from which the data is read. |
666
667**Returns**
668
669Actual length of the data read to the buffer.
670
671
672### OH_AVOutputFormat
673
674```
675typedef enum OH_AVOutputFormat OH_AVOutputFormat
676```
677
678**Description**
679
680Defines an enum for the output file formats supported by a muxer.
681
682**System capability**: SystemCapability.Multimedia.Media.CodecBase
683
684**Since**: 10
685
686
687### OH_AVSeekMode
688
689```
690typedef enum OH_AVSeekMode OH_AVSeekMode
691```
692
693**Description**
694
695Defines an enum for the seek modes.
696
697**System capability**: SystemCapability.Multimedia.Media.CodecBase
698
699**Since**: 10
700
701
702### OH_BitsPerSample
703
704```
705typedef enum OH_BitsPerSample OH_BitsPerSample
706```
707
708**Description**
709
710Defines an enum for the number of audio bits for each coded sample.
711
712**System capability**: SystemCapability.Multimedia.Media.CodecBase
713
714**Since**: 10
715
716
717### OH_ColorPrimary
718
719```
720typedef enum OH_ColorPrimary OH_ColorPrimary
721```
722
723**Description**
724
725Defines an enum for the primary colors.
726
727**System capability**: SystemCapability.Multimedia.Media.CodecBase
728
729**Since**: 10
730
731
732### OH_HEVCLevel
733
734```
735typedef enum OH_HEVCLevel OH_HEVCLevel
736```
737
738**Description**
739
740Defines an enum for the HEVC levels.
741
742**System capability**: SystemCapability.Multimedia.Media.CodecBase
743
744**Since**: 12
745
746
747### OH_HEVCProfile
748
749```
750typedef enum OH_HEVCProfile OH_HEVCProfile
751```
752
753**Description**
754
755Defines an enum for the HEVC profiles.
756
757**System capability**: SystemCapability.Multimedia.Media.CodecBase
758
759**Since**: 10
760
761
762### OH_MatrixCoefficient
763
764```
765typedef enum OH_MatrixCoefficient OH_MatrixCoefficient
766```
767
768**Description**
769
770Defines an enum for the matrix coefficients.
771
772**System capability**: SystemCapability.Multimedia.Media.CodecBase
773
774**Since**: 10
775
776
777### OH_MediaType
778
779```
780typedef enum OH_MediaType OH_MediaType
781```
782
783**Description**
784
785Defines an enum for the media types.
786
787**System capability**: SystemCapability.Multimedia.Media.CodecBase
788
789**Since**: 9
790
791
792### OH_MPEG2Level
793
794```
795typedef enum OH_MPEG2Level OH_MPEG2Level
796```
797
798**Description**
799
800Defines an enum for the MPEG2 levels.
801
802**System capability**: SystemCapability.Multimedia.Media.CodecBase
803
804**Since**: 17
805
806
807### OH_MPEG2Profile
808
809```
810typedef enum OH_MPEG2Profile OH_MPEG2Profile
811```
812
813**Description**
814
815Defines an enum for the MPEG2 profiles.
816
817**System capability**: SystemCapability.Multimedia.Media.CodecBase
818
819**Since**: 17
820
821
822### OH_MPEG4Level
823
824```
825typedef enum OH_MPEG4Level OH_MPEG4Level
826```
827
828**Description**
829
830Defines an enum for the MPEG4 levels.
831
832**System capability**: SystemCapability.Multimedia.Media.CodecBase
833
834**Since**: 17
835
836
837### OH_MPEG4Profile
838
839```
840typedef enum OH_MPEG4Profile OH_MPEG4Profile
841```
842
843**Description**
844
845Defines an enum for the MPEG4 profiles.
846
847**System capability**: SystemCapability.Multimedia.Media.CodecBase
848
849**Since**: 17
850
851
852### OH_ScalingMode
853
854```
855typedef enum OH_ScalingMode OH_ScalingMode
856```
857
858**Description**
859
860Defines an enum for the scaling modes. This enum is used only in surface mode.
861
862**System capability**: SystemCapability.Multimedia.Media.CodecBase
863
864**Since**: 10
865
866**Deprecated from**: 14
867
868**Substitute**: [OHScalingModeV2](../apis-arkgraphics2d/_native_window.md#ohscalingmodev2-1)
869
870
871### OH_TemporalGopReferenceMode
872
873```
874typedef enum OH_TemporalGopReferenceMode OH_TemporalGopReferenceMode
875```
876
877**Description**
878
879Defines an enum for the reference modes of temporal image groups.
880
881**System capability**: SystemCapability.Multimedia.Media.CodecBase
882
883**Since**: 12
884
885### OH_VVCLevel
886
887```
888typedef enum OH_VVCLevel OH_VVCLevel
889```
890
891**Description**
892
893Defines an enum for the VVC levels.
894
895**System capability**: SystemCapability.Multimedia.Media.CodecBase
896
897**Since**: 15
898
899
900### OH_VVCProfile
901
902```
903typedef enum OH_VVCProfile OH_VVCProfile
904```
905
906**Description**
907
908Defines an enum for the VVC profiles.
909
910**System capability**: SystemCapability.Multimedia.Media.CodecBase
911
912**Since**: 15
913
914
915### OH_H263Level
916
917```
918typedef enum OH_H263Level OH_H263Level
919```
920
921**Description**
922
923Defines an enum for the H.263 levels.
924
925**System capability**: SystemCapability.Multimedia.Media.CodecBase
926
927**Since**: 17
928
929
930### OH_H263Profile
931
932```
933typedef enum OH_H263Profile OH_H263Profile
934```
935
936**Description**
937
938Defines an enum for the H.263 profiles.
939
940**System capability**: SystemCapability.Multimedia.Media.CodecBase
941
942**Since**: 17
943
944
945### OH_TransferCharacteristic
946
947```
948typedef enum OH_TransferCharacteristic OH_TransferCharacteristic
949```
950
951**Description**
952
953Defines an enum for the transfer characteristics.
954
955**System capability**: SystemCapability.Multimedia.Media.CodecBase
956
957**Since**: 10
958
959
960### OH_BitrateMode
961
962```
963typedef enum OH_BitrateMode OH_BitrateMode
964```
965
966**Description**
967
968Defines an enum for the bit rate modes of an encoder. The key position is changed from API version 14.
969
970**System capability**: SystemCapability.Multimedia.Media.CodecBase
971
972**Since**: 10
973
974
975### OHNativeWindow
976
977```
978typedef struct NativeWindow OHNativeWindow
979```
980**Description**
981
982Defines a struct for a native object for the graphics interface.
983
984**Since**: 9
985
986
987## Enum Description
988
989
990### AudioChannelLayout
991
992```
993enum AudioChannelLayout : uint64_t
994```
995
996**Description**
997
998Enumerates the types of the audio channel sets. The output format of the decoder is represented as the channel type of the codec.
999
1000**System capability**: SystemCapability.Multimedia.Media.CodecBase
1001
1002**Since**: 10
1003
1004**Deprecated from**: 11
1005
1006**Substitute**: [OH_AudioChannelLayout](_core.md#oh_audiochannellayout)
1007
1008| Value| Description|
1009| -------- | -------- |
1010| UNKNOWN_CHANNEL_LAYOUT | Unknown.|
1011| MONO | Mono layout.|
1012| STEREO | Stereo layout|
1013| CH_2POINT1 | 2.1 layout.|
1014| CH_2_1 | 2_1 layout.|
1015| SURROUND | Surround layout.|
1016| CH_3POINT1 | 3.1 layout.|
1017| CH_4POINT0 | 4.0 layout.|
1018| CH_4POINT1 | 4.1 layout.|
1019| CH_2_2 | 2_2 layout.|
1020| QUAD | Quad layout.|
1021| CH_5POINT0 | 5.0 layout.|
1022| CH_5POINT1 | 5.1 layout.|
1023| CH_5POINT0_BACK | 5.0 rear layout.|
1024| CH_5POINT1_BACK | 5.1 rear layout.|
1025| CH_6POINT0 | 6.0 layout.|
1026| CH_6POINT0_FRONT | 6.0 front layout.|
1027| HEXAGONAL | Hexagonal layout.|
1028| CH_6POINT1 | 6.1 layout.|
1029| CH_6POINT1_BACK | 6.1 rear layout.|
1030| CH_6POINT1_FRONT | 6.1 front layout.|
1031| CH_7POINT0 | 7.0 layout.|
1032| CH_7POINT0_FRONT | 7.0 front layout.|
1033| CH_7POINT1 | 7.1 layout.|
1034| CH_7POINT1_WIDE | 7.1 wide layout.|
1035| CH_7POINT1_WIDE_BACK | 7.1 rear wide layout.|
1036| CH_3POINT1POINT2 | 3.1.2 layout.|
1037| CH_5POINT1POINT2 | 5.1.2 layout.|
1038| CH_5POINT1POINT4 | 5.1.4 layout.|
1039| CH_7POINT1POINT2 | 7.1.2 layout.|
1040| CH_7POINT1POINT4 | 7.1.4 layout.|
1041| CH_9POINT1POINT4 | 9.1.4 layout.|
1042| CH_9POINT1POINT6 | 9.1.6 layout.|
1043| CH_10POINT2 | 10.2 layout.|
1044| CH_22POINT2 | 22.2 layout.|
1045| OCTAGONAL | Octagonal layout.|
1046| HEXADECAGONAL | Hexadecagonal layout.|
1047| STEREO_DOWNMIX | Stereo downmix layout.|
1048| HOA_FIRST | High-Order Ambisonics (HOA) first-order layout.|
1049| HOA_SECOND | HOA second-order layout.|
1050| HOA_THIRD | HOA third-order layout.|
1051
1052
1053### AudioChannelSet
1054
1055```
1056enum AudioChannelSet : uint64_t
1057```
1058
1059**Description**
1060
1061Enumerates the audio channel sets. Each channel number is mapped to a variable of int64_t.
1062
1063**System capability**: SystemCapability.Multimedia.Media.CodecBase
1064
1065**Since**: 10
1066
1067**Deprecated from**: 11
1068
1069**Substitute**: [OH_AudioChannelSet](_core.md#oh_audiochannelset)
1070
1071| Value| Description|
1072| -------- | -------- |
1073| FRONT_LEFT | Front left channel.|
1074| FRONT_RIGHT | Front right channel|
1075| FRONT_CENTER | Front center channel.|
1076| LOW_FREQUENCY | Low-frequency channel.|
1077| BACK_LEFT | Rear left channel.|
1078| BACK_RIGHT | Rear right channel|
1079| FRONT_LEFT_OF_CENTER | Front left center channel.|
1080| FRONT_RIGHT_OF_CENTER | Front right center channel.|
1081| BACK_CENTER | Rear center channel.|
1082| SIDE_LEFT | Left channel.|
1083| SIDE_RIGHT | Right channel.|
1084| TOP_CENTER | Top center channel.|
1085| TOP_FRONT_LEFT | Top left front channel.|
1086| TOP_FRONT_CENTER | Top center front channel.|
1087| TOP_FRONT_RIGHT | Top right front channel.|
1088| TOP_BACK_LEFT | Top left rear channel.|
1089| TOP_BACK_CENTER | Top center rear channel.|
1090| TOP_BACK_RIGHT | Top right rear channel.|
1091| STEREO_LEFT | Stereo left channel.|
1092| STEREO_RIGHT | Stereo right channel.|
1093| WIDE_LEFT | Wide left channel.|
1094| WIDE_RIGHT | Wide right channel.|
1095| SURROUND_DIRECT_LEFT | Left surround channel.|
1096| SURROUND_DIRECT_RIGHT | Right surround channel.|
1097| LOW_FREQUENCY_2 | Low-frequency channel 2.|
1098| TOP_SIDE_LEFT | Top left channel.|
1099| TOP_SIDE_RIGHT | Top right channel.|
1100| BOTTOM_FRONT_CENTER | Bottom center front channel.|
1101| BOTTOM_FRONT_LEFT | Bottom left front channel.|
1102| BOTTOM_FRONT_RIGHT | Bottom right front channel.|
1103| AMBISONICS_ACN0 | Channel 0 for the zero-order stereo.|
1104| AMBISONICS_ACN1 | Channel 1 for the first-order stereo.|
1105| AMBISONICS_ACN2 | Channel 2 for the first-order stereo.|
1106| AMBISONICS_ACN3 | Channel 3 for the first-order stereo.|
1107| AMBISONICS_W | Equivalent to channel 0 for the zero-order stereo.|
1108| AMBISONICS_Y | Equivalent to channel 1 for the first-order stereo.|
1109| AMBISONICS_Z | Equivalent to channel 2 for the first-order stereo.|
1110| AMBISONICS_X | Equivalent to channel 3 for the first-order stereo.|
1111| AMBISONICS_ACN4 | Channel 4 for the second-order stereo.|
1112| AMBISONICS_ACN5 | Channel 5 for the second-order stereo.|
1113| AMBISONICS_ACN6 | Channel 6 for the second-order stereo.|
1114| AMBISONICS_ACN7 | Channel 7 for the second-order stereo.|
1115| AMBISONICS_ACN8 | Channel 8 for the second-order stereo.|
1116| AMBISONICS_ACN9 | Channel 9 for the third-order stereo.|
1117| AMBISONICS_ACN10 | Channel 10 for the third-order stereo.|
1118| AMBISONICS_ACN11 | Channel 11 for the third-order stereo.|
1119| AMBISONICS_ACN12 | Channel 12 for the third-order stereo.|
1120| AMBISONICS_ACN13 | Channel 13 for the third-order stereo.|
1121| AMBISONICS_ACN14 | Channel 14 for the third-order stereo.|
1122| AMBISONICS_ACN15 | Channel 15 for the third-order stereo.|
1123
1124
1125### OH_AACProfile
1126
1127```
1128enum OH_AACProfile
1129```
1130
1131**Description**
1132
1133Enumerates the AAC profiles.
1134
1135**System capability**: SystemCapability.Multimedia.Media.CodecBase
1136
1137**Since**: 9
1138
1139| Value| Description|
1140| -------- | -------- |
1141| AAC_PROFILE_LC  | AAC profile of the low complexity level.  |
1142| AAC_PROFILE_HE  | AAC profile of the high efficiency level. <!--Del-->(This specification is not available yet.)<!--DelEnd--><br>**Since**: 14|
1143| AAC_PROFILE_HE_V2 | AAC profile of the high efficiency V2 level. <!--Del-->(This specification is not available yet.)<!--DelEnd--><br>**Since**: 14|
1144
1145
1146### OH_AVCLevel
1147
1148```
1149enum OH_AVCLevel
1150```
1151
1152**Description**
1153
1154Enumerates the AVC levels.
1155
1156**System capability**: SystemCapability.Multimedia.Media.CodecBase
1157
1158**Since**: 12
1159
1160| Value| Description|
1161| -------- | -------- |
1162| AVC_LEVEL_1  | Level 1.  |
1163| AVC_LEVEL_1b  | Level 1b.  |
1164| AVC_LEVEL_11  | Level 1.1.  |
1165| AVC_LEVEL_12  | Level 1.2.  |
1166| AVC_LEVEL_13  | Level 1.3.  |
1167| AVC_LEVEL_2  | Level 2.  |
1168| AVC_LEVEL_21  | Level 2.1.  |
1169| AVC_LEVEL_22  | Level 2.2.  |
1170| AVC_LEVEL_3  | Level 3.  |
1171| AVC_LEVEL_31  | Level 3.1.  |
1172| AVC_LEVEL_32  | Level 3.2.  |
1173| AVC_LEVEL_4  | Level 4.  |
1174| AVC_LEVEL_41  | Level 4.1.  |
1175| AVC_LEVEL_42  | Level 4.2.  |
1176| AVC_LEVEL_5  | Level 5.  |
1177| AVC_LEVEL_51  | Level 5.1.  |
1178| AVC_LEVEL_52  | Level 5.2.  |
1179| AVC_LEVEL_6  | Level 6.  |
1180| AVC_LEVEL_61  | Level 6.1.  |
1181| AVC_LEVEL_62  | Level 6.2.  |
1182
1183
1184### OH_AVCProfile
1185
1186```
1187enum OH_AVCProfile
1188```
1189
1190**Description**
1191
1192Enumerates the AVC profiles.
1193
1194**System capability**: SystemCapability.Multimedia.Media.CodecBase
1195
1196**Since**: 9
1197
1198| Value| Description|
1199| -------- | -------- |
1200| AVC_PROFILE_BASELINE  | AVC baseline profile.  |
1201| AVC_PROFILE_HIGH  | AVC high profile.  |
1202| AVC_PROFILE_MAIN  | AVC main profile.  |
1203
1204
1205### OH_AVOutputFormat
1206
1207```
1208enum OH_AVOutputFormat
1209```
1210
1211**Description**
1212
1213Enumerates the output file formats supported by a muxer.
1214
1215**System capability**: SystemCapability.Multimedia.Media.CodecBase
1216
1217**Since**: 10
1218
1219| Value| Description|
1220| -------- | -------- |
1221| AV_OUTPUT_FORMAT_DEFAULT  | Default format, which is MP4.  |
1222| AV_OUTPUT_FORMAT_MPEG_4  | MP4.  |
1223| AV_OUTPUT_FORMAT_M4A  | M4A.  |
1224| AV_OUTPUT_FORMAT_AMR  | AMR.<br>**Since**: 12   |
1225| AV_OUTPUT_FORMAT_MP3  | MP3.<br>**Since**: 12  |
1226| AV_OUTPUT_FORMAT_WAV  | WAV.<br>**Since**: 12  |
1227| AV_OUTPUT_FORMAT_AAC  | AAC.<br>**Since**: 18  |
1228
1229### OH_AVSeekMode
1230
1231```
1232enum OH_AVSeekMode
1233```
1234
1235**Description**
1236
1237Enumerates the seek modes.
1238
1239**System capability**: SystemCapability.Multimedia.Media.CodecBase
1240
1241**Since**: 10
1242
1243| Value| Description|
1244| -------- | -------- |
1245| SEEK_MODE_NEXT_SYNC  | Seeks to the next I-frame at the specified position. If there is no I-frame after the specified position, the seek operation may fail.  |
1246| SEEK_MODE_PREVIOUS_SYNC  | Seeks to the previous I-frame at the specified position.  |
1247| SEEK_MODE_CLOSEST_SYNC  | Seeks to the latest I-frame at the specified position.  |
1248
1249
1250### OH_BitsPerSample
1251
1252```
1253enum OH_BitsPerSample
1254```
1255
1256**Description**
1257
1258Enumerates the number of audio bits for each coded sample.
1259
1260**System capability**: SystemCapability.Multimedia.Media.CodecBase
1261
1262**Since**: 10
1263
1264| Value| Description|
1265| -------- | -------- |
1266| SAMPLE_U8  | 8-bit unsigned integer sampling.  |
1267| SAMPLE_S16LE  | 16-bit signed integer sampling.  |
1268| SAMPLE_S24LE  | 24-bit signed integer sampling.  |
1269| SAMPLE_S32LE  | 32-bit signed integer sampling.  |
1270| SAMPLE_F32LE  | 32-bit floating-point sampling.  |
1271| SAMPLE_U8P  | 8-bit unsigned integer plane sampling.  |
1272| SAMPLE_S16P  | 16-bit signed integer plane sampling.  |
1273| SAMPLE_S24P  | 24-bit signed integer plane sampling.  |
1274| SAMPLE_S32P  | 32-bit signed integer plane sampling.  |
1275| SAMPLE_F32P  | 32-bit floating-point plane sampling.  |
1276| INVALID_WIDTH  | Invalid sampling format.  |
1277
1278
1279### OH_ColorPrimary
1280
1281```
1282enum OH_ColorPrimary
1283```
1284
1285**Description**
1286
1287Enumerates the primary colors. This enum is used for both encoding and decoding.
1288
1289**System capability**: SystemCapability.Multimedia.Media.CodecBase
1290
1291**Since**: 10
1292
1293| Value| Description|
1294| -------- | -------- |
1295| COLOR_PRIMARY_BT709  | BT.709 color gamut.  |
1296| COLOR_PRIMARY_UNSPECIFIED  | Unspecified color gamut.  |
1297| COLOR_PRIMARY_BT470_M  | BT.470 System M color gamut.  |
1298| COLOR_PRIMARY_BT601_625  | BT.601 625 color gamut.  |
1299| COLOR_PRIMARY_BT601_525  | BT.601 525 color gamut.  |
1300| COLOR_PRIMARY_SMPTE_ST240  | SMPTE ST 240 color gamut.  |
1301| COLOR_PRIMARY_GENERIC_FILM  | Generic film color gamut.  |
1302| COLOR_PRIMARY_BT2020  | BT.2020 color gamut.  |
1303| COLOR_PRIMARY_SMPTE_ST428  | SMPTE ST 428 color gamut.  |
1304| COLOR_PRIMARY_P3DCI  | DCI-P3 color gamut.  |
1305| COLOR_PRIMARY_P3D65  | P3-D65 color gamut.  |
1306
1307
1308### OH_HEVCLevel
1309
1310```
1311enum OH_HEVCLevel
1312```
1313
1314**Description**
1315
1316Enumerates the HEVC levels.
1317
1318**System capability**: SystemCapability.Multimedia.Media.CodecBase
1319
1320**Since**: 12
1321
1322| Value| Description|
1323| -------- | -------- |
1324| HEVC_LEVEL_1  | Level 1.  |
1325| HEVC_LEVEL_2  | Level 2.  |
1326| HEVC_LEVEL_21  | Level 2.1.  |
1327| HEVC_LEVEL_3  | Level 3.  |
1328| HEVC_LEVEL_31  | Level 3.1.  |
1329| HEVC_LEVEL_4  | Level 4.  |
1330| HEVC_LEVEL_41  | Level 4.1.  |
1331| HEVC_LEVEL_5  | Level 5.  |
1332| HEVC_LEVEL_51  | Level 5.1.  |
1333| HEVC_LEVEL_52  | Level 5.2.  |
1334| HEVC_LEVEL_6  | Level 6.  |
1335| HEVC_LEVEL_61  | Level 6.1.  |
1336| HEVC_LEVEL_62  | Level 6.2.  |
1337
1338
1339### OH_HEVCProfile
1340
1341```
1342enum OH_HEVCProfile
1343```
1344
1345**Description**
1346
1347Enumerates the HEVC profiles.
1348
1349**System capability**: SystemCapability.Multimedia.Media.CodecBase
1350
1351**Since**: 10
1352
1353| Value| Description|
1354| -------- | -------- |
1355| HEVC_PROFILE_MAIN  | HEVC profile of the main level.  |
1356| HEVC_PROFILE_MAIN_10  | HEVC profile of the 10-bit main level.  |
1357| HEVC_PROFILE_MAIN_STILL  | HEVC profile of the main still picture level.  |
1358| HEVC_PROFILE_MAIN_10_HDR10  | HEVC profile of the main 10 HDR10 level. (This value is deprecated from API version 14.)  |
1359| HEVC_PROFILE_MAIN_10_HDR10_PLUS  | HEVC profile of the main 10 HDR10+ level. (This value is deprecated from API version 14.)  |
1360
1361
1362### OH_MatrixCoefficient
1363
1364```
1365enum OH_MatrixCoefficient
1366```
1367
1368**Description**
1369
1370Enumerates the matrix coefficients. This enum is used for both encoding and decoding.
1371
1372**System capability**: SystemCapability.Multimedia.Media.CodecBase
1373
1374**Since**: 10
1375
1376| Value| Description|
1377| -------- | -------- |
1378| MATRIX_COEFFICIENT_IDENTITY  | Identity matrix.  |
1379| MATRIX_COEFFICIENT_BT709  | BT.709 conversion matrix.  |
1380| MATRIX_COEFFICIENT_UNSPECIFIED  | Unspecified conversion matrix.  |
1381| MATRIX_COEFFICIENT_FCC  | FCC conversion matrix.  |
1382| MATRIX_COEFFICIENT_BT601_625  | BT.601 625 conversion matrix.  |
1383| MATRIX_COEFFICIENT_BT601_525  | BT.601 525 conversion matrix.  |
1384| MATRIX_COEFFICIENT_SMPTE_ST240  | SMPTE ST 240 conversion matrix.  |
1385| MATRIX_COEFFICIENT_YCGCO  | YCgCo conversion matrix.  |
1386| MATRIX_COEFFICIENT_BT2020_NCL  | BT.2020 NCL conversion matrix.  |
1387| MATRIX_COEFFICIENT_BT2020_CL  | BT.2020 CL conversion matrix.  |
1388| MATRIX_COEFFICIENT_SMPTE_ST2085  | SMPTE ST 2085 conversion matrix.  |
1389| MATRIX_COEFFICIENT_CHROMATICITY_NCL  | Chromaticity NCL conversion matrix.  |
1390| MATRIX_COEFFICIENT_CHROMATICITY_CL  | Chromaticity CL conversion matrix.  |
1391| MATRIX_COEFFICIENT_ICTCP  | ICTCP conversion matrix.  |
1392
1393
1394### OH_MediaType
1395
1396```
1397enum OH_MediaType
1398```
1399
1400**Description**
1401
1402Enumerates the media types.
1403
1404**System capability**: SystemCapability.Multimedia.Media.CodecBase
1405
1406**Since**: 9
1407
1408| Value| Description|
1409| -------- | -------- |
1410| MEDIA_TYPE_AUD  | Audio track.  |
1411| MEDIA_TYPE_VID  | Video track.  |
1412| MEDIA_TYPE_SUBTITILE  | Subtitle track.<br>**Since**: 12  |
1413
1414### OH_MPEG2Level
1415
1416```
1417enum OH_MPEG2Level
1418```
1419
1420**Description**
1421
1422Enumerates the MPEG2 levels.
1423
1424**System capability**: SystemCapability.Multimedia.Media.CodecBase
1425
1426**Since**: 17
1427
1428| Value| Description|
1429| -------- | -------- |
1430| MPEG2_LEVEL_LL | Low level.|
1431| MPEG2_LEVEL_ML | Main level.|
1432| MPEG2_LEVEL_H14 | High 1440 level.|
1433| MPEG2_LEVEL_HL | High level.|
1434
1435
1436### OH_MPEG2Profile
1437
1438```
1439enum OH_MPEG2Profile
1440```
1441
1442**Description**
1443
1444Enumerates the MPEG2 profiles.
1445
1446**System capability**: SystemCapability.Multimedia.Media.CodecBase
1447
1448**Since**: 17
1449
1450| Value| Description|
1451| -------- | -------- |
1452| MPEG2_PROFILE_SIMPLE | Simple profile.|
1453| MPEG2_PROFILE_MAIN | Main profile.|
1454| MPEG2_PROFILE_SNR | Signal-to-Noise Ratio (SNR) scalable profile.|
1455| MPEG2_PROFILE_SPATIAL | Spatial scalable profile.|
1456| MPEG2_PROFILE_HIGH | High profile.|
1457| MPEG2_PROFILE_422 | 4:2:2 profile.|
1458
1459
1460### OH_MPEG4Level
1461
1462```
1463enum OH_MPEG4Level
1464```
1465
1466**Description**
1467
1468Enumerates the MPEG4 levels.
1469
1470**System capability**: SystemCapability.Multimedia.Media.CodecBase
1471
1472**Since**: 17
1473
1474| Value| Description|
1475| -------- | -------- |
1476| MPEG4_LEVEL_0 | Level 0.|
1477| MPEG4_LEVEL_0B | Level 0B.|
1478| MPEG4_LEVEL_1 | Level 1.|
1479| MPEG4_LEVEL_2 | Level 2.|
1480| MPEG4_LEVEL_3 | Level 3.|
1481| MPEG4_LEVEL_3B | Level 3B.|
1482| MPEG4_LEVEL_4 | Level 4.|
1483| MPEG4_LEVEL_4A | Level 4A.|
1484| MPEG4_LEVEL_5 | Level 5.|
1485| MPEG4_LEVEL_6 | Level 6.|
1486
1487
1488### OH_MPEG4Profile
1489
1490```
1491enum OH_MPEG4Profile
1492```
1493
1494**Description**
1495
1496Enumerates the MPEG4 profiles.
1497
1498**System capability**: SystemCapability.Multimedia.Media.CodecBase
1499
1500**Since**: 17
1501
1502| Value| Description|
1503| -------- | -------- |
1504| MPEG4_PROFILE_SIMPLE | Simple profile.|
1505| MPEG4_PROFILE_SIMPLE_SCALABLE | Simple scalable profile.|
1506| MPEG4_PROFILE_CORE | Core profile.|
1507| MPEG4_PROFILE_MAIN | Main profile.|
1508| MPEG4_PROFILE_NBIT | N-bit profile.|
1509| MPEG4_PROFILE_HYBRID | Hybrid profile.|
1510| MPEG4_PROFILE_BASIC_ANIMATED_TEXTURE | Basic animated texture profile.|
1511| MPEG4_PROFILE_SCALABLE_TEXTURE | Scalable texture profile.|
1512| MPEG4_PROFILE_SIMPLE_FA | Simple FA profile.|
1513| MPEG4_PROFILE_ADVANCED_REAL_TIME_SIMPLE | Advanced real-time simple profile.|
1514| MPEG4_PROFILE_CORE_SCALABLE | Core scalable profile.|
1515| MPEG4_PROFILE_ADVANCED_CODING_EFFICIENCY | Advanced coding efficiency profile.|
1516| MPEG4_PROFILE_ADVANCED_CORE | Advanced core profile.|
1517| MPEG4_PROFILE_ADVANCED_SCALABLE_TEXTURE | Advanced scalable texture profile.|
1518| MPEG4_PROFILE_ADVANCED_SIMPLE | Advanced simple profile.|
1519
1520
1521### OH_ScalingMode
1522
1523```
1524enum OH_ScalingMode
1525```
1526
1527**Description**
1528
1529Enumerates the scaling modes. This enum is used only in surface mode.
1530
1531**System capability**: SystemCapability.Multimedia.Media.CodecBase
1532
1533**Since**: 10
1534
1535**Deprecated from**: 14
1536
1537**Substitute**: [OHScalingModeV2](../apis-arkgraphics2d/_native_window.md#ohscalingmodev2-1).OH_SCALING_MODE_SCALE_TO_WINDOW_V2
1538[OHScalingModeV2](../apis-arkgraphics2d/_native_window.md#ohscalingmodev2-1).OH_SCALING_MODE_SCALE_CROP_V2
1539
1540| Value| Description|
1541| -------- | -------- |
1542| SCALING_MODE_SCALE_TO_WINDOW  | Scales the image based on the window size.|
1543| SCALING_MODE_SCALE_CROP  | Crops the image based on the window size.|
1544
1545
1546
1547### OH_TemporalGopReferenceMode
1548
1549```
1550enum OH_TemporalGopReferenceMode
1551```
1552
1553**Description**
1554
1555Enumerates the reference modes of temporal image groups.
1556
1557**System capability**: SystemCapability.Multimedia.Media.CodecBase
1558
1559**Since**: 12
1560
1561| Value| Description|
1562| -------- | -------- |
1563| ADJACENT_REFERENCE  | Refers to the nearest short-term reference frame.  |
1564| JUMP_REFERENCE  | Refers to the latest LTR frame.  |
1565| UNIFORMLY_SCALED_REFERENCE  | Drops video frames at the highest level, and evenly distributes the remaining frames. The number of temporal image groups must be a power of 2.  |
1566
1567
1568### OH_VVCLevel
1569
1570```
1571enum OH_VVCLevel
1572```
1573
1574**Description**
1575
1576Enumerates the VVC levels.
1577
1578**System capability**: SystemCapability.Multimedia.Media.CodecBase
1579
1580**Since**: 15
1581
1582| Value| Description|
1583| -------- | -------- |
1584| VVC_LEVEL_1  | Level 1.0. |
1585| VVC_LEVEL_2  | Level 2.0. |
1586| VVC_LEVEL_21  | Level 2.1. |
1587| VVC_LEVEL_3  | Level 3.0. |
1588| VVC_LEVEL_31  | Level 3.1. |
1589| VVC_LEVEL_4  | Level 4.0. |
1590| VVC_LEVEL_41  | Level 4.1. |
1591| VVC_LEVEL_5  | Level 5.0.  |
1592| VVC_LEVEL_51  | Level 5.1. |
1593| VVC_LEVEL_52  | Level 5.2. |
1594| VVC_LEVEL_6  | Level 6.0. |
1595| VVC_LEVEL_61  | Level 6.1. |
1596| VVC_LEVEL_62  | Level 6.2. |
1597| VVC_LEVEL_63  | Level 6.3. |
1598| VVC_LEVEL_155  | Level 15.5. |
1599
1600
1601### OH_VVCProfile
1602
1603```
1604enum OH_VVCProfile
1605```
1606
1607**Description**
1608
1609Enumerates the VVC profiles.
1610
1611**System capability**: SystemCapability.Multimedia.Media.CodecBase
1612
1613**Since**: 15
1614
1615| Value| Description|
1616| -------- | -------- |
1617| VVC_PROFILE_MAIN_10 | VVC profile of the 10-bit main level. |
1618| VVC_PROFILE_MAIN_12 | VVC profile of the 12-bit main level. |
1619| VVC_PROFILE_MAIN_12_INTRA | VVC profile of the 12-bit intra main level. |
1620| VVC_PROFILE_MULTI_MAIN_10 | VVC profile of the 10-bit main level for multi-layer encoding. |
1621| VVC_PROFILE_MAIN_10_444 | VVC profile of the 10-bit full-sample main level. |
1622| VVC_PROFILE_MAIN_12_444 | VVC profile of the 12-bit full-sample main level. |
1623| VVC_PROFILE_MAIN_16_444 | VVC profile of the 16-bit full-sample main level. |
1624| VVC_PROFILE_MAIN_12_444_INTRA | VVC profile of the 12-bit full-sample intra main level. |
1625| VVC_PROFILE_MAIN_16_444_INTRA | VVC profile of the 16-bit full-sample intra main level. |
1626| VVC_PROFILE_MULTI_MAIN_10_444 | VVC profile of the 10-bit full-sample main level for multi-layer encoding. |
1627| VVC_PROFILE_MAIN_10_STILL | VVC profile of the 10-bit still picture main level. |
1628| VVC_PROFILE_MAIN_12_STILL | VVC profile of the 12-bit still picture main level. |
1629| VVC_PROFILE_MAIN_10_444_STILL | VVC profile of the 10-bit full-sample still picture main level. |
1630| VVC_PROFILE_MAIN_12_444_STILL | VVC profile of the 12-bit full-sample still picture main level. |
1631| VVC_PROFILE_MAIN_16_444_STILL | VVC profile of the 16-bit full-sample still picture main level. |
1632
1633
1634### OH_H263Level
1635
1636```
1637enum OH_H263Level
1638```
1639
1640**Description**
1641
1642Enumerates the H.263 levels.
1643
1644**System capability**: SystemCapability.Multimedia.Media.CodecBase
1645
1646**Since**: 17
1647
1648| Value| Description|
1649| -------- | -------- |
1650| H263_LEVEL_10 | Level 10. |
1651| H263_LEVEL_20 | Level 20. |
1652| H263_LEVEL_30 | Level 30. |
1653| H263_LEVEL_40 | Level 40. |
1654| H263_LEVEL_45 | Level 45. |
1655| H263_LEVEL_50 | Level 50. |
1656| H263_LEVEL_60 | Level 60. |
1657| H263_LEVEL_70 | Level 70. |
1658
1659
1660### OH_H263Profile
1661
1662```
1663enum OH_H263Profile
1664```
1665
1666**Description**
1667
1668Enumerates the H.263 profiles.
1669
1670**System capability**: SystemCapability.Multimedia.Media.CodecBase
1671
1672**Since**: 17
1673
1674| Value| Description|
1675| -------- | -------- |
1676| H263_PROFILE_BASELINE | Baseline profile. |
1677| H263_PROFILE_VERSION_1_BACKWARD_COMPATIBILITY | Version 1 backward compatibility. |
1678
1679
1680### OH_TransferCharacteristic
1681
1682```
1683enum OH_TransferCharacteristic
1684```
1685
1686**Description**
1687
1688Enumerates the transfer characteristics. This enum can be used for both encoding and decoding.
1689
1690**System capability**: SystemCapability.Multimedia.Media.CodecBase
1691
1692**Since**: 10
1693
1694| Value| Description|
1695| -------- | -------- |
1696| TRANSFER_CHARACTERISTIC_BT709  | BT.709 transfer function.  |
1697| TRANSFER_CHARACTERISTIC_UNSPECIFIED  | Unspecified transfer function.  |
1698| TRANSFER_CHARACTERISTIC_GAMMA_2_2  | Gamma 2-2 transfer function.  |
1699| TRANSFER_CHARACTERISTIC_GAMMA_2_8  | Gamma 2-8 transfer function.  |
1700| TRANSFER_CHARACTERISTIC_BT601  | BT.601 transfer function.  |
1701| TRANSFER_CHARACTERISTIC_SMPTE_ST240  | SMPTE ST 240 transfer function.  |
1702| TRANSFER_CHARACTERISTIC_LINEAR  | Linear transfer function.  |
1703| TRANSFER_CHARACTERISTIC_LOG  | Log transfer function.  |
1704| TRANSFER_CHARACTERISTIC_LOG_SQRT  | Log SQRT transfer function.  |
1705| TRANSFER_CHARACTERISTIC_IEC_61966_2_4  | IEC61966-2.4 transfer function.  |
1706| TRANSFER_CHARACTERISTIC_BT1361  | BT.1361 transfer function.  |
1707| TRANSFER_CHARACTERISTIC_IEC_61966_2_1  | IEC61966 2.1 transfer function.  |
1708| TRANSFER_CHARACTERISTIC_BT2020_10BIT  | BT.2020 10-bit transfer function.  |
1709| TRANSFER_CHARACTERISTIC_BT2020_12BIT  | BT.2020 12-bit transfer function.  |
1710| TRANSFER_CHARACTERISTIC_PQ  | PQ transfer function.  |
1711| TRANSFER_CHARACTERISTIC_SMPTE_ST428  | SMPTE ST.428 transfer function.  |
1712| TRANSFER_CHARACTERISTIC_HLG  | HLG transfer function.  |
1713
1714
1715### OH_BitrateMode
1716
1717```
1718enum OH_BitrateMode
1719```
1720
1721**Description**
1722
1723Enumerates the bit rate modes of an encoder.
1724
1725**System capability**: SystemCapability.Multimedia.Media.CodecBase
1726
1727**Since**: 10
1728
1729| Value| Description|
1730| -------- | -------- |
1731| BITRATE_MODE_CBR  | Constant bit rate.  |
1732| BITRATE_MODE_VBR  | Variable bit rate. The bit rate is for reference only.  |
1733| BITRATE_MODE_CQ  | Constant quality.  |
1734
1735## Variable Description
1736
1737
1738### OH_AVCODEC_MIMETYPE_SUBTITLE_SRT
1739
1740```
1741const char* OH_AVCODEC_MIMETYPE_SUBTITLE_SRT
1742```
1743
1744**Description**
1745
1746Pointer to the key that describes the MIME type of the SRT subtitle demuxer.
1747
1748**System capability**: SystemCapability.Multimedia.Media.CodecBase
1749
1750**Since**: 12
1751
1752
1753### OH_AVCODEC_MIMETYPE_SUBTITLE_WEBVTT
1754
1755```
1756const char* OH_AVCODEC_MIMETYPE_SUBTITLE_WEBVTT
1757```
1758
1759**Description**
1760
1761Pointer to the key that describes the MIME type of the WEBVTT subtitle demuxer.
1762
1763**System capability**: SystemCapability.Multimedia.Media.CodecBase
1764
1765**Since**: 12
1766
1767
1768### OH_AVCODEC_MIMETYPE_AUDIO_APE
1769
1770```
1771const char* OH_AVCODEC_MIMETYPE_AUDIO_APE
1772```
1773
1774**Description**
1775
1776Pointer to the key that describes the MIME type of the APE audio decoder.
1777
1778**System capability**: SystemCapability.Multimedia.Media.CodecBase
1779
1780**Since**: 12
1781
1782
1783### OH_AVCODEC_MIMETYPE_AUDIO_AAC
1784
1785```
1786const char* OH_AVCODEC_MIMETYPE_AUDIO_AAC
1787```
1788
1789**Description**
1790
1791Pointer to the key that describes the MIME type of the AAC audio codec.
1792
1793**System capability**: SystemCapability.Multimedia.Media.CodecBase
1794
1795**Since**: 9
1796
1797
1798### OH_AVCODEC_MIMETYPE_AUDIO_AMR_NB
1799
1800```
1801const char* OH_AVCODEC_MIMETYPE_AUDIO_AMR_NB
1802```
1803
1804**Description**
1805
1806Pointer to the key that describes the MIME type of the AMR-NB audio decoder.
1807
1808**System capability**: SystemCapability.Multimedia.Media.CodecBase
1809
1810**Since**: 11
1811
1812
1813### OH_AVCODEC_MIMETYPE_AUDIO_AMR_WB
1814
1815```
1816const char* OH_AVCODEC_MIMETYPE_AUDIO_AMR_WB
1817```
1818
1819**Description**
1820
1821Pointer to the key that describes the MIME type of the AMR-WB audio decoder.
1822
1823**System capability**: SystemCapability.Multimedia.Media.CodecBase
1824
1825**Since**: 11
1826
1827
1828### OH_AVCODEC_MIMETYPE_AUDIO_FLAC
1829
1830```
1831const char* OH_AVCODEC_MIMETYPE_AUDIO_FLAC
1832```
1833
1834**Description**
1835
1836Pointer to the key that describes the MIME type for FLAC audio codec.
1837
1838**System capability**: SystemCapability.Multimedia.Media.CodecBase
1839
1840**Since**: 10
1841
1842
1843### OH_AVCODEC_MIMETYPE_AUDIO_G711MU
1844
1845```
1846const char* OH_AVCODEC_MIMETYPE_AUDIO_G711MU
1847```
1848
1849**Description**
1850
1851Pointer to the key that describes the MIME type of the G.711 mu-law audio codec.
1852
1853**System capability**: SystemCapability.Multimedia.Media.CodecBase
1854
1855**Since**: 11
1856
1857
1858### OH_AVCODEC_MIMETYPE_AUDIO_RAW
1859
1860```
1861const char* OH_AVCODEC_MIMETYPE_AUDIO_RAW
1862```
1863
1864**Description**
1865
1866Pointer to the key that describes the MIME type of raw audio streams.
1867
1868**System capability**: SystemCapability.Multimedia.Media.CodecBase
1869
1870**Since**: 18
1871
1872
1873### OH_AVCODEC_MIMETYPE_AUDIO_MPEG
1874
1875```
1876const char* OH_AVCODEC_MIMETYPE_AUDIO_MPEG
1877```
1878
1879**Description**
1880
1881Pointer to the key that describes the MIME type of the MP3 audio decoder.
1882
1883**System capability**: SystemCapability.Multimedia.Media.CodecBase
1884
1885**Since**: 10
1886
1887
1888### OH_AVCODEC_MIMETYPE_AUDIO_OPUS
1889
1890```
1891const char* OH_AVCODEC_MIMETYPE_AUDIO_OPUS
1892```
1893
1894**Description**
1895
1896Pointer to the key that describes the MIME type of the Opus audio codec. <!--Del-->(This specification is not available yet.)<!--DelEnd-->
1897
1898**System capability**: SystemCapability.Multimedia.Media.CodecBase
1899
1900**Since**: 11
1901
1902
1903### OH_AVCODEC_MIMETYPE_AUDIO_VIVID
1904
1905```
1906const char* OH_AVCODEC_MIMETYPE_AUDIO_VIVID
1907```
1908
1909**Description**
1910
1911Pointer to the key that describes the MIME type of the Audio Vivid audio decoder. <!--Del-->(This specification is not available yet.)<!--DelEnd-->
1912
1913**System capability**: SystemCapability.Multimedia.Media.CodecBase
1914
1915**Since**: 11
1916
1917
1918### OH_AVCODEC_MIMETYPE_AUDIO_VORBIS
1919
1920```
1921const char* OH_AVCODEC_MIMETYPE_AUDIO_VORBIS
1922```
1923
1924**Description**
1925
1926Pointer to the key that describes the MIME type of the Vorbis audio decoder.
1927
1928**System capability**: SystemCapability.Multimedia.Media.CodecBase
1929
1930**Since**: 10
1931
1932
1933### OH_AVCODEC_MIMETYPE_IMAGE_BMP
1934
1935```
1936const char* OH_AVCODEC_MIMETYPE_IMAGE_BMP
1937```
1938
1939**Description**
1940
1941Pointer to the key that describes the MIME type of the BMP image encoder, which is used only for multiplexing BMP covers.
1942
1943**System capability**: SystemCapability.Multimedia.Media.CodecBase
1944
1945**Since**: 10
1946
1947
1948### OH_AVCODEC_MIMETYPE_IMAGE_JPG
1949
1950```
1951const char* OH_AVCODEC_MIMETYPE_IMAGE_JPG
1952```
1953
1954**Description**
1955
1956Pointer to the key that describes the MIME type of the JPG image encoder, which is used only for multiplexing JPG covers.
1957
1958**System capability**: SystemCapability.Multimedia.Media.CodecBase
1959
1960**Since**: 10
1961
1962
1963### OH_AVCODEC_MIMETYPE_IMAGE_PNG
1964
1965```
1966const char* OH_AVCODEC_MIMETYPE_IMAGE_PNG
1967```
1968
1969**Description**
1970
1971Pointer to the key that describes the MIME type of the PNG image encoder, which is used only for multiplexing PNG covers.
1972
1973**System capability**: SystemCapability.Multimedia.Media.CodecBase
1974
1975**Since**: 10
1976
1977
1978### OH_AVCODEC_MIMETYPE_VIDEO_AVC
1979
1980```
1981const char* OH_AVCODEC_MIMETYPE_VIDEO_AVC
1982```
1983
1984**Description**
1985
1986Pointer to the key that describes the MIME type of the AVC (H.264) video codec.
1987
1988**System capability**: SystemCapability.Multimedia.Media.CodecBase
1989
1990**Since**: 9
1991
1992
1993### OH_AVCODEC_MIMETYPE_VIDEO_HEVC
1994
1995```
1996const char* OH_AVCODEC_MIMETYPE_VIDEO_HEVC
1997```
1998
1999**Description**
2000
2001Pointer to the key that describes the MIME type of the HEVC (H.265) video codec.
2002
2003**System capability**: SystemCapability.Multimedia.Media.CodecBase
2004
2005**Since**: 10
2006
2007
2008### OH_AVCODEC_MIMETYPE_VIDEO_VVC
2009
2010```
2011const char* OH_AVCODEC_MIMETYPE_VIDEO_VVC
2012```
2013
2014**Description**
2015
2016Pointer to the key that describes the MIME type of the VVC (H.266) video codec.
2017
2018**System capability**: SystemCapability.Multimedia.Media.CodecBase
2019
2020**Since**: 12
2021
2022
2023### OH_AVCODEC_MIMETYPE_VIDEO_H263
2024
2025```
2026const char* OH_AVCODEC_MIMETYPE_VIDEO_H263
2027```
2028
2029**Description**
2030
2031Pointer to the key that describes the MIME type of the H.263 video codec.
2032
2033**System capability**: SystemCapability.Multimedia.Media.CodecBase
2034
2035**Since**: 17
2036
2037
2038### OH_AVCODEC_MIMETYPE_VIDEO_MPEG2
2039
2040```
2041const char* OH_AVCODEC_MIMETYPE_VIDEO_MPEG2
2042```
2043
2044**Description**
2045
2046Pointer to the key that describes the MIME type of MPEG2 video codec.
2047
2048**System capability**: SystemCapability.Multimedia.Media.CodecBase
2049
2050**Since**: 17
2051
2052
2053### OH_AVCODEC_MIMETYPE_VIDEO_MPEG4
2054
2055```
2056const char* OH_AVCODEC_MIMETYPE_VIDEO_MPEG4
2057```
2058
2059**Description**
2060
2061Pointer to the key that describes the MIME type of the MPEG4 video encoder, which is used only for multiplexing MPEG4 video streams.
2062
2063**System capability**: SystemCapability.Multimedia.Media.CodecBase
2064
2065**Since**: 10
2066
2067**Deprecated from**: 11
2068
2069
2070### OH_AVCODEC_MIMETYPE_VIDEO_MPEG4_PART2
2071
2072```
2073const char* OH_AVCODEC_MIMETYPE_VIDEO_MPEG4_PART2
2074```
2075
2076**Description**
2077
2078Pointer to the key that describes the MIME type of MPEG4 Part 2 video codec.
2079
2080**System capability**: SystemCapability.Multimedia.Media.CodecBase
2081
2082**Since**: 17
2083
2084
2085### OH_ED_KEY_EOS
2086
2087```
2088const char* OH_ED_KEY_EOS
2089```
2090
2091**Description**
2092
2093Pointer to the key that describes the end of stream for the surface buffer. The value type is int32_t.
2094
2095**System capability**: SystemCapability.Multimedia.Media.CodecBase
2096
2097**Since**: 9
2098
2099**Deprecated from**: 14
2100
2101
2102### OH_ED_KEY_TIME_STAMP
2103
2104```
2105const char* OH_ED_KEY_TIME_STAMP
2106```
2107
2108**Description**
2109
2110Pointer to the key that describes the surface buffer timestamp. The value is of the int64_t type.
2111
2112**System capability**: SystemCapability.Multimedia.Media.CodecBase
2113
2114**Since**: 9
2115
2116**Deprecated from**: 14
2117
2118
2119### OH_FEATURE_PROPERTY_KEY_VIDEO_ENCODER_MAX_LTR_FRAME_COUNT
2120
2121```
2122const char* OH_FEATURE_PROPERTY_KEY_VIDEO_ENCODER_MAX_LTR_FRAME_COUNT
2123```
2124
2125**Description**
2126
2127Pointer to the key that describes the maximum number of LTR frames obtained during video encoding. The value type is int32_t.
2128
2129You can use the API [OH_AVCapability_GetFeatureProperties](_a_v_capability.md#oh_avcapability_getfeatureproperties) and the enum [VIDEO_ENCODER_LONG_TERM_REFERENCE](_a_v_capability.md#oh_avcapabilityfeature-1) to query the maximum number.
2130
2131**System capability**: SystemCapability.Multimedia.Media.CodecBase
2132
2133**Since**: 12
2134
2135
2136### OH_MD_KEY_AAC_IS_ADTS
2137
2138```
2139const char* OH_MD_KEY_AAC_IS_ADTS
2140```
2141
2142**Description**
2143
2144Pointer to the key that describes the AAC format, which can be ADTS or LATM. The value type is int32_t. The value **0** means the LATM format, and **1** means the ADTS format. This key is supported by AAC decoders.
2145
2146**System capability**: SystemCapability.Multimedia.Media.CodecBase
2147
2148**Since**: 10
2149
2150
2151### OH_MD_KEY_ALBUM
2152
2153```
2154const char* OH_MD_KEY_ALBUM
2155```
2156
2157**Description**
2158
2159Pointer to the key that describes the album in a media file. The value type is string.
2160
2161**System capability**: SystemCapability.Multimedia.Media.CodecBase
2162
2163**Since**: 10
2164
2165
2166### OH_MD_KEY_ALBUM_ARTIST
2167
2168```
2169const char* OH_MD_KEY_ALBUM_ARTIST
2170```
2171
2172**Description**
2173
2174Pointer to the key that describes the album artist in a media file. The value type is string.
2175
2176**System capability**: SystemCapability.Multimedia.Media.CodecBase
2177
2178**Since**: 10
2179
2180
2181### OH_MD_KEY_ARTIST
2182
2183```
2184const char* OH_MD_KEY_ARTIST
2185```
2186
2187**Description**
2188
2189Pointer to the key that describes lyrics in a media file. The value type is string.
2190
2191**System capability**: SystemCapability.Multimedia.Media.CodecBase
2192
2193**Since**: 10
2194
2195
2196### OH_MD_KEY_AUD_CHANNEL_COUNT
2197
2198```
2199const char* OH_MD_KEY_AUD_CHANNEL_COUNT
2200```
2201
2202**Description**
2203
2204Pointer to the key that describes the number of audio channels. The value type is int32_t.
2205
2206**System capability**: SystemCapability.Multimedia.Media.CodecBase
2207
2208**Since**: 9
2209
2210
2211### OH_MD_KEY_AUD_SAMPLE_RATE
2212
2213```
2214const char* OH_MD_KEY_AUD_SAMPLE_RATE
2215```
2216
2217**Description**
2218
2219Pointer to the key that describes the audio sampling rate. The value type is int32_t.
2220
2221**System capability**: SystemCapability.Multimedia.Media.CodecBase
2222
2223**Since**: 9
2224
2225
2226### OH_MD_KEY_AUDIO_COMPRESSION_LEVEL
2227
2228```
2229const char* OH_MD_KEY_AUDIO_COMPRESSION_LEVEL
2230```
2231
2232**Description**
2233
2234Pointer to the key that describes the audio codec compression level. The value type is int32_t type. This key is used only for audio encoding.
2235
2236**System capability**: SystemCapability.Multimedia.Media.CodecBase
2237
2238**Since**: 11
2239
2240
2241### OH_MD_KEY_AUDIO_OBJECT_NUMBER
2242
2243```
2244const char* OH_MD_KEY_AUDIO_OBJECT_NUMBER
2245```
2246
2247**Description**
2248
2249Pointer to the key that describes the number of audio objects. The value type is int32_t. This key is used only for Audio Vivid decoding.
2250
2251**System capability**: SystemCapability.Multimedia.Media.CodecBase
2252
2253**Since**: 11
2254
2255
2256### OH_MD_KEY_AUDIO_SAMPLE_FORMAT
2257
2258```
2259const char* OH_MD_KEY_AUDIO_SAMPLE_FORMAT
2260```
2261
2262**Description**
2263
2264Pointer to the key that describes the original audio format. The value type is int32_t. For details, see [OH_BitsPerSample](#oh_bitspersample-1).
2265
2266**System capability**: SystemCapability.Multimedia.Media.CodecBase
2267
2268**Since**: 9
2269
2270
2271### OH_MD_KEY_AUDIO_VIVID_METADATA
2272
2273```
2274const char* OH_MD_KEY_AUDIO_VIVID_METADATA
2275```
2276
2277**Description**
2278
2279Pointer to the key that describes the Audio Vivid metadata. The value type is uint8_t\*. This key is used only for Audio Vivid decoding.
2280
2281**System capability**: SystemCapability.Multimedia.Media.CodecBase
2282
2283**Since**: 11
2284
2285
2286### OH_MD_KEY_BITRATE
2287
2288```
2289const char* OH_MD_KEY_BITRATE
2290```
2291
2292**Description**
2293
2294Pointer to the key that describes the bit rate. The value type is int64_t.
2295
2296**System capability**: SystemCapability.Multimedia.Media.CodecBase
2297
2298**Since**: 9
2299
2300
2301### OH_MD_KEY_BITS_PER_CODED_SAMPLE
2302
2303```
2304const char* OH_MD_KEY_BITS_PER_CODED_SAMPLE
2305```
2306
2307**Description**
2308
2309Pointer to the key that describes the number of bits for each coded sample. The value type is int32_t. This key applies to FLAC encoders. For details, see [OH_BitsPerSample](#oh_bitspersample-1).
2310
2311**System capability**: SystemCapability.Multimedia.Media.CodecBase
2312
2313**Since**: 10
2314
2315
2316### OH_MD_KEY_CHANNEL_LAYOUT
2317
2318```
2319const char* OH_MD_KEY_CHANNEL_LAYOUT
2320```
2321
2322**Description**
2323
2324Pointer to the key that describes the required encoding channel layout. The value type is int64_t. This key applies only to encoders.
2325For details, see [OH_AudioChannelLayout](_core.md#oh_audiochannellayout-1).
2326
2327**System capability**: SystemCapability.Multimedia.Media.CodecBase
2328
2329**Since**: 10
2330
2331
2332### OH_MD_KEY_CODEC_CONFIG
2333
2334```
2335const char* OH_MD_KEY_CODEC_CONFIG
2336```
2337
2338**Description**
2339
2340Pointer to the key that describes the codec-specific data. In the case of video, data carried in **SPS/PPS** is transferred. In the case of audio, data carried in **extraData** is transferred. The value type is uint8_t\*. <!--Del-->(This key is not supported yet for the video codec.)<!--DelEnd-->
2341
2342**System capability**: SystemCapability.Multimedia.Media.CodecBase
2343
2344**Since**: 10
2345
2346
2347### OH_MD_KEY_CODEC_MIME
2348
2349```
2350const char* OH_MD_KEY_CODEC_MIME
2351```
2352
2353**Description**
2354
2355Pointer to the key that describes the [MIME](#media-codec-formats) type of the codec. The value type is string.
2356
2357**System capability**: SystemCapability.Multimedia.Media.CodecBase
2358
2359**Since**: 9
2360
2361
2362### OH_MD_KEY_COLOR_PRIMARIES
2363
2364```
2365const char* OH_MD_KEY_COLOR_PRIMARIES
2366```
2367
2368**Description**
2369
2370Pointer to the key that describes the video primary color. The value type is int32_t. For details, see [OH_ColorPrimary](#oh_colorprimary). The video primary color complies with Table 2 in the H.273 standard.
2371
2372**System capability**: SystemCapability.Multimedia.Media.CodecBase
2373
2374**Since**: 10
2375
2376
2377### OH_MD_KEY_COMMENT
2378
2379```
2380const char* OH_MD_KEY_COMMENT
2381```
2382
2383**Description**
2384
2385Pointer to the key that describes the comment in a media file. The value type is string.
2386
2387**System capability**: SystemCapability.Multimedia.Media.CodecBase
2388
2389**Since**: 10
2390
2391
2392### OH_MD_KEY_COMPLIANCE_LEVEL
2393
2394```
2395const char* OH_MD_KEY_COMPLIANCE_LEVEL
2396```
2397
2398**Description**
2399
2400Pointer to the key that describes the FLAC compliance level. The value type is int32_t. This key is used only for audio encoding.
2401
2402**System capability**: SystemCapability.Multimedia.Media.CodecBase
2403
2404**Since**: 10
2405
2406
2407### OH_MD_KEY_COPYRIGHT
2408
2409```
2410const char* OH_MD_KEY_COPYRIGHT
2411```
2412
2413**Description**
2414
2415Pointer to the key that describes the copyright in a media file. The value type is string.
2416
2417**System capability**: SystemCapability.Multimedia.Media.CodecBase
2418
2419**Since**: 10
2420
2421
2422### OH_MD_KEY_DATE
2423
2424```
2425const char* OH_MD_KEY_DATE
2426```
2427
2428**Description**
2429
2430Pointer to the key that describes the date in a media file, for example, 2024. The value type is string.
2431
2432**System capability**: SystemCapability.Multimedia.Media.CodecBase
2433
2434**Since**: 10
2435
2436
2437### OH_MD_KEY_DESCRIPTION
2438
2439```
2440const char* OH_MD_KEY_DESCRIPTION
2441```
2442
2443**Description**
2444
2445Pointer to the key that describes the description in a media file. The value type is string.
2446
2447**System capability**: SystemCapability.Multimedia.Media.CodecBase
2448
2449**Since**: 10
2450
2451
2452### OH_MD_KEY_DURATION
2453
2454```
2455const char* OH_MD_KEY_DURATION
2456```
2457
2458**Description**
2459
2460Pointer to the key that describes the duration in a media file, in microseconds. The value type is int64_t.
2461
2462**System capability**: SystemCapability.Multimedia.Media.CodecBase
2463
2464**Since**: 9
2465
2466
2467### OH_MD_KEY_FRAME_RATE
2468
2469```
2470const char* OH_MD_KEY_FRAME_RATE
2471```
2472
2473**Description**
2474
2475Pointer to the key that describes the video frame rate. The value type is double. The value must be greater than **0**.
2476
2477**System capability**: SystemCapability.Multimedia.Media.CodecBase
2478
2479**Since**: 9
2480
2481
2482### OH_MD_KEY_GENRE
2483
2484```
2485const char* OH_MD_KEY_GENRE
2486```
2487
2488**Description**
2489
2490Pointer to the key that describes the genre in a media file. The value type is string.
2491
2492**System capability**: SystemCapability.Multimedia.Media.CodecBase
2493
2494**Since**: 10
2495
2496
2497### OH_MD_KEY_HEIGHT
2498
2499```
2500const char* OH_MD_KEY_HEIGHT
2501```
2502
2503**Description**
2504
2505Pointer to the key that describes the video height. The value type is int32_t.
2506
2507This key is used to set the display height of a video frame when **Configure** is called during video encoding and decoding.
2508
2509For details about the development guide, see step 5 in surface mode or step 4 in buffer mode in [Video Encoding](../../media/avcodec/video-encoding.md).
2510
2511**System capability**: SystemCapability.Multimedia.Media.CodecBase
2512
2513**Since**: 9
2514
2515
2516### OH_MD_KEY_I_FRAME_INTERVAL
2517
2518```
2519const char* OH_MD_KEY_I_FRAME_INTERVAL
2520```
2521
2522**Description**
2523
2524Pointer to the key that describes the key frame interval, in milliseconds. The value type is int32_t. This key is optional and is used only for video encoding.
2525
2526A negative value indicates that only the first frame is a key frame, and a zero value indicates that all frames are key frames.
2527
2528**System capability**: SystemCapability.Multimedia.Media.CodecBase
2529
2530**Since**: 9
2531
2532
2533### OH_MD_KEY_IDENTIFICATION_HEADER
2534
2535```
2536const char* OH_MD_KEY_IDENTIFICATION_HEADER
2537```
2538
2539**Description**
2540
2541Pointer to the key that describes the Vorbis identification header. The value type is uint8_t. This key applies only to Vorbis decoders.
2542
2543**System capability**: SystemCapability.Multimedia.Media.CodecBase
2544
2545**Since**: 10
2546
2547
2548### OH_MD_KEY_LANGUAGE
2549
2550```
2551const char* OH_MD_KEY_LANGUAGE
2552```
2553
2554**Description**
2555
2556Pointer to the key that describes the language in a media file. The value type is string.
2557
2558**System capability**: SystemCapability.Multimedia.Media.CodecBase
2559
2560**Since**: 10
2561
2562
2563### OH_MD_KEY_LYRICS
2564
2565```
2566const char* OH_MD_KEY_LYRICS
2567```
2568
2569**Description**
2570
2571Pointer to the key that describes the lyrics in a media file. The value type is string.
2572
2573**System capability**: SystemCapability.Multimedia.Media.CodecBase
2574
2575**Since**: 10
2576
2577
2578### OH_MD_KEY_MATRIX_COEFFICIENTS
2579
2580```
2581const char* OH_MD_KEY_MATRIX_COEFFICIENTS
2582```
2583
2584**Description**
2585
2586Pointer to the key that describes the video matrix coefficient. The value type is int32_t. For details, see [OH_MatrixCoefficient](#oh_matrixcoefficient). The video matrix coefficient complies with Table 4 in the H.273 standard.
2587
2588**System capability**: SystemCapability.Multimedia.Media.CodecBase
2589
2590**Since**: 10
2591
2592
2593### OH_MD_KEY_MAX_INPUT_SIZE
2594
2595```
2596const char* OH_MD_KEY_MAX_INPUT_SIZE
2597```
2598
2599**Description**
2600
2601Pointer to the key that describes the maximum size of an input stream to decode. The value type is int32_t.
2602
2603**System capability**: SystemCapability.Multimedia.Media.CodecBase
2604
2605**Since**: 9
2606
2607
2608### OH_MD_KEY_PIXEL_FORMAT
2609
2610```
2611const char* OH_MD_KEY_PIXEL_FORMAT
2612```
2613
2614**Description**
2615
2616Pointer to the key that describes the video pixel format. The value type is int32_t. For details, see [OH_AVPixelFormat](_core.md#oh_avpixelformat).
2617
2618**System capability**: SystemCapability.Multimedia.Media.CodecBase
2619
2620**Since**: 9
2621
2622
2623### OH_MD_KEY_PROFILE
2624
2625```
2626const char* OH_MD_KEY_PROFILE
2627```
2628
2629**Description**
2630
2631Pointer to the key that describes the encoding grading. The value type is int32_t. For details, see [OH_AVCProfile](#oh_avcprofile), [OH_HEVCProfile](#oh_hevcprofile), and [OH_AACProfile](#oh_aacprofile).
2632
2633**System capability**: SystemCapability.Multimedia.Media.CodecBase
2634
2635**Since**: 9
2636
2637
2638### OH_MD_KEY_QUALITY
2639
2640```
2641const char* OH_MD_KEY_QUALITY
2642```
2643
2644**Description**
2645
2646Pointer to the key that describes the required encoding quality. The value type is int32_t. In H.264 and H.265 encoding scenarios, the value range can be obtained by calling **OH_AVCapability_GetEncoderQualityRange()**. This key applies only to the encoder in constant quality mode.
2647
2648**System capability**: SystemCapability.Multimedia.Media.CodecBase
2649
2650**Since**: 10
2651
2652
2653### OH_MD_KEY_RANGE_FLAG
2654
2655```
2656const char* OH_MD_KEY_RANGE_FLAG
2657```
2658
2659**Description**
2660
2661Pointer to the key that describes the video YUV value range flag. The value type is int32_t. The value **1** means a full range, and **0** means a limited range.
2662
2663**System capability**: SystemCapability.Multimedia.Media.CodecBase
2664
2665**Since**: 10
2666
2667
2668### OH_MD_KEY_REQUEST_I_FRAME
2669
2670```
2671const char* OH_MD_KEY_REQUEST_I_FRAME
2672```
2673
2674**Description**
2675
2676Pointer to the key that describes the request for immediate encoding of I-frames. The value type is int32_t. This key is used in **OH_VideoEncoder_SetParameter()** or takes effect immediately with the frame.
2677
2678**System capability**: SystemCapability.Multimedia.Media.CodecBase
2679
2680**Since**: 10
2681
2682
2683### OH_MD_KEY_ROTATION
2684
2685```
2686const char* OH_MD_KEY_ROTATION
2687```
2688
2689**Description**
2690
2691Pointer to the key that describes the rotation angle of the surface. The value type is int32_t, and the value range is {0, 90, 180, 270}. The default value is 0. This key is used only in video decoding surface mode.
2692
2693**System capability**: SystemCapability.Multimedia.Media.CodecBase
2694
2695**Since**: 9
2696
2697
2698### OH_MD_KEY_SBR
2699
2700```
2701const char* OH_MD_KEY_SBR
2702```
2703
2704**Description**
2705
2706Pointer to the key that describes the AAC SBR format. The value type is int32_t. This key applies to AAC encoders.
2707
2708**System capability**: SystemCapability.Multimedia.Media.CodecBase
2709
2710**Since**: 10
2711
2712
2713### OH_MD_KEY_SCALING_MODE
2714
2715```
2716const char* OH_MD_KEY_SCALING_MODE
2717```
2718
2719**Description**
2720
2721Pointer to the key that describes the video scaling mode. The value type is int32_t. For details, see [OH_ScalingMode](#oh_scalingmode). You are advised to set the scaling mode by calling [OH_NativeWindow_NativeWindowSetScalingModeV2](../apis-arkgraphics2d/_native_window.md#oh_nativewindow_nativewindowsetscalingmodev2). This key is optional and is used only for video decoding in surface mode.
2722
2723**System capability**: SystemCapability.Multimedia.Media.CodecBase
2724
2725**Since**: 10
2726
2727**Deprecated from**: 14
2728
2729**Substitute**: [OH_NativeWindow_NativeWindowSetScalingModeV2](../apis-arkgraphics2d/_native_window.md#oh_nativewindow_nativewindowsetscalingmodev2)
2730
2731
2732### OH_MD_KEY_SETUP_HEADER
2733
2734```
2735const char* OH_MD_KEY_SETUP_HEADER
2736```
2737
2738**Description**
2739
2740Pointer to the key that describes the Vorbis setup header. The value type is uint8_t. This key applies only to Vorbis decoders.
2741
2742**System capability**: SystemCapability.Multimedia.Media.CodecBase
2743
2744**Since**: 10
2745
2746
2747### OH_MD_KEY_TITLE
2748
2749```
2750const char* OH_MD_KEY_TITLE
2751```
2752
2753**Description**
2754
2755Pointer to the key that describes the title in a media file. The value type is string.
2756
2757**System capability**: SystemCapability.Multimedia.Media.CodecBase
2758
2759**Since**: 10
2760
2761
2762### OH_MD_KEY_TRACK_COUNT
2763
2764```
2765const char* OH_MD_KEY_TRACK_COUNT
2766```
2767
2768**Description**
2769
2770Pointer to the key that describes the number of tracks in a media file. The value type is int32_t.
2771
2772**System capability**: SystemCapability.Multimedia.Media.CodecBase
2773
2774**Since**: 10
2775
2776
2777### OH_MD_KEY_TRACK_TYPE
2778
2779```
2780const char* OH_MD_KEY_TRACK_TYPE
2781```
2782
2783**Description**
2784
2785Pointer to the key that describes the track type in a media file. The value type is int32_t. For details, see [OH_MediaType](#oh_mediatype-1).
2786
2787**System capability**: SystemCapability.Multimedia.Media.CodecBase
2788
2789**Since**: 9
2790
2791
2792### OH_MD_KEY_TRANSFER_CHARACTERISTICS
2793
2794```
2795const char* OH_MD_KEY_TRANSFER_CHARACTERISTICS
2796```
2797
2798**Description**
2799
2800Pointer to the key that describes the video transfer characteristics. The value type is int32_t. For details, see [OH_TransferCharacteristic](#oh_transfercharacteristic). The video transfer characteristics comply with Table 3 in the H.273 standard.
2801
2802**System capability**: SystemCapability.Multimedia.Media.CodecBase
2803
2804**Since**: 10
2805
2806### OH_MD_KEY_VIDEO_CROP_BOTTOM
2807
2808```
2809const char* OH_MD_KEY_VIDEO_CROP_BOTTOM
2810```
2811
2812**Description**
2813
2814Pointer to the key that describes the bottom coordinate (y) of the cropped rectangle. The value type is int32_t. The row at the bottom of the cropped rectangle is contained, and the row index starts from 0. This key is used only for video decoding.
2815
2816**System capability**: SystemCapability.Multimedia.Media.CodecBase
2817
2818**Since**: 12
2819
2820
2821### OH_MD_KEY_VIDEO_CROP_LEFT
2822
2823```
2824const char* OH_MD_KEY_VIDEO_CROP_LEFT
2825```
2826
2827**Description**
2828
2829Pointer to the key that describes the left coordinate (x) of the cropped rectangle. The value type is int32_t. The leftmost column of the cropped rectangle is contained, and the column index starts from 0. This key is used only for video decoding.
2830
2831**System capability**: SystemCapability.Multimedia.Media.CodecBase
2832
2833**Since**: 12
2834
2835
2836### OH_MD_KEY_VIDEO_CROP_RIGHT
2837
2838```
2839const char* OH_MD_KEY_VIDEO_CROP_RIGHT
2840```
2841
2842**Description**
2843
2844Pointer to the key that describes the right coordinate (x) of the cropped rectangle. The value type is int32_t. The rightmost column of the cropped rectangle is contained, and the column index starts from 0. This key is used only for video decoding.
2845
2846**System capability**: SystemCapability.Multimedia.Media.CodecBase
2847
2848**Since**: 12
2849
2850
2851### OH_MD_KEY_VIDEO_CROP_TOP
2852
2853```
2854const char* OH_MD_KEY_VIDEO_CROP_TOP
2855```
2856
2857**Description**
2858
2859Pointer to the key that describes the top coordinate (y) of the cropped rectangle. The value type is int32_t. The row at the top of the cropped rectangle is contained, and the row index starts from 0. This key is used only for video decoding.
2860
2861**System capability**: SystemCapability.Multimedia.Media.CodecBase
2862
2863**Since**: 12
2864
2865
2866### OH_MD_KEY_VIDEO_ENABLE_LOW_LATENCY
2867
2868```
2869const char* OH_MD_KEY_VIDEO_ENABLE_LOW_LATENCY
2870```
2871
2872**Description**
2873
2874Pointer to the key that describes the enabled status of low-latency video codec. The value type is int32_t. The value **1** means that low-latency video codec is enabled, and **0** means the opposite. This key is optional and used only in the configuration phase.
2875
2876If enabled, the input and output data held by the video encoder or decoder does not exceed the amount required by the codec standard.
2877
2878If supported by the platform, the video decoder outputs frames in the decoding sequence when low-latency video codec is enabled.
2879
2880**System capability**: SystemCapability.Multimedia.Media.CodecBase
2881
2882**Since**: 12
2883
2884
2885### OH_MD_KEY_VIDEO_ENCODE_BITRATE_MODE
2886
2887```
2888const char* OH_MD_KEY_VIDEO_ENCODE_BITRATE_MODE
2889```
2890
2891**Description**
2892
2893Pointer to the key that describes the video encoding bit rate mode. The value type is int32_t. For details, see [OH_BitrateMode](#oh_bitratemode-1).
2894
2895**System capability**: SystemCapability.Multimedia.Media.CodecBase
2896
2897**Since**: 9
2898
2899### OH_MD_KEY_VIDEO_ENCODER_ENABLE_TEMPORAL_SCALABILITY
2900
2901```
2902const char* OH_MD_KEY_VIDEO_ENCODER_ENABLE_TEMPORAL_SCALABILITY
2903```
2904
2905**Description**
2906
2907Pointer to the key that describes the enabled status of temporal scalability. The value type is int32_t. The value **1** means temporal scalability is enabled, and **0** means the opposite.
2908
2909Before using this variable, you can call [OH_AVCapability_IsFeatureSupported](_a_v_capability.md#oh_avcapability_isfeaturesupported) and use [VIDEO_ENCODER_TEMPORAL_SCALABILITY](_a_v_capability.md#oh_avcapabilityfeature-1) to check whether the video encoder supports temporal scalability.
2910
2911For details, see [Temporally Scalable Video Coding](../../media/avcodec/video-encoding-temporal-scalability.md#available-apis).
2912
2913This key is optional and used only in the configuration phase of video encoding.
2914
2915**System capability**: SystemCapability.Multimedia.Media.CodecBase
2916
2917**Since**: 12
2918
2919
2920### OH_MD_KEY_VIDEO_ENCODER_LTR_FRAME_COUNT
2921
2922```
2923const char* OH_MD_KEY_VIDEO_ENCODER_LTR_FRAME_COUNT
2924```
2925**Description**
2926
2927Pointer to the key that describes the number of LTR frames. The value type is int32_t. The value must be within the supported value range.
2928
2929Before using this key, you can use the API [OH_AVCapability_GetFeatureProperties](_a_v_capability.md#oh_avcapability_getfeatureproperties) and the enum [VIDEO_ENCODER_LONG_TERM_REFERENCE](_a_v_capability.md#oh_avcapabilityfeature-1) to query the number of supported LTR frames.
2930
2931This key is optional and used only in the configuration phase of video encoding.
2932
2933For details, see [Temporally Scalable Video Coding](../../media/avcodec/video-encoding-temporal-scalability.md#available-apis-1).
2934
2935**System capability**: SystemCapability.Multimedia.Media.CodecBase
2936
2937**Since**: 12
2938
2939
2940### OH_MD_KEY_VIDEO_ENCODER_PER_FRAME_MARK_LTR
2941
2942```
2943const char* OH_MD_KEY_VIDEO_ENCODER_PER_FRAME_MARK_LTR
2944```
2945**Description**
2946
2947Pointer to the key that describes the key that marks the current frame as an LTR frame. The value type is int32_t. The value **1** means that the frame is marked as an LTR frame, and **0** means the opposite.
2948
2949This key takes effect only after the number of LTR frames is configured.
2950
2951This key is optional and is used only for video encoding input rotation. The configuration takes effect immediately.
2952
2953For details, see [Temporally Scalable Video Coding](../../media/avcodec/video-encoding-temporal-scalability.md#available-apis-1).
2954
2955**System capability**: SystemCapability.Multimedia.Media.CodecBase
2956
2957**Since**: 12
2958
2959
2960### OH_MD_KEY_VIDEO_ENCODER_PER_FRAME_USE_LTR
2961
2962```
2963const char* OH_MD_KEY_VIDEO_ENCODER_PER_FRAME_USE_LTR
2964```
2965**Description**
2966
2967Pointer to the key that describes the POC number of the LTR frame referenced by the current frame. The value type is int32_t.
2968
2969This key is optional and is used only for video encoding input rotation. The configuration takes effect immediately.
2970
2971For details, see [Temporally Scalable Video Coding](../../media/avcodec/video-encoding-temporal-scalability.md#available-apis-1).
2972
2973**System capability**: SystemCapability.Multimedia.Media.CodecBase
2974
2975**Since**: 12
2976
2977
2978### OH_MD_KEY_VIDEO_ENCODER_QP_MAX
2979
2980```
2981const char* OH_MD_KEY_VIDEO_ENCODER_QP_MAX
2982```
2983
2984**Description**
2985
2986Pointer to the key that describes the maximum QP allowed by the video encoder. The value type is int32_t.
2987
2988This key is used in the configuration or parameter setting phase or takes effect immediately with the frame.
2989
2990**System capability**: SystemCapability.Multimedia.Media.CodecBase
2991
2992**Since**: 12
2993
2994
2995### OH_MD_KEY_VIDEO_ENCODER_QP_MIN
2996
2997```
2998const char* OH_MD_KEY_VIDEO_ENCODER_QP_MIN
2999```
3000
3001**Description**
3002
3003Pointer to the key that describes the minimum QP allowed by the video encoder. The value type is int32_t.
3004
3005This key is used in the configuration or parameter setting phase or takes effect immediately with the frame.
3006
3007**System capability**: SystemCapability.Multimedia.Media.CodecBase
3008
3009**Since**: 12
3010
3011
3012### OH_MD_KEY_VIDEO_ENCODER_QP_AVERAGE
3013
3014```
3015const char* OH_MD_KEY_VIDEO_ENCODER_QP_AVERAGE
3016```
3017
3018**Description**
3019
3020Pointer to the key that describes the average QP of video frames. The value type is int32_t.
3021
3022Pointer to the key that describes the average QP value of the current frame encoding block. It is output with [OH_AVBuffer](_core.md#oh_avbuffer)
3023
3024**System capability**: SystemCapability.Multimedia.Media.CodecBase
3025
3026**Since**: 12
3027
3028
3029### OH_MD_KEY_VIDEO_ENCODER_MSE
3030
3031```
3032const char* OH_MD_KEY_VIDEO_ENCODER_MSE
3033```
3034
3035**Description**
3036
3037Pointer to the key that describes the MSE of video frames. The value type is double.
3038
3039Pointer to the key that describes the average MSE value of the current frame encoding block. It is output with [OH_AVBuffer](_core.md#oh_avbuffer)
3040
3041**System capability**: SystemCapability.Multimedia.Media.CodecBase
3042
3043**Since**: 12
3044
3045
3046### OH_MD_KEY_VIDEO_ENCODER_TEMPORAL_GOP_REFERENCE_MODE
3047
3048```
3049const char* OH_MD_KEY_VIDEO_ENCODER_TEMPORAL_GOP_REFERENCE_MODE
3050```
3051
3052**Description**
3053
3054Pointer to the key that describes the reference mode in a temporal image group. The value type is int32_t. For details, see [OH_TemporalGopReferenceMode](#oh_temporalgopreferencemode). This key is valid only when temporal scalability is enabled.
3055
3056This key is optional and used only in the configuration phase of video encoding.
3057
3058**System capability**: SystemCapability.Multimedia.Media.CodecBase
3059
3060**Since**: 12
3061
3062
3063### OH_MD_KEY_VIDEO_ENCODER_TEMPORAL_GOP_SIZE
3064
3065```
3066const char* OH_MD_KEY_VIDEO_ENCODER_TEMPORAL_GOP_SIZE
3067```
3068
3069**Description**
3070
3071Pointer to the key that describes the size of a temporal image group. The value type is int32_t. This key is valid only when temporal scalability is enabled.
3072
3073This key is optional and used only in the configuration phase of video encoding.
3074
3075**System capability**: SystemCapability.Multimedia.Media.CodecBase
3076
3077**Since**: 12
3078
3079
3080### OH_MD_KEY_VIDEO_IS_HDR_VIVID
3081
3082```
3083const char* OH_MD_KEY_VIDEO_IS_HDR_VIVID
3084```
3085
3086**Description**
3087
3088Pointer to the key that describes whether the video track in a media file is HDR Vivid. The value type is int32_t. This key is used for both multiplexing and demultiplexing.
3089
3090The value **1** means the HDR Vivid video track, and **0** means other cases.
3091
3092**System capability**: SystemCapability.Multimedia.Media.CodecBase
3093
3094**Since**: 11
3095
3096
3097### OH_MD_KEY_DECODING_TIMESTAMP
3098
3099```
3100const char* OH_MD_KEY_DECODING_TIMESTAMP
3101```
3102
3103**Description**
3104
3105Pointer to the key that describes the decoding timestamp corresponding to the audio, video, or subtitle sample carried in AVBuffer, in microseconds. The value type is int64_t.
3106
3107**System capability**: SystemCapability.Multimedia.Media.CodecBase
3108
3109**Since**: 12
3110
3111
3112### OH_MD_KEY_BUFFER_DURATION
3113
3114```
3115const char* OH_MD_KEY_BUFFER_DURATION
3116```
3117
3118**Description**
3119
3120Pointer to the key that describes the duration corresponding to the audio, video, or subtitle sample carried in AVBuffer, in microseconds. The value type is int64_t.
3121
3122**System capability**: SystemCapability.Multimedia.Media.CodecBase
3123
3124**Since**: 12
3125
3126
3127### OH_MD_KEY_START_TIME
3128
3129```
3130const char* OH_MD_KEY_START_TIME
3131```
3132
3133**Description**
3134
3135Pointer to the key that describes the start time of the first frame in a media file, measured in microseconds. The value type is int64_t.
3136
3137**System capability**: SystemCapability.Multimedia.Media.CodecBase
3138
3139**Since**: 12
3140
3141### OH_MD_KEY_TRACK_START_TIME
3142
3143```
3144const char* OH_MD_KEY_TRACK_START_TIME
3145```
3146
3147**Description**
3148
3149Pointer to the key that describes the start time of the track, measured in microseconds. The value type is int64_t.
3150
3151**System capability**: SystemCapability.Multimedia.Media.CodecBase
3152
3153**Since**: 12
3154
3155
3156### OH_MD_KEY_VIDEO_DECODER_OUTPUT_COLOR_SPACE
3157
3158```
3159const char* OH_MD_KEY_VIDEO_DECODER_OUTPUT_COLOR_SPACE
3160```
3161
3162**Description**
3163
3164Pointer to the key that describes the output color space of the video decoder. The value type is int32_t.
3165
3166The supported value is **OH_COLORSPACE_BT709_LIMIT**. For details, see [OH_NativeBuffer_ColorSpace](../../reference/apis-arkgraphics2d/_o_h___native_buffer.md#oh_nativebuffer_colorspace-1).
3167
3168It is used when [OH_VideoDecoder_Configure](_video_decoder.md#oh_videodecoder_configure) is called.
3169
3170Before calling **OH_VideoDecoder_Start**, you must call **OH_VideoDecoder_Prepare**.
3171
3172If Color Space Conversion (CSC) is supported and this key is configured, the video decoder automatically transcodes the HDR Vivid video to the specified color space.
3173
3174If CSC function not supported, the error code [AV_ERR_VIDEO_UNSUPPORTED_COLOR_SPACE_CONVERSION](_core.md#oh_averrcode-1) is returned when [OH_VideoDecoder_Configure](_video_decoder.md#oh_videodecoder_configure) is called.
3175
3176If the input video is not an HDR Vivid video, the callback function [OH_AVCodecOnError](#oh_avcodeconerror) is invoked to report the error code [AV_ERR_VIDEO_UNSUPPORTED_COLOR_SPACE_CONVERSION](_core.md#oh_averrcode-1).
3177
3178**System capability**: SystemCapability.Multimedia.Media.CodecBase
3179
3180**Since**: 12
3181
3182
3183### OH_MD_KEY_VIDEO_PER_FRAME_IS_LTR
3184
3185```
3186const char* OH_MD_KEY_VIDEO_PER_FRAME_IS_LTR
3187```
3188**Description**
3189
3190Pointer to the key that describes the key that specifies whether the frame corresponding to the stream output from the current OH_AVBuffer is marked as an LTR frame. The value type is int32_t. The value **1** means that the frame is an LTR frame, and **0** means the opposite.
3191
3192This key is optional and is used only for video encoding output rotation.
3193
3194It indicates the attribute of a frame.
3195
3196**System capability**: SystemCapability.Multimedia.Media.CodecBase
3197
3198**Since**: 12
3199
3200
3201### OH_MD_KEY_VIDEO_PER_FRAME_POC
3202
3203```
3204const char* OH_MD_KEY_VIDEO_PER_FRAME_POC
3205```
3206**Description**
3207
3208Pointer to the key that describes the POC number of the frame. The value type is int32_t.
3209
3210This key is optional and is used only for video encoding output rotation.
3211
3212It indicates the attribute of a frame.
3213
3214**System capability**: SystemCapability.Multimedia.Media.CodecBase
3215
3216**Since**: 12
3217
3218
3219### OH_MD_KEY_VIDEO_PIC_HEIGHT
3220
3221```
3222const char* OH_MD_KEY_VIDEO_PIC_HEIGHT
3223```
3224
3225**Description**
3226
3227Pointer to the key that describes the height of the video frame. The value type is int32_t.
3228
3229When [OH_VideoDecoder_GetOutputDescription](_video_decoder.md#oh_videodecoder_getoutputdescription) is called during video decoding, the height can be parsed from the returned **OH_AVFormat** instance.
3230
3231When the decoded output stream<!--RP2--><!--RP2End--> changes, the height can be parsed from the **OH_AVForamt** instance returned by [OH_AVCodecOnStreamChanged](#oh_avcodeconstreamchanged).
3232
3233The width and height parsed from the **OH_AVFormat** instance are aligned, which are different from **OH_MD_KEY_WIDTH** and **OH_MD_KEY_HEIGHT** set by calling **Configure**.
3234
3235For details about the image arrangement and usage examples of **width**, **height**, **wStride**, and **hStride**, see step 8 in buffer mode in [Video Encoding](../../media/avcodec/video-encoding.md#buffer-input) or step 10 in buffer mode in [Video Decoding](../../media/avcodec/video-decoding.md#buffer-output).
3236
3237**System capability**: SystemCapability.Multimedia.Media.CodecBase
3238
3239**Since**: 12
3240
3241
3242### OH_MD_KEY_VIDEO_PIC_WIDTH
3243
3244```
3245const char* OH_MD_KEY_VIDEO_PIC_WIDTH
3246```
3247
3248**Description**
3249
3250Pointer to the key that describes the width of the video frame. The value type is int32_t.
3251
3252When [OH_VideoDecoder_GetOutputDescription](_video_decoder.md#oh_videodecoder_getoutputdescription) is called during video decoding, the width can be parsed from the returned **OH_AVFormat** instance.
3253
3254When the decoded output stream<!--RP2--><!--RP2End--> changes, the width can be parsed from the **OH_AVForamt** instance returned by [OH_AVCodecOnStreamChanged](#oh_avcodeconstreamchanged).
3255
3256The width and height parsed from the **OH_AVFormat** instance are aligned, which are different from **OH_MD_KEY_WIDTH** and **OH_MD_KEY_HEIGHT** set by calling **Configure**.
3257
3258For details about the image arrangement and usage examples of **width**, **height**, **wStride**, and **hStride**, see step 8 in buffer mode in [Video Encoding](../../media/avcodec/video-encoding.md#buffer-input) or step 10 in buffer mode in [Video Decoding](../../media/avcodec/video-decoding.md#buffer-output).
3259
3260**System capability**: SystemCapability.Multimedia.Media.CodecBase
3261
3262**Since**: 12
3263
3264
3265### OH_MD_KEY_VIDEO_SLICE_HEIGHT
3266
3267```
3268const char* OH_MD_KEY_VIDEO_SLICE_HEIGHT
3269```
3270**Description**
3271
3272Pointer to the key that describes the height of the video frame. The value type is int32_t.
3273
3274The height is the number of rows that must be offset from the top of the Y plane to the top of the U plane. Essentially, the offset of the U plane is sliceHeight \* stride.
3275
3276The height of the U/V plane can be calculated based on the color format, but it is usually not defined and depends on the device and version.
3277
3278For details, see step 3 in buffer mode in [Video Encoding](../../media/avcodec/video-encoding.md#buffer-input).
3279
3280For details about the image arrangement and usage examples of **width**, **height**, **wStride**, and **hStride**, see step 8 in buffer mode in [Video Encoding](../../media/avcodec/video-encoding.md#buffer-input) or step 10 in buffer mode in [Video Decoding](../../media/avcodec/video-decoding.md#buffer-output).
3281
3282**System capability**: SystemCapability.Multimedia.Media.CodecBase
3283
3284**Since**: 12
3285
3286
3287### OH_MD_KEY_VIDEO_STRIDE
3288
3289```
3290const char* OH_MD_KEY_VIDEO_STRIDE
3291```
3292**Description**
3293
3294Pointer to the key that describes the stride of the video frame. The value type is int32_t.
3295
3296The stride is the difference between the index of the pixel and the index of the pixel right below.
3297
3298For the YUV420 format, the stride corresponds to the Y plane. The stride of the U/V plane can be calculated based on the color format, but it is usually not defined and depends on the device and version.
3299
3300For details, see step 3 in buffer mode in [Video Encoding](../../media/avcodec/video-encoding.md#buffer-input).
3301
3302For details about the image arrangement and usage examples of **width**, **height**, **wStride**, and **hStride**, see step 8 in buffer mode in [Video Encoding](../../media/avcodec/video-encoding.md#buffer-input) or step 10 in buffer mode in [Video Decoding](../../media/avcodec/video-decoding.md#buffer-output).
3303
3304**System capability**: SystemCapability.Multimedia.Media.CodecBase
3305
3306**Since**: 12
3307
3308
3309### OH_MD_KEY_WIDTH
3310
3311```
3312const char* OH_MD_KEY_WIDTH
3313```
3314
3315**Description**
3316
3317Pointer to the key that describes the video width. The value type is int32_t.
3318
3319This key is used to set the display width of a video frame when **Configure** is called during video encoding and decoding.
3320
3321For details about the development guide, see step 5 in surface mode or step 4 in buffer mode in [Video Encoding](../../media/avcodec/video-encoding.md).
3322
3323**System capability**: SystemCapability.Multimedia.Media.CodecBase
3324
3325**Since**: 9
3326
3327
3328### OH_MD_MAX_INPUT_BUFFER_COUNT
3329
3330```
3331const char* OH_MD_MAX_INPUT_BUFFER_COUNT
3332```
3333
3334**Description**
3335
3336Pointer to the key that describes the maximum number of input buffers. The value type is int32_t.
3337
3338**System capability**: SystemCapability.Multimedia.Media.CodecBase
3339
3340**Since**: 10
3341
3342
3343### OH_MD_MAX_OUTPUT_BUFFER_COUNT
3344
3345```
3346const char* OH_MD_MAX_OUTPUT_BUFFER_COUNT
3347```
3348
3349**Description**
3350
3351Pointer to the key that describes the maximum number of output buffers. The value type is int32_t.
3352
3353**System capability**: SystemCapability.Multimedia.Media.CodecBase
3354
3355**Since**: 10
3356
3357
3358### OH_MD_KEY_VIDEO_SAR
3359
3360```
3361const char* OH_MD_KEY_VIDEO_SAR
3362```
3363
3364**Description**
3365
3366Pointer to the key that describes the aspect ratio of the sample. The value type is double.
3367
3368**System capability**: SystemCapability.Multimedia.Media.CodecBase
3369
3370**Since**: 12
3371
3372
3373### OH_MD_KEY_CREATION_TIME
3374
3375```
3376const char* OH_MD_KEY_CREATION_TIME
3377```
3378
3379**Description**
3380
3381Pointer to the key that describes the media file creation time. The value type is string. The value must be in the UTC time format complying with ISO 8601. An example time format is 2024-12-28T00:00:00:000000Z.
3382
3383**System capability**: SystemCapability.Multimedia.Media.CodecBase
3384
3385**Since**: 14
3386
3387### OH_MD_KEY_VIDEO_DECODER_OUTPUT_ENABLE_VRR
3388
3389```
3390const char* OH_MD_KEY_VIDEO_DECODER_OUTPUT_ENABLE_VRR
3391```
3392
3393**Description**
3394
3395Pointer to the key that specifies whether the decoder enables the video variable frame rate feature. The value type is int32_t. The value **1** means that the video variable frame rate feature is enabled, and **0** means the opposite.
3396
3397**System capability**: SystemCapability.Multimedia.Media.CodecBase
3398
3399**Since**: 15
3400
3401### OH_MD_KEY_VIDEO_ENCODER_REPEAT_PREVIOUS_FRAME_AFTER
3402
3403```
3404const char* OH_MD_KEY_VIDEO_ENCODER_REPEAT_PREVIOUS_FRAME_AFTER
3405```
3406
3407**Description**
3408
3409Pointer to the key that specifies the duration (in milliseconds) for which the last frame will be resubmitted repeatedly, if no new frame is available after the previous frame is submitted to the encoder. The value type is int32_t.
3410
3411This key is used only in the configuration phase of video encoding in surface mode.
3412
3413| Value| Description|
3414| -------- | -------- |
3415| Less than or equal to 0| The request is intercepted in the configuration phase and **ERROR AV_ERR_INVALID_VAL** is returned. |
3416| Greater than 0|  The last frame will be resubmitted repeatedly in the specified duration, measured in milliseconds.|
3417
3418**System capability**: SystemCapability.Multimedia.Media.CodecBase
3419
3420**Since**: 18
3421
3422
3423### OH_MD_KEY_VIDEO_ENCODER_REPEAT_PREVIOUS_MAX_COUNT
3424
3425```
3426const char* OH_MD_KEY_VIDEO_ENCODER_REPEAT_PREVIOUS_MAX_COUNT
3427```
3428
3429**Description**
3430
3431Pointer to the key that describes the maximum number of times the encoder can repeat encoding the previous frame when no new frame is available. The value type is int32_t.
3432
3433This key takes effect only when [OH_MD_KEY_VIDEO_ENCODER_REPEAT_PREVIOUS_FRAME_AFTER](#oh_md_key_video_encoder_repeat_previous_frame_after) is available and is used only in the configuration phase.
3434
3435| Value| Description|
3436| -------- | -------- |
3437| 0  | The request is intercepted in the configuration phase and **ERROR AV_ERR_INVALID_VAL** is returned. |
3438| Less than 0| If no new frame is available, the encoder repeatedly encodes the previous frame until the upper limit of the system is reached. |
3439| Greater than 0|  If no new frame is available, the encoder repeatedly encodes the previous frame until the maximum number specified is reached.|
3440
3441**System capability**: SystemCapability.Multimedia.Media.CodecBase
3442
3443**Since**: 18
3444