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 186a6ed286a0d8637904c846702ef2fdf4c0d4e2..56ac1ed5f9739edb7dd1118d38d01d91978edb11 100644 --- a/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json +++ b/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json @@ -71,6 +71,14 @@ "first_introduced": "12", "name": "OH_AVCODEC_MIMETYPE_SUBTITLE_SRT" }, + { + "first_introduced": "12", + "name": "OH_AVCODEC_MIMETYPE_SUBTITLE_WEBVTT" + }, + { + "first_introduced": "12", + "name": "OH_AVCODEC_MIMETYPE_VIDEO_VVC" + }, { "first_introduced": "9", "name": "OH_ED_KEY_TIME_STAMP" @@ -485,5 +493,9 @@ { "first_introduced": "12", "name": "OH_AVCapability_GetFeatureProperties" + }, + { + "first_introduced": "12", + "name": "OH_MD_KEY_VIDEO_DECODER_OUTPUT_COLOR_SPACE" } ] diff --git a/multimedia/av_codec/native_avcodec_base.h b/multimedia/av_codec/native_avcodec_base.h index c3c5da64b561738d9e1ae224d913887d278ff7f7..eaa8358707cbb6c00e7c6e9c191bd9dcadaea2bf 100644 --- a/multimedia/av_codec/native_avcodec_base.h +++ b/multimedia/av_codec/native_avcodec_base.h @@ -253,6 +253,22 @@ extern const char *OH_AVCODEC_MIMETYPE_AUDIO_APE; */ extern const char *OH_AVCODEC_MIMETYPE_SUBTITLE_SRT; +/** + * @brief Enumerates the mime type of subtitle webvtt. + * + * @syscap SystemCapability.Multimedia.Media.CodecBase + * @since 12 + */ +extern const char *OH_AVCODEC_MIMETYPE_SUBTITLE_WEBVTT; + +/** + * @brief Enumerates the MIME type of versatile video coding. + * + * @syscap SystemCapability.Multimedia.Media.CodecBase + * @since 12 + */ +extern const char *OH_AVCODEC_MIMETYPE_VIDEO_VVC; + /** * @brief The extra data's key of surface Buffer * @syscap SystemCapability.Multimedia.Media.CodecBase @@ -611,6 +627,22 @@ extern const char *OH_MD_KEY_VIDEO_SAR; * @since 12 */ extern const char *OH_MD_KEY_START_TIME; +/** + * @brief Key for setting the output color space of video decoder. The value type is int32_t. + * The supported value is {@link OH_COLORSPACE_BT709_LIMIT}, see {@link OH_NativeBuffer_ColorSpace}. It is used in + * {@link OH_VideoDecoder_Configure}. If the color space conversion capability is supported and this key is configured, + * the video decoder will automatically transcode an HDR Vivid video to an SDR video with color space BT709. + * If the value of this key is not configured as {@link OH_COLORSPACE_BT709_LIMIT}, {@link OH_VideoDecoder_Configure} + * returns @{link AV_ERR_INVALID_VAL}. + * If color space conversion capability is not supported, {@link OH_VideoDecoder_Configure} returns + * {@link AV_ERR_INVALID_VAL}. + * If the input video is not an HDR vivid video, an error {@link AV_ERR_UNSUPPORT} will be reported by callback + * function {@link OH_AVCodecOnError}. + * + * @syscap SystemCapability.Multimedia.Media.CodecBase + * @since 12 + */ +extern const char *OH_MD_KEY_VIDEO_DECODER_OUTPUT_COLOR_SPACE; /** * @brief Media type. @@ -623,6 +655,10 @@ typedef enum OH_MediaType { MEDIA_TYPE_AUD = 0, /* track is video. */ MEDIA_TYPE_VID = 1, + /** track is subtitle. + * @since 12 + */ + MEDIA_TYPE_SUBTITLE = 2, } OH_MediaType; /**