diff --git a/common/include/dscreen_constants.h b/common/include/dscreen_constants.h index 101c26a197c4f54e0fe8c582b750c9eb692484f5..12a128c9d11e0c2b3166af29679b53b6f91f12ef 100644 --- a/common/include/dscreen_constants.h +++ b/common/include/dscreen_constants.h @@ -160,6 +160,8 @@ const std::string KEY_VIDEO_HEIGHT = "videoHeight"; const std::string KEY_COLOR_FORMAT = "colorFormat"; const std::string KEY_FPS = "fps"; const std::string KEY_CODECTYPE = "codecType"; +const std::string KEY_HISTREAMER_VIDEO_ENCODER = "histmVidEnc"; +const std::string KEY_HISTREAMER_VIDEO_DECODER = "histmVidDec"; const std::string SCREEN_CLIENT_WINDOW = "screenClientWindow"; const std::string KEY_DEV_ID = "devId"; const std::string KEY_DH_ID = "dhId"; diff --git a/screenhandler/BUILD.gn b/screenhandler/BUILD.gn index 6bb6aa36ae5b9d733120333a9cef0708a41ef6ab..11d1b083f33020865594a1adf4e42300f7ec41fc 100644 --- a/screenhandler/BUILD.gn +++ b/screenhandler/BUILD.gn @@ -20,6 +20,7 @@ ohos_shared_library("distributed_screen_handler") { include_dirs = [ "//third_party/json/include", "${fwk_common_path}/utils/include", + "${fwk_utils_path}/include", ] include_dirs += [ @@ -39,6 +40,7 @@ ohos_shared_library("distributed_screen_handler") { external_deps = [ "c_utils:utils", + "distributed_hardware_fwk:distributedhardwareutils", "graphic_standard:surface", "ipc:ipc_core", "player_framework:media_client", diff --git a/screenhandler/src/dscreen_handler.cpp b/screenhandler/src/dscreen_handler.cpp index 86dc4eb545dcc218e89a2d866ff93ead4a563e7d..349f7221b7bd725d0f7350ed5d4201b5f9d6a62b 100644 --- a/screenhandler/src/dscreen_handler.cpp +++ b/screenhandler/src/dscreen_handler.cpp @@ -19,6 +19,7 @@ #include "avcodec_list.h" #include "nlohmann/json.hpp" #include "screen.h" +#include "histreamer_query_tool.h" #include "dscreen_constants.h" #include "dscreen_errcode.h" @@ -130,6 +131,14 @@ std::vector DScreenHandler::Query() attrJson[KEY_SCREEN_WIDTH] = screenWidth; attrJson[KEY_SCREEN_HEIGHT] = screenHeight; attrJson[KEY_CODECTYPE] = QueryCodecInfo(); + std::string videoEncoders = + HiStreamerQueryTool::GetInstance().QueryHiStreamerPluginInfo(HISTREAM_PLUGIN_TYPE::VIDEO_ENCODER); + DHLOGI("DScreen QueryVideoEncoderAbility info: %s", videoEncoders.c_str()); + attrJson[KEY_HISTREAMER_VIDEO_ENCODER] = videoEncoders; + std::string videoDecoders = + HiStreamerQueryTool::GetInstance().QueryHiStreamerPluginInfo(HISTREAM_PLUGIN_TYPE::VIDEO_DECODER); + DHLOGI("DScreen QueryVideoDecoderAbility info: %s", videoDecoders.c_str()); + attrJson[KEY_HISTREAMER_VIDEO_DECODER] = videoDecoders; DHItem dhItem; dhItem.dhId = dhId;