From 79e0ae9c2b1d0635b6f841f50d978b7766c75db4 Mon Sep 17 00:00:00 2001 From: zhouxubo Date: Thu, 12 Jun 2025 14:32:52 +0800 Subject: [PATCH 1/4] add IsSupported interface Signed-off-by: zhouxubo --- framework/algorithm/common/algorithm_video.cpp | 5 +++++ interfaces/inner_api/algorithm_video.h | 10 ++++++++++ interfaces/inner_api/algorithm_video_common.h | 12 ++++++++++++ 3 files changed, 27 insertions(+) diff --git a/framework/algorithm/common/algorithm_video.cpp b/framework/algorithm/common/algorithm_video.cpp index 5671a62..7a8422f 100644 --- a/framework/algorithm/common/algorithm_video.cpp +++ b/framework/algorithm/common/algorithm_video.cpp @@ -63,6 +63,11 @@ bool VpeVideo::IsSupported(uint32_t type, const Format& parameter) return it->second(parameter); } +bool DetailEnhancerVideoFwk::IsSupported(void) +{ + return true; +} + VPEAlgoErrCode VpeVideo::RegisterCallback([[maybe_unused]] const std::shared_ptr& callback) { return VPE_ALGO_ERR_OK; diff --git a/interfaces/inner_api/algorithm_video.h b/interfaces/inner_api/algorithm_video.h index 046c7e5..0a52d35 100644 --- a/interfaces/inner_api/algorithm_video.h +++ b/interfaces/inner_api/algorithm_video.h @@ -50,6 +50,16 @@ public: */ static bool IsSupported(uint32_t type, const Format& parameter); + /** + * @brief Query whether the product is supported. + * @param type Use VIDEO_TYPE_XXX to specify the processing type. For details, see {@link VpeVideoType}. + * @param parameter The parameter of video processing. + * @return true if the product is supported. false If the product is unsupported. + * @since 5.1 + * @version 5.1 + */ + static bool IsSupported(void); + /** * @brief Register callback object. * @param callback Callback object to be registered. For details, see {@link VpeVideoCallback}. diff --git a/interfaces/inner_api/algorithm_video_common.h b/interfaces/inner_api/algorithm_video_common.h index 8be7557..e0d2da9 100644 --- a/interfaces/inner_api/algorithm_video_common.h +++ b/interfaces/inner_api/algorithm_video_common.h @@ -240,6 +240,18 @@ public: */ static constexpr std::string_view DETAIL_ENHANCER_AUTO_DOWNSHIFT{"AutoDownshift"}; + /** + * @brief The key is used to identifies surface nodeId + * enhancement or not. Default value is true. + * + * Use {@link VpeVideo::SetParameter} and {@link Format::SetLongValue} to set whether automatic downshift or not. + * Use {@link VpeVideo::GetParameter} and {@link Format::GetLongValue} to get whether automatic downshift or not. + * + * @since 5.1 + * @version 5.1 + */ + static constexpr std::string_view DETAIL_ENHANCER_NODE_ID{"NodeId"}; + private: ParameterKey() = delete; ~ParameterKey() = delete; -- Gitee From 43b14bb2969546fe5c5b57703e9dc210ecf0368c Mon Sep 17 00:00:00 2001 From: zhouxubo Date: Thu, 12 Jun 2025 15:22:18 +0800 Subject: [PATCH 2/4] add IsSupported interface Signed-off-by: zhouxubo --- framework/algorithm/common/algorithm_video.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/algorithm/common/algorithm_video.cpp b/framework/algorithm/common/algorithm_video.cpp index 7a8422f..26ac275 100644 --- a/framework/algorithm/common/algorithm_video.cpp +++ b/framework/algorithm/common/algorithm_video.cpp @@ -63,7 +63,7 @@ bool VpeVideo::IsSupported(uint32_t type, const Format& parameter) return it->second(parameter); } -bool DetailEnhancerVideoFwk::IsSupported(void) +bool VpeVideo::IsSupported(void) { return true; } -- Gitee From 5d8e71bc22953770fa77d880b677e0c75d8161f0 Mon Sep 17 00:00:00 2001 From: zhouxubo Date: Thu, 12 Jun 2025 19:33:12 +0800 Subject: [PATCH 3/4] add IsSupported interface Signed-off-by: zhouxubo --- interfaces/inner_api/algorithm_video.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/interfaces/inner_api/algorithm_video.h b/interfaces/inner_api/algorithm_video.h index 0a52d35..b560b09 100644 --- a/interfaces/inner_api/algorithm_video.h +++ b/interfaces/inner_api/algorithm_video.h @@ -55,8 +55,7 @@ public: * @param type Use VIDEO_TYPE_XXX to specify the processing type. For details, see {@link VpeVideoType}. * @param parameter The parameter of video processing. * @return true if the product is supported. false If the product is unsupported. - * @since 5.1 - * @version 5.1 + * @since 6.0 */ static bool IsSupported(void); -- Gitee From 239a2aa0e23c6db3e4a7071b0a8962bf8a189132 Mon Sep 17 00:00:00 2001 From: zhouxubo Date: Thu, 12 Jun 2025 19:44:53 +0800 Subject: [PATCH 4/4] add IsSupported interface Signed-off-by: zhouxubo --- interfaces/inner_api/algorithm_video.h | 2 -- interfaces/inner_api/algorithm_video_common.h | 8 +++----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/interfaces/inner_api/algorithm_video.h b/interfaces/inner_api/algorithm_video.h index b560b09..9eac54c 100644 --- a/interfaces/inner_api/algorithm_video.h +++ b/interfaces/inner_api/algorithm_video.h @@ -52,8 +52,6 @@ public: /** * @brief Query whether the product is supported. - * @param type Use VIDEO_TYPE_XXX to specify the processing type. For details, see {@link VpeVideoType}. - * @param parameter The parameter of video processing. * @return true if the product is supported. false If the product is unsupported. * @since 6.0 */ diff --git a/interfaces/inner_api/algorithm_video_common.h b/interfaces/inner_api/algorithm_video_common.h index e0d2da9..96c3f97 100644 --- a/interfaces/inner_api/algorithm_video_common.h +++ b/interfaces/inner_api/algorithm_video_common.h @@ -242,13 +242,11 @@ public: /** * @brief The key is used to identifies surface nodeId - * enhancement or not. Default value is true. * - * Use {@link VpeVideo::SetParameter} and {@link Format::SetLongValue} to set whether automatic downshift or not. - * Use {@link VpeVideo::GetParameter} and {@link Format::GetLongValue} to get whether automatic downshift or not. + * Use {@link VpeVideo::SetParameter} and {@link Format::SetLongValue} to set the client surface nodeId. + * Use {@link VpeVideo::GetParameter} and {@link Format::GetLongValue} to get the client surface nodeId. * - * @since 5.1 - * @version 5.1 + * @since 6.0 */ static constexpr std::string_view DETAIL_ENHANCER_NODE_ID{"NodeId"}; -- Gitee