From a2c9650289194836d2dda1aff0314e0d5b2aa2bf Mon Sep 17 00:00:00 2001 From: yangxiaoyu Date: Mon, 1 Apr 2024 07:56:15 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=E6=96=B0=E5=A2=9EAVCodec=20kit=205.0?= =?UTF-8?q?=E8=83=BD=E5=8A=9B=E6=9F=A5=E8=AF=A2=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yangxiaoyu --- multimedia/av_codec/native_avcapability.h | 35 +++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/multimedia/av_codec/native_avcapability.h b/multimedia/av_codec/native_avcapability.h index 043678aab..a635d0583 100644 --- a/multimedia/av_codec/native_avcapability.h +++ b/multimedia/av_codec/native_avcapability.h @@ -59,6 +59,20 @@ typedef enum OH_AVCodecCategory { SOFTWARE } OH_AVCodecCategory; +/** + * @brief The enum of optional features that can be used in specific codec seenarios. + * @syscap SystemCapability.Multimedia.Media.CodecBase + * @since 12 + */ +typedef enum OH_AVCapabilityFeature { + /** Feature for codec supports temporal scalability. It is only used in video encoder. */ + VIDEO_ENCODER_TEMPORAL_SCALABILITY = 0, + /** Feature for codec supports long-term reference. It is only used in video encoder. */ + VIDEO_ENCODER_LONG_TERM_REFERENCE = 1, + /** Feature for codec supports low latency. It is used in video encoder and video decoder. */ + VIDEO_LOW_LATENCY = 2, +} OH_AVCapabilityFeature; + /** * @brief Get a system-recommended codec's capability. * @syscap SystemCapability.Multimedia.Media.CodecBase @@ -350,6 +364,27 @@ OH_AVErrCode OH_AVCapability_GetSupportedLevelsForProfile(OH_AVCapability *capab */ bool OH_AVCapability_AreProfileAndLevelSupported(OH_AVCapability *capability, int32_t profile, int32_t level); +/** + * @brief Check if the codec supports the specified feature. + * @syscap SystemCapability.Multimedia.Media.CodecBase + * @param capability Codec capability pointer + * @param feature Feature enum, refer to {@link OH_AVCapabilityFeature} for details + * @return Returns true if the feature is supported, false if it is not supported + * @since 12 + */ +bool OH_AVCapability_IsFeatureSupported(OH_AVCapability *capability, OH_AVCapabilityFeature feature); + +/** + * @brief Get the properties of the specified feature. It should be noted that the life cycle of the OH_AVFormat + * instance pointed to by the return value * needs to be manually released by the caller. + * @syscap SystemCapability.Multimedia.Media.CodecBase + * @param capability Codec capability pointer + * @param feature Feature enum, refer to {@link OH_AVCapabilityFeature} for details + * @return Returns a pointer to an OH_AVFormat instance + * @since 12 + */ +OH_AVFormat *OH_AVCapability_GetFeatureProperties(OH_AVCapability *capability, OH_AVCapabilityFeature feature); + #ifdef __cplusplus } #endif -- Gitee From 46550428ba3dcbc59fdaf9ae95f3bd6e665616b7 Mon Sep 17 00:00:00 2001 From: yangxiaoyu Date: Tue, 2 Apr 2024 01:13:12 +0000 Subject: [PATCH 2/2] =?UTF-8?q?json=E6=96=87=E4=BB=B6=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yangxiaoyu --- .../codec_base/libnative_media_codecbase.ndk.json | 8 ++++++++ 1 file changed, 8 insertions(+) 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 54a2ea40b..747c34aa2 100644 --- a/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json +++ b/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json @@ -409,5 +409,13 @@ { "first_introduced": "10", "name": "OH_AVCapability_AreProfileAndLevelSupported" + }, + { + "first_introduced": "12", + "name": "OH_AVCapability_IsFeatureSupported" + }, + { + "first_introduced": "12", + "name": "OH_AVCapability_GetFeatureProperties" } ] -- Gitee