From 44cef1c790bd9ec0570743a0ce4021d2eab5e04a Mon Sep 17 00:00:00 2001 From: yj Date: Tue, 15 Jul 2025 21:49:34 +0800 Subject: [PATCH] add blank key Signed-off-by: yj --- .../codec_base/libnative_media_codecbase.ndk.json | 4 ++++ multimedia/av_codec/native_avcodec_base.h | 14 ++++++++++++++ 2 files changed, 18 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 327025a6a..04236f7d5 100644 --- a/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json +++ b/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json @@ -467,6 +467,10 @@ "first_introduced": "20", "name": "OH_MD_KEY_VIDEO_ENCODER_MAX_B_FRAMES" }, + { + "first_introduced": "20", + "name": "OH_MD_KEY_VIDEO_DECODER_BLANK_FRAME_ON_SHUTDOWN" + }, { "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 c8ce6b263..222155a1c 100644 --- a/multimedia/av_codec/native_avcodec_base.h +++ b/multimedia/av_codec/native_avcodec_base.h @@ -1178,6 +1178,20 @@ extern const char *OH_MD_KEY_VIDEO_ENCODER_ENABLE_PTS_BASED_RATECONTROL; */ extern const char *OH_MD_KEY_ENABLE_SYNC_MODE; +/** + * @brief Key for specifying whether to output a blank frame during video decoder shutdown, + * value type is int32_t (0 or 1): 1 is enabled, 0 otherwise. + * + * This is an optional key, only used when configuring a video decoder in surface mode.\n + * By default, this feature is disabled (0).\n + * When enabled, the video decoder will output a blank frame (typically black) + * when stop or release to ensure a smooth transition to no-signal state on display devices.\n + * This prevents display retention or flickering caused by abrupt termination.\n + * + * @since 20 + */ +extern const char *OH_MD_KEY_VIDEO_DECODER_BLANK_FRAME_ON_SHUTDOWN; + /** * @brief Media type. * -- Gitee