diff --git a/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json b/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json index 5ddaeb1a055c8b06d784f37a3e25372e15ac9c38..ea40022d5bb8066cc13fd8f3a0dc428bbeda424e 100644 --- a/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json +++ b/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json @@ -75,6 +75,18 @@ "first_introduced": "12", "name": "OH_AVCODEC_MIMETYPE_SUBTITLE_WEBVTT" }, + { + "first_introduced": "16", + "name": "OH_AVCODEC_MIMETYPE_VIDEO_MPEG2" + }, + { + "first_introduced": "16", + "name": "OH_AVCODEC_MIMETYPE_VIDEO_MPEG4_PART2" + }, + { + "first_introduced": "16", + "name": "OH_AVCODEC_MIMETYPE_VIDEO_H263" + }, { "first_introduced": "9", "name": "OH_ED_KEY_TIME_STAMP" @@ -399,6 +411,14 @@ "first_introduced": "14", "name": "OH_MD_KEY_CREATION_TIME" }, + { + "first_introduced": "16", + "name": "OH_MD_KEY_VIDEO_ENCODER_REPEAT_PREVIOUS_FRAME_AFTER" + }, + { + "first_introduced": "16", + "name": "OH_MD_KEY_VIDEO_ENCODER_REPEAT_PREVIOUS_MAX_COUNT" + }, { "first_introduced": "10", "name": "OH_AVCodec_GetCapability" diff --git a/multimedia/av_codec/native_avcodec_base.h b/multimedia/av_codec/native_avcodec_base.h index 07e356e9db679390967e90d1b580903779695385..27ec11e2c9e84532a9407c14bba4a815fcc590b8 100644 --- a/multimedia/av_codec/native_avcodec_base.h +++ b/multimedia/av_codec/native_avcodec_base.h @@ -354,6 +354,27 @@ extern const char *OH_AVCODEC_MIMETYPE_SUBTITLE_SRT; * @since 12 */ extern const char *OH_AVCODEC_MIMETYPE_SUBTITLE_WEBVTT; +/** + * @brief Enumerates the MIME type of video mpeg2 codec. + * + * @syscap SystemCapability.Multimedia.Media.CodecBase + * @since 16 + */ +extern const char *OH_AVCODEC_MIMETYPE_VIDEO_MPEG2; +/** + * @brief Enumerates the MIME type of video mpeg4 part2 codec. + * + * @syscap SystemCapability.Multimedia.Media.CodecBase + * @since 16 + */ +extern const char *OH_AVCODEC_MIMETYPE_VIDEO_MPEG4_PART2; +/** + * @brief Enumerates the MIME type of video h263 codec. + * + * @syscap SystemCapability.Multimedia.Media.CodecBase + * @since 16 + */ +extern const char *OH_AVCODEC_MIMETYPE_VIDEO_H263; /** * @brief Key for timeStamp in surface's extraData, value type is int64_t. @@ -976,6 +997,24 @@ extern const char *OH_MD_KEY_VIDEO_DECODER_OUTPUT_COLOR_SPACE; * @since 14 */ extern const char *OH_MD_KEY_VIDEO_DECODER_OUTPUT_ENABLE_VRR; +/** + * @brief Key applies only when configuring a video encoder in surface mode, value type is int32_t. + * If no new frame became available since the last frame submitted to the encoder, + * it will sumbit the previous frame repeatly in milliseconds. It is used in configure. + * + * @syscap SystemCapability.Multimedia.Media.CodecBase + * @since 16 + */ +extern const char *OH_MD_KEY_VIDEO_ENCODER_REPEAT_PREVIOUS_FRAME_AFTER; +/** + * @brief Key for describing the maximum count that the frame previously submitted to the encoder will be + * repeated, in case no new frame has been available since, value type is int32_t. This key takes effect only when + * {@link VIDEO_ENCODER_REPEAT_PREVIOUS_FRAME_AFTER} is vaild. It is used in configure. + * + * @syscap SystemCapability.Multimedia.Media.CodecBase + * @since 16 + */ +extern const char *OH_MD_KEY_VIDEO_ENCODER_REPEAT_PREVIOUS_MAX_COUNT; /** * @brief Key for creation timestamp of a media file, value type is string. @@ -1093,6 +1132,79 @@ typedef enum OH_VVCProfile { VVC_PROFILE_MAIN_16_444_STILL = 100, } OH_VVCProfile; +/** + * @brief MPEG2 Profile + * + * @syscap SystemCapability.Multimedia.Media.CodecBase + * @since 16 + */ +typedef enum OH_MPEG2Profile { + /** Simple profile */ + MPEG2_PROFILE_SIMPLE = 0, + /** Main profile */ + MPEG2_PROFILE_MAIN = 1, + /** SNR scalable profile */ + MPEG2_PROFILE_SNR_SCALABLE = 2, + /** Spatially scalable profile */ + MPEG2_PROFILE_SPATIALLY_SCALABLE = 3, + /** High profile */ + MPEG2_PROFILE_HIGH = 4, + /** 4:2:2 profile */ + MPEG2_PROFILE_422 = 5, +} OH_MPEG2Profile; + +/** + * @brief MPEG4 Profile + * + * @syscap SystemCapability.Multimedia.Media.CodecBase + * @since 16 + */ +typedef enum OH_MPEG4Profile { + /** Simple profile */ + MPEG4_PROFILE_SIMPLE = 0, + /** Simple scalable profile */ + MPEG4_PROFILE_SIMPLE_SCALABLE = 1, + /** Core profile */ + MPEG4_PROFILE_CORE = 2, + /** Main profile */ + MPEG4_PROFILE_MAIN = 3, + /** N-Bit profile */ + MPEG4_PROFILE_N_BIT = 4, + /** Hybrid profile */ + MPEG4_PROFILE_HYBRID = 5, + /** Basic animated texture profile */ + MPEG4_PROFILE_BASIC_ANIMATED_TEXTURE = 6, + /** Scalable texture profile */ + MPEG4_PROFILE_SCALABLE_TEXTURE = 7, + /** Simple FA profile */ + MPEG4_PROFILE_SIMPLE_FA = 8, + /** Advanced real time simple profile */ + MPEG4_PROFILE_ADVANCED_REAL_TIME_SIMPLE = 9, + /** Core scalable profile */ + MPEG4_PROFILE_CORE_SCALABLE = 10, + /** Advanced coding efficiency profile */ + MPEG4_PROFILE_ADVANCED_CODING_EFFICIENCY = 11, + /** Advanced core profile */ + MPEG4_PROFILE_ADVANCED_CORE = 12, + /** Advanced scalable texture profile */ + MPEG4_PROFILE_ADVANCED_SCALABLE_TEXTURE = 13, + /** Advanced simple profile */ + MPEG4_PROFILE_ADVANCED_SIMPLE = 17, +} OH_MPEG4Profile; + +/** + * @brief H263 Profile + * + * @syscap SystemCapability.Multimedia.Media.CodecBase + * @since 16 + */ +typedef enum OH_H263Profile { + /** Baseline profile */ + H263_PROFILE_BASELINE = 0, + /** Version 1 backward compatibility profile */ + H263_PROFILE_VERSION_1_BACKWARD_COMPATIBILITY = 2, +} OH_H263Profile; + /** * @brief Enumerates the muxer output file format * @@ -1336,6 +1448,77 @@ typedef enum OH_VVCLevel { VVC_LEVEL_155 = 255, } OH_VVCLevel; +/** + * @brief MPEG2 Level. + * + * @syscap SystemCapability.Multimedia.Media.CodecBase + * @since 16 + */ +typedef enum OH_MPEG2Level { + /** Low level */ + MPEG2_LEVEL_LOW = 0, + /** Main level */ + MPEG2_LEVEL_MAIN = 1, + /** High 1440 level */ + MPEG2_LEVEL_HIGH_1440 = 2, + /** High level */ + MPEG2_LEVEL_HIGH = 3, +} OH_MPEG2Level; + +/** + * @brief MPEG4 Level. + * + * @syscap SystemCapability.Multimedia.Media.CodecBase + * @since 16 + */ +typedef enum OH_MPEG4Level { + /** 0 level */ + MPEG4_LEVEL_0 = 0, + /** 0B level */ + MPEG4_LEVEL_0B = 1, + /** 1 level */ + MPEG4_LEVEL_1 = 2, + /** 2 level */ + MPEG4_LEVEL_2 = 3, + /** 3 level */ + MPEG4_LEVEL_3 = 4, + /** 3B level */ + MPEG4_LEVEL_3B = 5, + /** 4 level */ + MPEG4_LEVEL_4 = 6, + /** 4A level */ + MPEG4_LEVEL_4A = 7, + /** 5 level */ + MPEG4_LEVEL_5 = 8, + /** 6 level */ + MPEG4_LEVEL_6 = 9, +} OH_MPEG4Level; + +/** + * @brief H263 Level. + * + * @syscap SystemCapability.Multimedia.Media.CodecBase + * @since 16 + */ +typedef enum OH_H263Level { + /** 10 level */ + H263_LEVEL_10 = 0, + /** 20 level */ + H263_LEVEL_20 = 1, + /** 30 level */ + H263_LEVEL_30 = 2, + /** 40 level */ + H263_LEVEL_40 = 3, + /** 45 level */ + H263_LEVEL_45 = 4, + /** 50 level */ + H263_LEVEL_50 = 5, + /** 60 level */ + H263_LEVEL_60 = 6, + /** 70 level */ + H263_LEVEL_70 = 7, +} OH_H263Level; + /** * @brief The reference mode in temporal group of picture. *