harmony 鸿蒙native_avcodec_base.h

2025-06-12 浏览 (1)

native_avcodec_base.h

Overview

The native_avcodec_base.h file declares the native APIs used for basic audio and video multiplexing, demultiplexing, encoding, and decoding.

Library: libnative_media_codecbase.so

Since: 9

Related module: CodecBase

Summary

Structs

NameDescription
struct OH_AVCodecAsyncCallbackDescribes all the asynchronous callback function pointers of an OH_AVCodec instance. (This struct is deprecated from API version 11.)
struct OH_AVCodecCallbackDescribes all the callback function pointers of an OH_AVCodec instance.
struct OH_AVDataSourceDescribes a user-defined data source.

Types

NameDescription
typedef void(* OH_AVCodecOnError) (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.
typedef void(* OH_AVCodecOnStreamChanged) (OH_AVCodec *codec, 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.
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 AAC, FLAC, MP3, and VORBIS.
typedef void(* OH_AVCodecOnNeedInputData) (OH_AVCodec *codec, uint32_t index, 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 type is deprecated from API version 11.)
typedef void(* OH_AVCodecOnNewOutputData) (OH_AVCodec *codec, uint32_t index, OH_AVMemory *data, OH_AVCodecBufferAttr *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 type is deprecated from API version 11.)
typedef void(* OH_AVCodecOnNeedInputBuffer) (OH_AVCodec *codec, uint32_t index, 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.
typedef void(* OH_AVCodecOnNewOutputBuffer) (OH_AVCodec *codec, uint32_t index, 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.
typedef struct OH_AVCodecAsyncCallback OH_AVCodecAsyncCallbackDefines a struct for all the asynchronous callback function pointers of an OH_AVCodec instance. (This type is deprecated from API version 11.)
typedef struct OH_AVCodecCallback OH_AVCodecCallbackDefines a struct for all the callback function pointers of an OH_AVCodec instance.
typedef int32_t(* OH_AVDataSourceReadAt) (OH_AVBuffer *data, int32_t length, int64_t offset)Defines a function pointer used to provide the capability of obtaining user-defined media data.
typedef struct OH_AVDataSource OH_AVDataSourceDefines a struct for the user-defined data source.
typedef enum OH_MediaType OH_MediaTypeDefines an enum for the media types.
typedef enum OH_AACProfile OH_AACProfileDefines an enum for the Advanced Audio Coding (AAC) profiles.
typedef enum OH_AVCProfile OH_AVCProfileDefines an enum for the Advanced Video Coding (AVC) profiles.
typedef enum OH_HEVCProfile OH_HEVCProfileDefines an enum for the High Efficiency Video Coding (HEVC) profiles.
typedef enum OH_VVCProfile OH_VVCProfileDefines an enum for the Versatile Video Coding (VVC) profiles.
typedef enum OH_H263Profile OH_H263ProfileDefines an enum for the H.263 profiles.
typedef enum OH_MPEG2Profile OH_MPEG2ProfileDefines an enum for the MPEG2 profiles.
typedef enum OH_MPEG4Profile OH_MPEG4ProfileDefines an enum for the MPEG4 profiles.
typedef enum OH_AVOutputFormat OH_AVOutputFormatDefines an enum for the output file formats supported by a muxer.
typedef enum OH_AVSeekMode OH_AVSeekModeDefines an enum for the seek modes.
typedef enum OH_ScalingMode OH_ScalingModeDefines an enum for the scaling modes. This enum is used only in surface mode. (This type is deprecated from API version 14.)
typedef enum OH_BitsPerSample OH_BitsPerSampleDefines an enum for the number of audio bits for each coded sample.
typedef enum OH_ColorPrimary OH_ColorPrimaryDefines an enum for the primary colors.
typedef enum OH_TransferCharacteristic OH_TransferCharacteristicDefines an enum for the transfer characteristics.
typedef enum OH_MatrixCoefficient OH_MatrixCoefficientDefines an enum for the matrix coefficients.
typedef enum OH_AVCLevel OH_AVCLevelDefines an enum for the AVC levels.
typedef enum OH_HEVCLevel OH_HEVCLevelDefines an enum for the HEVC levels.
typedef enum OH_VVCLevel OH_VVCLevelDefines an enum for the VVC levels.
typedef enum OH_H263Level OH_H263Level Defines an enum for the H.263 levels.
typedef enum OH_MPEG2Level OH_MPEG2LevelDefines an enum for the MPEG2 levels.
typedef enum OH_MPEG4Level OH_MPEG4LevelDefines an enum for the MPEG4 levels.
typedef enum OH_TemporalGopReferenceMode OH_TemporalGopReferenceModeDefines an enum for the reference modes of temporal image groups.

Enums

NameDescription
OH_MediaType {
MEDIA_TYPE_AUD = 0,
MEDIA_TYPE_VID = 1,
MEDIA_TYPE_SUBTITILE = 2
}
Enumerates the media types.
OH_AACProfile {
AAC_PROFILE_LC = 0,
AAC_PROFILE_HE = 3,
AAC_PROFILE_HE_V2 = 4
}
Enumerates the AAC profiles.
(AAC_PROFILE_HE and AAC_PROFILE_HE_V2 are not available yet.)
OH_AVCProfile {
AVC_PROFILE_BASELINE = 0,
AVC_PROFILE_HIGH = 4,
AVC_PROFILE_MAIN = 8
}
Enumerates the AVC profiles.
OH_HEVCProfile {
HEVC_PROFILE_MAIN = 0,
HEVC_PROFILE_MAIN_10 = 1,
HEVC_PROFILE_MAIN_STILL = 2,
HEVC_PROFILE_MAIN_10_HDR10 = 3,
HEVC_PROFILE_MAIN_10_HDR10_PLUS = 4
}
Enumerates the HEVC profiles.
(HEVC_PROFILE_MAIN_10_HDR10 and HEVC_PROFILE_MAIN_10_HDR10_PLUS are deprecated since API version 14.)
OH_VVCProfile {
VVC_PROFILE_MAIN_10 = 1,
VVC_PROFILE_MAIN_12 = 2,
VVC_PROFILE_MAIN_12_INTRA = 10,
VVC_PROFILE_MULTI_MAIN_10 = 17,
VVC_PROFILE_MAIN_10_444 = 33,
VVC_PROFILE_MAIN_12_444 = 34,
VVC_PROFILE_MAIN_16_444 = 36,
VVC_PROFILE_MAIN_12_444_INTRA = 42,
VVC_PROFILE_MAIN_16_444_INTRA = 44,
VVC_PROFILE_MULTI_MAIN_10_444 = 49,
VVC_PROFILE_MAIN_10_STILL = 65,
VVC_PROFILE_MAIN_12_STILL = 66,
VVC_PROFILE_MAIN_10_444_STILL = 97,
VVC_PROFILE_MAIN_12_444_STILL = 98,
VVC_PROFILE_MAIN_16_444_STILL = 100
}
Enumerates the VVC profiles.
OH_H263Profile {
H263_PROFILE_BASELINE = 0,
H263_PROFILE_VERSION_1_BACKWARD_COMPATIBILITY = 2
}
Enumerates the H.263 profiles.
OH_MPEG2Profile {
MPEG2_PROFILE_SIMPLE = 0,
MPEG2_PROFILE_MAIN = 1,
MPEG2_PROFILE_SNR = 2,
MPEG2_PROFILE_SPATIAL = 3,
MPEG2_PROFILE_HIGH = 4,
MPEG2_PROFILE_422 = 5
}
Enumerates the MPEG2 profiles.
OH_MPEG4Profile {
MPEG4_PROFILE_SIMPLE = 0,
MPEG4_PROFILE_SIMPLE_SCALABLE = 1,
MPEG4_PROFILE_CORE = 2,
MPEG4_PROFILE_MAIN = 3,
MPEG4_PROFILE_NBIT = 4,
MPEG4_PROFILE_HYBRID = 5,
MPEG4_PROFILE_BASIC_ANIMATED_TEXTURE = 6,
MPEG4_PROFILE_SCALABLE_TEXTURE = 7,
MPEG4_PROFILE_SIMPLE_FA = 8,
MPEG4_PROFILE_ADVANCED_REAL_TIME_SIMPLE = 9,
MPEG4_PROFILE_CORE_SCALABLE = 10,
MPEG4_PROFILE_ADVANCED_CODING_EFFICIENCY = 11,
MPEG4_PROFILE_ADVANCED_CORE = 12,
MPEG4_PROFILE_ADVANCED_SCALABLE_TEXTURE = 13,
MPEG4_PROFILE_ADVANCED_SIMPLE = 17
}
Enumerates the MPEG4 profiles.
OH_AVOutputFormat {
AV_OUTPUT_FORMAT_DEFAULT = 0,
AV_OUTPUT_FORMAT_MPEG_4 = 2,
AV_OUTPUT_FORMAT_M4A = 6,
AV_OUTPUT_FORMAT_AMR = 8,
AV_OUTPUT_FORMAT_MP3 = 9,
AV_OUTPUT_FORMAT_WAV = 10,
AV_OUTPUT_FORMAT_AAC = 11
}
Enumerates the output file formats supported by a muxer.
OH_AVSeekMode {
SEEK_MODE_NEXT_SYNC = 0,
SEEK_MODE_PREVIOUS_SYNC,
SEEK_MODE_CLOSEST_SYNC
}
Enumerates the seek modes.
OH_ScalingMode {
SCALING_MODE_SCALE_TO_WINDOW = 1,
SCALING_MODE_SCALE_CROP = 2
}
Enumerates the scaling modes. (This enum is deprecated from API version 14.)
OH_BitsPerSample {
SAMPLE_U8 = 0, SAMPLE_S16LE = 1,
SAMPLE_S24LE = 2, SAMPLE_S32LE = 3,
SAMPLE_F32LE = 4, SAMPLE_U8P = 5,
SAMPLE_S16P = 6, SAMPLE_S24P = 7,
SAMPLE_S32P = 8, SAMPLE_F32P = 9,
INVALID_WIDTH = -1
}
Enumerates the number of audio bits for each coded sample.
OH_ColorPrimary {
COLOR_PRIMARY_BT709 = 1,
COLOR_PRIMARY_UNSPECIFIED = 2,
COLOR_PRIMARY_BT470_M = 4,
COLOR_PRIMARY_BT601_625 = 5,
COLOR_PRIMARY_BT601_525 = 6,
COLOR_PRIMARY_SMPTE_ST240 = 7,
COLOR_PRIMARY_GENERIC_FILM = 8,
COLOR_PRIMARY_BT2020 = 9,
COLOR_PRIMARY_SMPTE_ST428 = 10,
COLOR_PRIMARY_P3DCI = 11,
COLOR_PRIMARY_P3D65 = 12
}
Enumerates the primary colors.
OH_TransferCharacteristic {
TRANSFER_CHARACTERISTIC_BT709 = 1,
TRANSFER_CHARACTERISTIC_UNSPECIFIED = 2,
TRANSFER_CHARACTERISTIC_GAMMA_2_2 = 4,
TRANSFER_CHARACTERISTIC_GAMMA_2_8 = 5,
TRANSFER_CHARACTERISTIC_BT601 = 6,
TRANSFER_CHARACTERISTIC_SMPTE_ST240 = 7,
TRANSFER_CHARACTERISTIC_LINEAR = 8,
TRANSFER_CHARACTERISTIC_LOG = 9,
TRANSFER_CHARACTERISTIC_LOG_SQRT = 10,
TRANSFER_CHARACTERISTIC_IEC_61966_2_4 = 11,
TRANSFER_CHARACTERISTIC_BT1361 = 12,
TRANSFER_CHARACTERISTIC_IEC_61966_2_1 = 13,
TRANSFER_CHARACTERISTIC_BT2020_10BIT = 14,
TRANSFER_CHARACTERISTIC_BT2020_12BIT = 15,
TRANSFER_CHARACTERISTIC_PQ = 16,
TRANSFER_CHARACTERISTIC_SMPTE_ST428 = 17,
TRANSFER_CHARACTERISTIC_HLG = 18
}
Enumerates the transfer characteristics.
OH_MatrixCoefficient {
MATRIX_COEFFICIENT_IDENTITY = 0,
MATRIX_COEFFICIENT_BT709 = 1,
MATRIX_COEFFICIENT_UNSPECIFIED = 2,
MATRIX_COEFFICIENT_FCC = 4,
MATRIX_COEFFICIENT_BT601_625 = 5,
MATRIX_COEFFICIENT_BT601_525 = 6, MATRIX_COEFFICIENT_SMPTE_ST240 = 7,
MATRIX_COEFFICIENT_YCGCO = 8,
MATRIX_COEFFICIENT_BT2020_NCL = 9,
MATRIX_COEFFICIENT_BT2020_CL = 10,
MATRIX_COEFFICIENT_SMPTE_ST2085 = 11,
MATRIX_COEFFICIENT_CHROMATICITY_NCL = 12,
MATRIX_COEFFICIENT_CHROMATICITY_CL = 13,
MATRIX_COEFFICIENT_ICTCP = 14
}
Enumerates the matrix coefficients.
OH_AVCLevel {
AVC_LEVEL_1 = 0,
AVC_LEVEL_1b = 1,
AVC_LEVEL_11 = 2,
AVC_LEVEL_12 = 3,
AVC_LEVEL_13 = 4,
AVC_LEVEL_2 = 5,
AVC_LEVEL_21 = 6,
AVC_LEVEL_22 = 7,
AVC_LEVEL_3 = 8,
AVC_LEVEL_31 = 9,
AVC_LEVEL_32 = 10,
AVC_LEVEL_4 = 11,
AVC_LEVEL_41 = 12,
AVC_LEVEL_42 = 13,
AVC_LEVEL_5 = 14,
AVC_LEVEL_51 = 15,
AVC_LEVEL_52 = 16,
AVC_LEVEL_6 = 17,
AVC_LEVEL_61 = 18,
AVC_LEVEL_62 = 19
}
Enumerates the AVC levels.
OH_HEVCLevel {
HEVC_LEVEL_1 = 0,
HEVC_LEVEL_2 = 1,
HEVC_LEVEL_21 = 2,
HEVC_LEVEL_3 = 3,
HEVC_LEVEL_31 = 4,
HEVC_LEVEL_4 = 5,
HEVC_LEVEL_41 = 6,
HEVC_LEVEL_5 = 7,
HEVC_LEVEL_51 = 8,
HEVC_LEVEL_52 = 9,
HEVC_LEVEL_6 = 10,
HEVC_LEVEL_61 = 11,
HEVC_LEVEL_62 = 12
}
Enumerates the HEVC levels.
OH_VVCLevel {
VVC_LEVEL_1 = 16,
VVC_LEVEL_2 = 32,
VVC_LEVEL_21 = 35,
VVC_LEVEL_3 = 48,
VVC_LEVEL_31 = 51,
VVC_LEVEL_4 = 64,
VVC_LEVEL_41 = 67,
VVC_LEVEL_5 = 80,
VVC_LEVEL_51 = 83,
VVC_LEVEL_52 = 86,
VVC_LEVEL_6 = 96,
VVC_LEVEL_61 = 99,
VVC_LEVEL_62 = 102,
VVC_LEVEL_63 = 105,
VVC_LEVEL_155 = 255
}
Enumerates the VVC levels.
OH_H263Level {
H263_LEVEL_10 = 0,
H263_LEVEL_20 = 1,
H263_LEVEL_30 = 2,
H263_LEVEL_40 = 3,
H263_LEVEL_45 = 4,
H263_LEVEL_50 = 5,
H263_LEVEL_60 = 6,
H263_LEVEL_70 = 7
}
Enumerates the H.263 levels.
OH_MPEG2Level {
MPEG2_LEVEL_LL = 0,
MPEG2_LEVEL_ML = 1,
MPEG2_LEVEL_H14 = 2,
MPEG2_LEVEL_HL = 3
}
Enumerates the MPEG2 levels.
OH_MPEG4Level {
MPEG4_LEVEL_0 = 0,
MPEG4_LEVEL_0B = 1,
MPEG4_LEVEL_1 = 2,
MPEG4_LEVEL_2 = 3,
MPEG4_LEVEL_3 = 4,
MPEG4_LEVEL_3B = 5,
MPEG4_LEVEL_4 = 6,
MPEG4_LEVEL_4A = 7,
MPEG4_LEVEL_5 = 8,
MPEG4_LEVEL_6 = 9
}
Enumerates the MPEG4 levels.
OH_TemporalGopReferenceMode {
ADJACENT_REFERENCE = 0,
JUMP_REFERENCE = 1,
UNIFORMLY_SCALED_REFERENCE = 2
}
Enumerates the reference modes of temporal image groups.

Variables

NameDescription
const char * OH_AVCODEC_MIMETYPE_VIDEO_AVCPointer to the key that describes the Multipurpose Internet Mail Extension (MIME) type of AVC (H.264) video codec.
const char * OH_AVCODEC_MIMETYPE_AUDIO_AACPointer to the key that describes the MIME type of AAC audio codec.
const char * OH_AVCODEC_MIMETYPE_AUDIO_FLACPointer to the key that describes the MIME type of FLAC audio codec.
const char * OH_AVCODEC_MIMETYPE_AUDIO_VORBISPointer to the key that describes the MIME type of the Vorbis audio decoder.
const char * OH_AVCODEC_MIMETYPE_AUDIO_MPEGPointer to the key that describes the MIME type of the MP3 audio decoder.
const char * OH_AVCODEC_MIMETYPE_VIDEO_HEVCPointer to the key that describes the MIME type of HEVC (H.265) video codec.
const char * OH_AVCODEC_MIMETYPE_VIDEO_H263Pointer to the key that describes the MIME type of H.263 video codec.
const char * OH_AVCODEC_MIMETYPE_VIDEO_MPEG4Pointer to the key that describes the MIME type of the MPEG4 video encoder, which is used only for multiplexing MPEG4 video streams.
const char * OH_AVCODEC_MIMETYPE_VIDEO_MPEG4_PART2Pointer to the key that describes the MIME type of MPEG4 Part 2 video codec.
const char * OH_AVCODEC_MIMETYPE_VIDEO_MPEG2Pointer to the key that describes the MIME type of MPEG2 video codec.
const char * OH_AVCODEC_MIMETYPE_IMAGE_JPGPointer to the key that describes the MIME type of the JPG image encoder, which is used only for multiplexing JPG covers.
const char * OH_AVCODEC_MIMETYPE_IMAGE_PNGPointer to the key that describes the MIME type of the PNG image encoder, which is used only for multiplexing PNG covers.
const char * OH_AVCODEC_MIMETYPE_IMAGE_BMPPointer to the key that describes the MIME type of the BMP image encoder, which is used only for multiplexing BMP covers.
const char * OH_AVCODEC_MIMETYPE_AUDIO_VIVIDPointer to the key that describes the MIME type of the Audio Vivid audio decoder. (This specification is not available yet.)
const char * OH_AVCODEC_MIMETYPE_AUDIO_AMR_NBPointer to the key that describes the MIME type of the AMR-NB audio decoder.
const char * OH_AVCODEC_MIMETYPE_AUDIO_AMR_WBPointer to the key that describes the MIME type of the AMR-WB audio decoder.
const char * OH_AVCODEC_MIMETYPE_AUDIO_OPUSPointer to the key that describes the MIME type of Opus audio codec. (This specification is not available yet.)
const char * OH_AVCODEC_MIMETYPE_AUDIO_G711MUPointer to the key that describes the MIME type of G.711 mu-law audio codec.
const char * OH_AVCODEC_MIMETYPE_AUDIO_RAWPointer to the key that describes the MIME type of raw audio streams.
const char * OH_AVCODEC_MIMETYPE_AUDIO_APEPointer to the key that describes the MIME type of the APE audio decoder.
const char * OH_AVCODEC_MIMETYPE_VIDEO_VVCPointer to the key that describes the MIME type of the VVC (H.266) video codec.
const char * OH_AVCODEC_MIMETYPE_SUBTITLE_SRTPointer to the key that describes the MIME type of the SRT subtitle demuxer.
const char * OH_AVCODEC_MIMETYPE_SUBTITLE_WEBVTTPointer to the key that describes the MIME type of the WEBVTT subtitle demuxer.
const char * OH_ED_KEY_TIME_STAMPPointer 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.)
const char * OH_ED_KEY_EOSPointer 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.)
const char * OH_MD_KEY_TRACK_TYPEPointer to the key that describes the track in a media type. The value type is int32_t. For details, see OH_MediaType.
const char * OH_MD_KEY_CODEC_MIMEPointer to the key that describes the MIME type of the codec. The value type is string.
const char * OH_MD_KEY_DURATIONPointer to the key that describes the duration of a media file. The value type is int64_t.
const char * OH_MD_KEY_BITRATEPointer to the key that describes the bit rate. The value type is int64_t.
const char * OH_MD_KEY_MAX_INPUT_SIZEPointer to the key that describes the maximum size of an input stream to decode. The value type is int32_t.
const char * OH_MD_KEY_WIDTHPointer to the key that describes the video width. The value type is int32_t.
const char * OH_MD_KEY_HEIGHTPointer to the key that describes the video height. The value type is int32_t.
const char * OH_MD_KEY_PIXEL_FORMATPointer to the key that describes the video pixel format. The value type is int32_t. For details, see OH_AVPixelFormat.
const char * OH_MD_KEY_AUDIO_SAMPLE_FORMATPointer to the key that describes the original audio format. The value type is int32_t. For details, see OH_BitsPerSample.
const char * OH_MD_KEY_FRAME_RATEPointer to the key that describes the video frame rate. The value type is double.
const char * OH_MD_KEY_VIDEO_ENCODE_BITRATE_MODEPointer to the key that describes the video encoding bit rate mode. The value type is int32_t. For details, see OH_BitrateMode.
const char * OH_MD_KEY_PROFILEPointer to the key that describes the encoding grading. The value type is int32_t. For details, see OH_AVCProfile, OH_HEVCProfile, and OH_AACProfile.
const char * OH_MD_KEY_AUD_CHANNEL_COUNTPointer to the key that describes the number of audio channels. The value type is int32_t.
const char * OH_MD_KEY_AUD_SAMPLE_RATEPointer to the key that describes the audio sampling rate. The value type is int32_t.
const char * OH_MD_KEY_I_FRAME_INTERVALPointer to the key that describes the key frame interval, in milliseconds. The value type is int32_t.
const char * OH_MD_KEY_ROTATIONPointer 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.
const char * OH_MD_KEY_RANGE_FLAGPointer 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.
const char * OH_MD_KEY_COLOR_PRIMARIESPointer to the key that describes the video primary color. The value type is int32_t. For details, see OH_ColorPrimary. The video primary color complies with Table 2 in the H.273 standard.
const char * OH_MD_KEY_TRANSFER_CHARACTERISTICSPointer to the key that describes the video transfer characteristics. The value type is int32_t. For details, see OH_TransferCharacteristic. The video transfer characteristics comply with Table 3 in the H.273 standard.
const char * OH_MD_KEY_MATRIX_COEFFICIENTSPointer to the key that describes the video matrix coefficient. The value type is int32_t. For details, see OH_MatrixCoefficient. The video matrix coefficient complies with Table 4 in the H.273 standard.
const char * OH_MD_KEY_REQUEST_I_FRAMEPointer to the key that describes the request for immediate encoding of I-frames. The value type is int32_t.
const char * OH_MD_KEY_QUALITYPointer 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.
const char * OH_MD_KEY_CODEC_CONFIGPointer to the key that describes the codec-specific data. The value type is uint8_t*. (This key is not supported yet for the video codec.)
const char * OH_MD_KEY_TRACK_START_TIMEPointer to the key that describes the start time of the track, measured in microseconds. The value type is int64_t.
const char * OH_MD_KEY_TITLEPointer to the key that describes the title of a media file. The value is of the string type.
const char * OH_MD_KEY_ARTISTPointer to the key that describes the lyrics of a media file. The value type is string.
const char * OH_MD_KEY_ALBUMPointer to the key that describes the album of a media file. The value type is string.
const char * OH_MD_KEY_ALBUM_ARTISTPointer to the key that describes the album artist of the input media. The value type is string.
const char * OH_MD_KEY_DATEPointer to the key that describes the date of a media file, for example, 2024. The value type is string.
const char * OH_MD_KEY_COMMENTPointer to the key that describes the comment of a media file. The value is of the string type.
const char * OH_MD_KEY_GENREPointer to the key that describes the genre of a media file. The value type is string.
const char * OH_MD_KEY_COPYRIGHTPointer to the key that describes the copyright of a media file. The value type is string.
const char * OH_MD_KEY_LANGUAGEPointer to the key that describes the language of a media file. The value type is string.
const char * OH_MD_KEY_DESCRIPTIONPointer to the key that describes the description of a media file. The value type is string.
const char * OH_MD_KEY_LYRICSPointer to the key that describes the lyrics of a media file. The value type is string.
const char * OH_MD_KEY_TRACK_COUNTPointer to the key that describes the number of tracks of a media file. The value type is int32_t.
const char * OH_MD_KEY_CHANNEL_LAYOUTPointer to the key that describes the required encoding channel layout. The value type is int64_t. This key applies only to encoders.
const char * OH_MD_KEY_BITS_PER_CODED_SAMPLEPointer 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.
const char * OH_MD_KEY_AAC_IS_ADTSPointer to the key that describes the AAC format, which can be ADTS or LATM. The value type is int32_t. This key is supported only by the AAC decoder.
const char * OH_MD_KEY_SBRPointer to the key that describes the AAC SBR format. The value type is int32_t. This key applies to AAC encoders.
const char * OH_MD_KEY_COMPLIANCE_LEVELPointer to the key that describes the FLAC compliance level. The value type is int32_t. This key is used only for audio encoding.
const char * OH_MD_KEY_IDENTIFICATION_HEADERPointer to the key that describes the VORBIS identification header. The value type is uint8_t*. This key applies only to VORBIS decoders.
const char * OH_MD_KEY_SETUP_HEADERPointer to the key that describes the VORBIS setup header. The value type is uint8_t*. This key applies only to VORBIS decoders.
const char * OH_MD_KEY_SCALING_MODEPointer to the key that describes the video scaling mode. The value type is int32_t. For details, see OH_ScalingMode. This key is used only in video decoding surface mode. You are advised to set the scaling mode by calling OH_NativeWindow_NativeWindowSetScalingModeV2. (This variable is deprecated from API version 14.)
const char * OH_MD_MAX_INPUT_BUFFER_COUNTPointer to the key that describes the maximum number of input buffers. The value type is int32_t.
const char * OH_MD_MAX_OUTPUT_BUFFER_COUNTPointer to the key that describes the maximum number of output buffers. The value type is int32_t.
const char * OH_MD_KEY_AUDIO_COMPRESSION_LEVELPointer to the key that describes the compression level for audio encoding and decoding. The value type is int32_t type. This key is used only for audio encoding.
const char * OH_MD_KEY_VIDEO_IS_HDR_VIVIDPointer 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.
const char * OH_MD_KEY_AUDIO_OBJECT_NUMBERPointer 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.
const char * OH_MD_KEY_AUDIO_VIVID_METADATAPointer to the key that describes the Audio Vivid metadata. The value type is uint8_t*. This key is used only for Audio Vivid decoding.
const char * OH_FEATURE_PROPERTY_KEY_VIDEO_ENCODER_MAX_LTR_FRAME_COUNTPointer to the key that describes the maximum number of long-term reference frames obtained during video encoding. The value type is int32_t.
const char * OH_MD_KEY_VIDEO_ENCODER_ENABLE_TEMPORAL_SCALABILITYPointer 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.
const char * OH_MD_KEY_VIDEO_ENCODER_TEMPORAL_GOP_SIZEPointer 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.
const char * OH_MD_KEY_VIDEO_ENCODER_TEMPORAL_GOP_REFERENCE_MODEPointer to the key that describes the reference mode in a temporal image group. The value type is int32_t. For details, see OH_TemporalGopReferenceMode. This key is valid only when temporal scalability is enabled.
const char * OH_MD_KEY_VIDEO_ENCODER_LTR_FRAME_COUNTPointer to the key that describes the number of long-term reference 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.
const char * OH_MD_KEY_VIDEO_ENCODER_PER_FRAME_MARK_LTRPointer to the key that describes the key that marks the current frame as a long-term reference frame. The value type is int32_t. The value 1 means that the frame is marked as a long-term reference frame, and 0 means the opposite. This key is optional and is used only for video encoding.
const char * OH_MD_KEY_VIDEO_ENCODER_PER_FRAME_USE_LTRPointer 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.
const char * OH_MD_KEY_VIDEO_PER_FRAME_IS_LTRPointer to the key that describes whether the frame corresponding to the stream output from the current OH_AVBuffer is the long-term reference frame. The value type is int32_t. The value 1 means LTR, and 0 means non-LTR. This key is optional and is used only for video encoding.
const char * OH_MD_KEY_VIDEO_PER_FRAME_POCPointer 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.
const char * OH_MD_KEY_VIDEO_CROP_TOPPointer to the key that describes the top coordinate (y) of the cropped rectangle. The value type is int32_t. This key is used only for video decoding.
const char * OH_MD_KEY_VIDEO_CROP_BOTTOMPointer to the key that describes the bottom coordinate (y) of the cropped rectangle. The value type is int32_t. This key is used only for video decoding.
const char * OH_MD_KEY_VIDEO_CROP_LEFTPointer to the key that describes the left coordinate (x) of the cropped rectangle. The value type is int32_t. This key is used only for video decoding.
const char * OH_MD_KEY_VIDEO_CROP_RIGHTPointer to the key that describes the right coordinate (x) of the cropped rectangle. The value type is int32_t. This key is used only for video decoding.
const char * OH_MD_KEY_VIDEO_STRIDEPointer to the key that describes the stride of a video frame. The value type is int32_t.
const char * OH_MD_KEY_VIDEO_SLICE_HEIGHTPointer to the key that describes the height of a video frame. The value type is int32_t.
const char * OH_MD_KEY_VIDEO_PIC_WIDTHPointer to the key that describes the width of the video frame. The value type is int32_t.
const char * OH_MD_KEY_VIDEO_PIC_HEIGHTPointer to the key that describes the height of the video frame. The value type is int32_t.
const char * OH_MD_KEY_VIDEO_ENABLE_LOW_LATENCYPointer 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.
const char * OH_MD_KEY_VIDEO_ENCODER_QP_MAXPointer to the key that describes the maximum Quantization Parameter (QP) allowed by the video encoder. The value type is int32_t.
const char * OH_MD_KEY_VIDEO_ENCODER_QP_MINPointer to the key that describes the minimum QP allowed by the video encoder. The value type is int32_t.
const char * OH_MD_KEY_VIDEO_ENCODER_QP_AVERAGEPointer to the key that describes the average QP of video frames. The value type is int32_t.
const char * OH_MD_KEY_VIDEO_ENCODER_MSEPointer to the key that describes the MSE of video frames. The value type is double.
const char * OH_MD_KEY_VIDEO_ENCODER_REPEAT_PREVIOUS_FRAME_AFTERPointer to the key that indicates 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.
const char * OH_MD_KEY_VIDEO_ENCODER_REPEAT_PREVIOUS_MAX_COUNTPointer 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.
const char * OH_MD_KEY_DECODING_TIMESTAMPPointer 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.
const char * OH_MD_KEY_BUFFER_DURATIONPointer 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.
const char * OH_MD_KEY_START_TIMEPointer 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.
const char * OH_MD_KEY_VIDEO_DECODER_OUTPUT_COLOR_SPACEPointer 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.
const char * OH_MD_KEY_VIDEO_SARPointer to the key that describes the aspect ratio of the sample. The value type is double.
const char * OH_MD_KEY_CREATION_TIMEPointer to the key that describes the media file creation time. The value type is string.
const char * OH_MD_KEY_VIDEO_DECODER_OUTPUT_ENABLE_VRRPointer to the key that specifies whether the decoder enables the video variable frame rate feature. The value type is int32_t.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙AVCodec Kit

harmony 鸿蒙AVCapability

harmony 鸿蒙AVDemuxer

harmony 鸿蒙AVMuxer

harmony 鸿蒙AVSource

harmony 鸿蒙AudioCodec

harmony 鸿蒙AudioDecoder

harmony 鸿蒙AudioEncoder

harmony 鸿蒙CodecBase

harmony 鸿蒙Core

  • 所属分类: 后端技术
  • 本文标签: 软件 鸿蒙
  • 版权声明: 本文链接 https://seaxiang.com/blog/JyOEl5