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 88f1b9951aeea1dfd58e47a3eb37f6229c0a283b..05bad3eaca8888882ef13536a6aca7f10691b15f 100644 --- a/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json +++ b/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json @@ -267,6 +267,10 @@ "first_introduced": "11", "name": "OH_MD_KEY_AUDIO_VIVID_METADATA" }, + { + "first_introduced": "12", + "name": "OH_FEATURE_PROPERTY_KEY_VIDEO_ENCODER_MAX_LTR_FRAME_COUNT" + }, { "first_introduced": "12", "name": "OH_MD_KEY_VIDEO_ENCODER_ENABLE_TEMPORAL_SCALABILITY" @@ -279,6 +283,26 @@ "first_introduced": "12", "name": "OH_MD_KEY_VIDEO_ENCODER_TEMPORAL_GOP_REFERENCE_MODE" }, + { + "first_introduced": "12", + "name": "OH_MD_KEY_VIDEO_ENCODER_LTR_FRAME_COUNT" + }, + { + "first_introduced": "12", + "name": "OH_MD_KEY_VIDEO_ENCODER_PER_FRAME_MARK_LTR" + }, + { + "first_introduced": "12", + "name": "OH_MD_KEY_VIDEO_ENCODER_PER_FRAME_USE_LTR" + }, + { + "first_introduced": "12", + "name": "OH_MD_KEY_VIDEO_PER_FRAME_IS_LTR" + }, + { + "first_introduced": "12", + "name": "OH_MD_KEY_VIDEO_PER_FRAME_POC" + }, { "first_introduced": "12", "name": "OH_MD_KEY_VIDEO_CROP_TOP" diff --git a/multimedia/av_codec/native_avcodec_base.h b/multimedia/av_codec/native_avcodec_base.h index ad4822ea0adc44e798701a0d0f9a70f9366c79d0..d16617a7842a10a0a8536982adbda651bf95c96d 100644 --- a/multimedia/av_codec/native_avcodec_base.h +++ b/multimedia/av_codec/native_avcodec_base.h @@ -361,6 +361,15 @@ extern const char *OH_MD_KEY_AUDIO_OBJECT_NUMBER; /* Key for meta data of audio vivid. value type is a uint8_t pointer */ extern const char *OH_MD_KEY_AUDIO_VIVID_METADATA; +/** + * @brief Key for querying the maximum long-term reference count of video encoder, value type is int32_t. + * You should query the count through interface {@link OH_AVCapability_GetFeatureProperties} + * with enum {@link VIDEO_ENCODER_LONG_TERM_REFERENCE}. + * + * @syscap SystemCapability.Multimedia.Media.CodecBase + * @since 12 + */ +extern const char *OH_FEATURE_PROPERTY_KEY_VIDEO_ENCODER_MAX_LTR_FRAME_COUNT; /** * @brief Key for enable the temporal scalability mode, value type is int32_t (0 or 1): 1 is enabled, 0 otherwise. * The default value is 0. To query supported, you should use the interface {@link OH_AVCapability_IsFeatureSupported} @@ -388,6 +397,50 @@ extern const char *OH_MD_KEY_VIDEO_ENCODER_TEMPORAL_GOP_SIZE; * @since 12 */ extern const char *OH_MD_KEY_VIDEO_ENCODER_TEMPORAL_GOP_REFERENCE_MODE; +/** + * @brief Key for describing the count of used long-term reference frames, value type is int32_t, must be within the + * supported range. To get supported range, you should query wthether the capability is supported through the interface + * {@link OH_AVCapability_GetFeatureProperties} with enum {@link VIDEO_ENCODER_LONG_TERM_REFERENCE}, otherwise, not set + * the key. This is an optional key that applies only to video encoder. It is used in configure. + * + * @syscap SystemCapability.Multimedia.Media.CodecBase + * @since 12 + */ +extern const char *OH_MD_KEY_VIDEO_ENCODER_LTR_FRAME_COUNT; +/** + * @brief Key for describing mark this frame as a long term reference frame, value type is int32_t (0 or 1): 1 is mark, + * 0 otherwise. It takes effect only when the number of used long term reference frames is configured. This is an + * optional key that applies only to video encoder input loop. It takes effect immediately. + * + * @syscap SystemCapability.Multimedia.Media.CodecBase + * @since 12 + */ +extern const char *OH_MD_KEY_VIDEO_ENCODER_PER_FRAME_MARK_LTR; +/** + * @brief Key for describing the long term reference frame poc referenced by this frame, value type is int32_t. This is + * an optional key that applies only to video encoder input loop. It takes effect immediately. + * + * @syscap SystemCapability.Multimedia.Media.CodecBase + * @since 12 + */ +extern const char *OH_MD_KEY_VIDEO_ENCODER_PER_FRAME_USE_LTR; +/** + * @brief Key for indicating this frame is a long-term reference frame, value type is int32_t (0 or 1): 1 is LTR, + * 0 otherwise. This is an optional key that applies only to video encoder output loop. + * It indicates the attribute of the frame. + * + * @syscap SystemCapability.Multimedia.Media.CodecBase + * @since 12 + */ +extern const char *OH_MD_KEY_VIDEO_PER_FRAME_IS_LTR; +/** + * @brief Key for describing the frame poc, value type is int32_t. This is an optional key that applies only to video + * encoder output loop. It indicates the attribute of the frame. + * + * @syscap SystemCapability.Multimedia.Media.CodecBase + * @since 12 + */ +extern const char *OH_MD_KEY_VIDEO_PER_FRAME_POC; /** * @brief Key for describing the top-coordinate (y) of the crop rectangle, value type is int32_t. This is the top-most * row included in the crop frame, where row indices start at 0. diff --git a/multimedia/media_foundation/native_averrors.h b/multimedia/media_foundation/native_averrors.h index fe02f4aeeaa604db25429623e85dd8bbcc44a3a7..eb2ad2039021e031e55870fe3e6062f940750e2a 100644 --- a/multimedia/media_foundation/native_averrors.h +++ b/multimedia/media_foundation/native_averrors.h @@ -70,6 +70,14 @@ typedef enum OH_AVErrCode { * extend err start. */ AV_ERR_EXTEND_START = 100, + /** drm error base. + * @since 12 + */ + AV_ERR_DRM_BASE = 200, + /** drm decypt failed. + * @since 12 + */ + AV_ERR_DRM_DECRYPT_FAILED = 201, } OH_AVErrCode; #ifdef __cplusplus