From 349702c1d89df3f0887cc56b419bb8d45c3ec593 Mon Sep 17 00:00:00 2001 From: gaoqiang_strong Date: Wed, 16 Mar 2022 09:26:12 +0800 Subject: [PATCH 01/16] fix nullptr point crash Signed-off-by: gaoqiang_strong --- .../screensourceprocessor/encoder/src/image_source_encoder.cpp | 1 + services/softbusadapter/src/softbus_adapter.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/services/screentransport/screensourceprocessor/encoder/src/image_source_encoder.cpp b/services/screentransport/screensourceprocessor/encoder/src/image_source_encoder.cpp index 229344ff..bd3c5667 100644 --- a/services/screentransport/screensourceprocessor/encoder/src/image_source_encoder.cpp +++ b/services/screentransport/screensourceprocessor/encoder/src/image_source_encoder.cpp @@ -224,6 +224,7 @@ void ImageSourceEncoder::OnOutputBufferAvailable(uint32_t index, Media::AVCodecB auto dataBuf = std::make_shared(dataSize); if (!dataBuf) { DHLOGE("%s: Create buffer failed.", LOG_TAG); + return; } int32_t ret = memcpy_s(dataBuf->Data(), dataBuf->Capacity(), videoSharedMemory_->GetBase(), dataSize); if (ret != EOK) { diff --git a/services/softbusadapter/src/softbus_adapter.cpp b/services/softbusadapter/src/softbus_adapter.cpp index 30ce06b7..540590b0 100644 --- a/services/softbusadapter/src/softbus_adapter.cpp +++ b/services/softbusadapter/src/softbus_adapter.cpp @@ -326,6 +326,7 @@ void SoftbusAdapter::OnStreamReceived(int32_t sessionId, const StreamData *data, std::shared_ptr &listener = GetSoftbusListenerByName(sessionId); if (!listener) { DHLOGE("Get softbus listener failed."); + return; } listener->OnStreamReceived(sessionId, data, ext, frameInfo); } -- Gitee From ff20155de62c1128f0435c73289e998c081a628a Mon Sep 17 00:00:00 2001 From: sxzheng96 Date: Wed, 16 Mar 2022 11:32:23 +0800 Subject: [PATCH 02/16] modify distributed screen package name Signed-off-by: sxzheng96 --- common/include/dscreen_constants.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/include/dscreen_constants.h b/common/include/dscreen_constants.h index 50c0b15d..d566c6d5 100644 --- a/common/include/dscreen_constants.h +++ b/common/include/dscreen_constants.h @@ -56,10 +56,10 @@ enum VideoFormat : uint8_t { }; /* Screen package name */ -const std::string PKG_NAME = "DBinderBus_" + std::to_string(getpid()); +const std::string PKG_NAME = "ohos.dhardware"; /* Screen data session name */ -const std::string DATA_SESSION_NAME = "DBinder.ohos.dhardware.dscreen.data"; +const std::string DATA_SESSION_NAME = "ohos.dhardware.dscreen.data"; /* Screen session name max len */ constexpr uint32_t DSCREEN_MAX_SESSION_NAME_LEN = 50; -- Gitee From 5ed15e0ead5c6dd8be33f714931f344fa0bfefc6 Mon Sep 17 00:00:00 2001 From: sxzheng96 Date: Thu, 17 Mar 2022 00:46:52 +0800 Subject: [PATCH 03/16] modify distributed screen encoder type on RK & fix crash bug Signed-off-by: sxzheng96 --- common/include/dscreen_constants.h | 4 ++ common/include/dscreen_errcode.h | 1 + screenhandler/src/dscreen_handler.cpp | 7 ++- .../include/screen_client_window_adapter.h | 2 +- services/screenservice/sourceservice/BUILD.gn | 2 + .../dscreenmgr/include/dscreen.h | 1 + .../sourceservice/dscreenmgr/src/dscreen.cpp | 55 ++++++++++++++++++- .../decoder/src/image_sink_decoder.cpp | 9 +++ .../screensinktrans/src/screen_sink_trans.cpp | 6 +- .../encoder/src/image_source_encoder.cpp | 9 +++ .../src/screen_source_trans.cpp | 6 +- 11 files changed, 93 insertions(+), 9 deletions(-) diff --git a/common/include/dscreen_constants.h b/common/include/dscreen_constants.h index d566c6d5..cce75aab 100644 --- a/common/include/dscreen_constants.h +++ b/common/include/dscreen_constants.h @@ -47,12 +47,14 @@ enum TaskType { enum CodecType : uint8_t { VIDEO_CODEC_TYPE_VIDEO_H264 = 0, VIDEO_CODEC_TYPE_VIDEO_H265 = 1, + VIDEO_CODEC_TYPE_VIDEO_MPEG4 = 2, }; enum VideoFormat : uint8_t { VIDEO_DATA_FORMAT_YUVI420 = 0, VIDEO_DATA_FORMAT_NV12 = 1, VIDEO_DATA_FORMAT_NV21 = 2, + VIDEO_DATA_FORMAT_RGBA8888 = 3, }; /* Screen package name */ @@ -112,6 +114,8 @@ const std::string KEY_ERR_CODE = "errCode"; const std::string KEY_ERR_CONTENT = "errContent"; const std::string KEY_VIDEO_PARAM = "videoParam"; const std::string KEY_MAPRELATION = "mapRelation"; +const std::string CODEC_NAME_H264 = "OMX_hisi_video_encoder_avc"; +const std::string CODEC_NAME_MPEG4 = "avenc_mpeg4"; constexpr float DEFAULT_DENSITY = 2.0; constexpr int32_t DEFAULT_SCREEN_FLAGS = 0; constexpr uint32_t DEFAULT_FPS = 30; diff --git a/common/include/dscreen_errcode.h b/common/include/dscreen_errcode.h index 7315a32b..b6d01106 100644 --- a/common/include/dscreen_errcode.h +++ b/common/include/dscreen_errcode.h @@ -52,6 +52,7 @@ enum DScreenErrorCode { ERR_DH_SCREEN_SA_INVALID_IPC_CALL = -50028, ERR_DH_SCREEN_SA_REGISTER_SCREENLISTENER_FAIL = -520029, ERR_DH_SCREEN_SA_UNREGISTER_SCREENLISTENER_FAIL = -520030, + ERR_DH_SCREEN_SA_DSCREEN_NEGOTIATE_CODEC_FAIL = -520031, // Transport component error code ERR_DH_SCREEN_TRANS_ERROR = -51000, ERR_DH_SCREEN_TRANS_TIMEOUT = -51001, diff --git a/screenhandler/src/dscreen_handler.cpp b/screenhandler/src/dscreen_handler.cpp index 1f632682..e6f4f589 100644 --- a/screenhandler/src/dscreen_handler.cpp +++ b/screenhandler/src/dscreen_handler.cpp @@ -156,11 +156,14 @@ std::string DScreenHandler::QueryCodecInfo() // query codec info std::shared_ptr codecList = Media::AVCodecListFactory::CreateAVCodecList(); std::vector> caps = codecList->GetVideoEncoderCaps(); + json codecTypeArray = json::array(); + for (const auto &cap : caps) { std::shared_ptr codecInfo = cap->GetCodecInfo(); - codecInfoStr_.append(codecInfo->GetName()); - codecInfoStr_.append(SEPERATOR); + codecTypeArray.push_back(codecInfo->GetName()); } + + codecInfoStr_ = codecTypeArray.dump(); return codecInfoStr_; } diff --git a/services/screenclient/include/screen_client_window_adapter.h b/services/screenclient/include/screen_client_window_adapter.h index 80347e60..9b68277e 100644 --- a/services/screenclient/include/screen_client_window_adapter.h +++ b/services/screenclient/include/screen_client_window_adapter.h @@ -47,7 +47,7 @@ private: std::mutex windowIdMapMutex_; }; -class ScreenClientInputEventListener : public RefBase, public MMI::IInputEventConsumer { +class ScreenClientInputEventListener : public MMI::IInputEventConsumer { public: ScreenClientInputEventListener() = default; void OnInputEvent(std::shared_ptr pointerEvent) const override; diff --git a/services/screenservice/sourceservice/BUILD.gn b/services/screenservice/sourceservice/BUILD.gn index 0fc5f388..69976d2c 100644 --- a/services/screenservice/sourceservice/BUILD.gn +++ b/services/screenservice/sourceservice/BUILD.gn @@ -23,6 +23,7 @@ ohos_shared_library("distributed_screen_source") { "//utils/system/safwk/native/include", "//foundation/graphic/standard/interfaces/innerkits/surface", "${fwk_common_path}/utils/include", + "${mediastandard_path}/interfaces/innerkits/native/media/include", ] include_dirs += [ @@ -57,6 +58,7 @@ ohos_shared_library("distributed_screen_source") { deps = [ "//utils/native/base:utils", + "${mediastandard_path}/interfaces/innerkits/native/media:media_client", "${common_path}:distributed_screen_utils", "${services_path}/screentransport/screensourcetrans:distributed_screen_sourcetrans", "//foundation/graphic/standard/rosen/modules/render_service_client:librender_service_client", diff --git a/services/screenservice/sourceservice/dscreenmgr/include/dscreen.h b/services/screenservice/sourceservice/dscreenmgr/include/dscreen.h index 961ef1e3..f00fdf05 100644 --- a/services/screenservice/sourceservice/dscreenmgr/include/dscreen.h +++ b/services/screenservice/sourceservice/dscreenmgr/include/dscreen.h @@ -97,6 +97,7 @@ private: void HandleDisable(const std::string &taskId); void HandleConnect(); void HandleDisconnect(); + int32_t NegotiateCodecType(const std::string &remoteCodecInfoStr); int32_t SetUp(); int32_t Start(); int32_t Stop(); diff --git a/services/screenservice/sourceservice/dscreenmgr/src/dscreen.cpp b/services/screenservice/sourceservice/dscreenmgr/src/dscreen.cpp index 2986ad13..ffea98cb 100644 --- a/services/screenservice/sourceservice/dscreenmgr/src/dscreen.cpp +++ b/services/screenservice/sourceservice/dscreenmgr/src/dscreen.cpp @@ -15,6 +15,9 @@ #include "dscreen.h" +#include "avcodec_info.h" +#include "avcodec_list.h" + #include "dscreen_constants.h" #include "dscreen_errcode.h" #include "dscreen_log.h" @@ -209,20 +212,68 @@ void DScreen::HandleEnable(const std::string ¶m, const std::string &taskId) videoParam_->SetScreenWidth(attrJson[KEY_SCREEN_WIDTH]); videoParam_->SetScreenHeight(attrJson[KEY_SCREEN_HEIGHT]); - videoParam_->SetVideoFormat(VIDEO_DATA_FORMAT_NV21); - videoParam_->SetCodecType(VIDEO_CODEC_TYPE_VIDEO_H264); + videoParam_->SetVideoFormat(VIDEO_DATA_FORMAT_RGBA8888); + + // negotiate codecType + int32_t ret = NegotiateCodecType(attrJson[KEY_CODECTYPE]); + if (ret != DH_SUCCESS) { + DHLOGE("negotiate codec type failed."); + dscreenCallback_->OnRegResult(shared_from_this(), taskId, ERR_DH_SCREEN_SA_ENABLE_FAILED, + "negotiate codec type failed."); + return; + } uint64_t screenId = ScreenMgrAdapter::GetInstance().CreateVirtualScreen(devId_, dhId_, videoParam_); if (screenId == SCREEN_ID_INVALID) { DHLOGE("create virtual screen failed."); dscreenCallback_->OnRegResult(shared_from_this(), taskId, ERR_DH_SCREEN_SA_ENABLE_FAILED, "create virtual screen failed."); + return; } screenId_ = screenId; SetState(ENABLED); dscreenCallback_->OnRegResult(shared_from_this(), taskId, DH_SUCCESS, ""); } +int32_t DScreen::NegotiateCodecType(const std::string &remoteCodecInfoStr) +{ + json remoteCodecArray = json::parse(remoteCodecInfoStr, nullptr, false); + if (remoteCodecArray.is_discarded() || !remoteCodecArray.is_array()) { + DHLOGE("remoteCodecInfoStrjson is invalid."); + return ERR_DH_SCREEN_SA_DSCREEN_NEGOTIATE_CODEC_FAIL; + } + + std::vector localCodecArray; + // query local support encoder type + std::shared_ptr codecList = Media::AVCodecListFactory::CreateAVCodecList(); + std::vector> caps = codecList->GetVideoEncoderCaps(); + for (const auto &cap : caps) { + std::shared_ptr codecInfo = cap->GetCodecInfo(); + localCodecArray.push_back(codecInfo->GetName()); + } + + std::vector codecTypeCandidates; + for (const auto &remoteCodecType : remoteCodecArray) { + if (std::find(localCodecArray.begin(), localCodecArray.end(), + remoteCodecType) != localCodecArray.end()) { + codecTypeCandidates.push_back(remoteCodecType); + } + } + + if (std::find(codecTypeCandidates.begin(), codecTypeCandidates.end(), + CODEC_NAME_H264) != codecTypeCandidates.end()) { + videoParam_->SetCodecType(VIDEO_CODEC_TYPE_VIDEO_H264); + } else if(std::find(codecTypeCandidates.begin(), codecTypeCandidates.end(), + CODEC_NAME_MPEG4) != codecTypeCandidates.end()) { + videoParam_->SetCodecType(VIDEO_CODEC_TYPE_VIDEO_MPEG4); + } else { + DHLOGI("codec type not support."); + return ERR_DH_SCREEN_SA_DSCREEN_NEGOTIATE_CODEC_FAIL; + } + + return DH_SUCCESS; +} + void DScreen::HandleDisable(const std::string &taskId) { DHLOGI("HandleDisable, devId: %s, dhId: %s", GetAnonyString(devId_).c_str(), GetAnonyString(dhId_).c_str()); diff --git a/services/screentransport/screensinkprocessor/decoder/src/image_sink_decoder.cpp b/services/screentransport/screensinkprocessor/decoder/src/image_sink_decoder.cpp index 93a52ab5..a210198f 100644 --- a/services/screentransport/screensinkprocessor/decoder/src/image_sink_decoder.cpp +++ b/services/screentransport/screensinkprocessor/decoder/src/image_sink_decoder.cpp @@ -119,6 +119,9 @@ int32_t ImageSinkDecoder::InitVideoDecoder(const VideoParam &configParam) case VIDEO_CODEC_TYPE_VIDEO_H265: videoDecoder_ = Media::VideoDecoderFactory::CreateByMime("video/hevc"); break; + case VIDEO_CODEC_TYPE_VIDEO_MPEG4: + videoDecoder_ = Media::VideoDecoderFactory::CreateByMime("video/mp4v-es"); + break; default: DHLOGE("%s: codecType is invalid!", LOG_TAG); videoDecoder_ = nullptr; @@ -154,6 +157,9 @@ int32_t ImageSinkDecoder::SetDecoderFormat(const VideoParam &configParam) case VIDEO_CODEC_TYPE_VIDEO_H265: imageFormat_.PutStringValue("codec_mime", "video/hevc"); break; + case VIDEO_CODEC_TYPE_VIDEO_MPEG4: + imageFormat_.PutStringValue("codec_mime", "video/mp4v-es"); + break; default: DHLOGE("The current codec type does not support decoding."); return ERR_DH_SCREEN_TRANS_ILLEGAL_OPERATION; @@ -168,6 +174,9 @@ int32_t ImageSinkDecoder::SetDecoderFormat(const VideoParam &configParam) case VIDEO_DATA_FORMAT_NV21: imageFormat_.PutIntValue("pixel_format", Media::VideoPixelFormat::NV21); break; + case VIDEO_DATA_FORMAT_RGBA8888: + imageFormat_.PutIntValue("pixel_format", Media::VideoPixelFormat::RGBA); + break; default: DHLOGE("The current pixel format does not support decoding."); return ERR_DH_SCREEN_TRANS_ILLEGAL_OPERATION; diff --git a/services/screentransport/screensinktrans/src/screen_sink_trans.cpp b/services/screentransport/screensinktrans/src/screen_sink_trans.cpp index 83b10eee..87af942c 100644 --- a/services/screentransport/screensinktrans/src/screen_sink_trans.cpp +++ b/services/screentransport/screensinktrans/src/screen_sink_trans.cpp @@ -140,14 +140,16 @@ int32_t ScreenSinkTrans::SetImageSurface(const sptr &surface) int32_t ScreenSinkTrans::CheckVideoParam(const VideoParam ¶m) { if ((param.GetCodecType() != VIDEO_CODEC_TYPE_VIDEO_H264) && - (param.GetCodecType() != VIDEO_CODEC_TYPE_VIDEO_H265)) { + (param.GetCodecType() != VIDEO_CODEC_TYPE_VIDEO_H265) && + (param.GetCodecType() != VIDEO_CODEC_TYPE_VIDEO_MPEG4)) { DHLOGE("%s: Invalid codec type.", LOG_TAG); return ERR_DH_SCREEN_TRANS_ILLEGAL_PARAM; } if ((param.GetVideoFormat() != VIDEO_DATA_FORMAT_YUVI420) && (param.GetVideoFormat() != VIDEO_DATA_FORMAT_NV12) && - (param.GetVideoFormat() != VIDEO_DATA_FORMAT_NV21)) { + (param.GetVideoFormat() != VIDEO_DATA_FORMAT_NV21) && + (param.GetVideoFormat() != VIDEO_DATA_FORMAT_RGBA8888)) { DHLOGE("%s: Invalid video data format.", LOG_TAG); return ERR_DH_SCREEN_TRANS_ILLEGAL_PARAM; } diff --git a/services/screentransport/screensourceprocessor/encoder/src/image_source_encoder.cpp b/services/screentransport/screensourceprocessor/encoder/src/image_source_encoder.cpp index 229344ff..b58a3684 100644 --- a/services/screentransport/screensourceprocessor/encoder/src/image_source_encoder.cpp +++ b/services/screentransport/screensourceprocessor/encoder/src/image_source_encoder.cpp @@ -122,6 +122,9 @@ int32_t ImageSourceEncoder::InitVideoEncoder(const VideoParam &configParam) case VIDEO_CODEC_TYPE_VIDEO_H265: videoEncoder_ = Media::VideoEncoderFactory::CreateByMime("video/hevc"); break; + case VIDEO_CODEC_TYPE_VIDEO_MPEG4: + videoEncoder_ = Media::VideoEncoderFactory::CreateByMime("video/mp4v-es"); + break; default: DHLOGE("%s: codecType is invalid!", LOG_TAG); videoEncoder_ = nullptr; @@ -157,6 +160,9 @@ int32_t ImageSourceEncoder::SetEncoderFormat(const VideoParam &configParam) case VIDEO_CODEC_TYPE_VIDEO_H265: imageFormat_.PutStringValue("codec_mime", "video/hevc"); break; + case VIDEO_CODEC_TYPE_VIDEO_MPEG4: + imageFormat_.PutStringValue("codec_mime", "video/mp4v-es"); + break; default: DHLOGE("%s: Codec type is invalid.", LOG_TAG); return ERR_DH_SCREEN_TRANS_ILLEGAL_PARAM; @@ -171,6 +177,9 @@ int32_t ImageSourceEncoder::SetEncoderFormat(const VideoParam &configParam) case VIDEO_DATA_FORMAT_NV21: imageFormat_.PutIntValue("pixel_format", Media::VideoPixelFormat::NV21); break; + case VIDEO_DATA_FORMAT_RGBA8888: + imageFormat_.PutIntValue("pixel_format", Media::VideoPixelFormat::RGBA); + break; default: DHLOGE("%s: Video format is invalid.", LOG_TAG); return ERR_DH_SCREEN_TRANS_ILLEGAL_PARAM; diff --git a/services/screentransport/screensourcetrans/src/screen_source_trans.cpp b/services/screentransport/screensourcetrans/src/screen_source_trans.cpp index 13faed9b..57dd1924 100644 --- a/services/screentransport/screensourcetrans/src/screen_source_trans.cpp +++ b/services/screentransport/screensourcetrans/src/screen_source_trans.cpp @@ -152,14 +152,16 @@ sptr &ScreenSourceTrans::GetImageSurface() int32_t ScreenSourceTrans::CheckVideoParam(const VideoParam ¶m) { if ((param.GetCodecType() != VIDEO_CODEC_TYPE_VIDEO_H264) && - (param.GetCodecType() != VIDEO_CODEC_TYPE_VIDEO_H265)) { + (param.GetCodecType() != VIDEO_CODEC_TYPE_VIDEO_H265) && + (param.GetCodecType() != VIDEO_CODEC_TYPE_VIDEO_MPEG4)) { DHLOGE("%s: Invalid codec type.", LOG_TAG); return ERR_DH_SCREEN_TRANS_ILLEGAL_PARAM; } if ((param.GetVideoFormat() != VIDEO_DATA_FORMAT_YUVI420) && (param.GetVideoFormat() != VIDEO_DATA_FORMAT_NV12) && - (param.GetVideoFormat() != VIDEO_DATA_FORMAT_NV21)) { + (param.GetVideoFormat() != VIDEO_DATA_FORMAT_NV21) && + (param.GetVideoFormat() != VIDEO_DATA_FORMAT_RGBA8888)) { DHLOGE("%s: Invalid video data format.", LOG_TAG); return ERR_DH_SCREEN_TRANS_ILLEGAL_PARAM; } -- Gitee From ae5abc9306904a2b4fa7aefb7c5afec892078162 Mon Sep 17 00:00:00 2001 From: sxzheng96 Date: Thu, 17 Mar 2022 10:05:54 +0800 Subject: [PATCH 04/16] modify hardware encoder input data format Signed-off-by: sxzheng96 --- .../screenservice/sourceservice/dscreenmgr/src/dscreen.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/screenservice/sourceservice/dscreenmgr/src/dscreen.cpp b/services/screenservice/sourceservice/dscreenmgr/src/dscreen.cpp index ffea98cb..8b6896f2 100644 --- a/services/screenservice/sourceservice/dscreenmgr/src/dscreen.cpp +++ b/services/screenservice/sourceservice/dscreenmgr/src/dscreen.cpp @@ -212,7 +212,6 @@ void DScreen::HandleEnable(const std::string ¶m, const std::string &taskId) videoParam_->SetScreenWidth(attrJson[KEY_SCREEN_WIDTH]); videoParam_->SetScreenHeight(attrJson[KEY_SCREEN_HEIGHT]); - videoParam_->SetVideoFormat(VIDEO_DATA_FORMAT_RGBA8888); // negotiate codecType int32_t ret = NegotiateCodecType(attrJson[KEY_CODECTYPE]); @@ -263,9 +262,11 @@ int32_t DScreen::NegotiateCodecType(const std::string &remoteCodecInfoStr) if (std::find(codecTypeCandidates.begin(), codecTypeCandidates.end(), CODEC_NAME_H264) != codecTypeCandidates.end()) { videoParam_->SetCodecType(VIDEO_CODEC_TYPE_VIDEO_H264); + videoParam_->SetVideoFormat(VIDEO_DATA_FORMAT_NV21); } else if(std::find(codecTypeCandidates.begin(), codecTypeCandidates.end(), CODEC_NAME_MPEG4) != codecTypeCandidates.end()) { videoParam_->SetCodecType(VIDEO_CODEC_TYPE_VIDEO_MPEG4); + videoParam_->SetVideoFormat(VIDEO_DATA_FORMAT_RGBA8888); } else { DHLOGI("codec type not support."); return ERR_DH_SCREEN_SA_DSCREEN_NEGOTIATE_CODEC_FAIL; -- Gitee From 70222e929e1585da02a4eafe8a9997e78dbdd045 Mon Sep 17 00:00:00 2001 From: houpengfei Date: Thu, 17 Mar 2022 02:08:19 +0000 Subject: [PATCH 05/16] Signed-off-by:hhh2 Signed-off-by: houpengfei --- services/screenclient/BUILD.gn | 11 +++++------ services/screenclient/test/unittest/BUILD.gn | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/services/screenclient/BUILD.gn b/services/screenclient/BUILD.gn index d81a18c7..b6a80f2c 100644 --- a/services/screenclient/BUILD.gn +++ b/services/screenclient/BUILD.gn @@ -13,16 +13,16 @@ import("//build/ohos.gni") import("//build/ohos_var.gni") -import("//foundation/distributedhardware/distributedscreen/distributedscreen.gni") +import( + "//foundation/distributedhardware/distributedscreen/distributedscreen.gni") ohos_shared_library("distributed_screen_client") { - include_dirs = [ "${windowmanager_path}/interfaces/innerkits/wm", "${graphicstandard_path}/interfaces/innerkits/surface", "${graphicstandard_path}/rosen/modules/render_service_client/core/ui", "${fwk_common_path}/utils/include", - "//foundation/multimodalinput/input/interfaces/native/innerkits/event/include/" + "//foundation/multimodalinput/input/interfaces/native/innerkits/event/include/", ] include_dirs += [ @@ -38,9 +38,9 @@ ohos_shared_library("distributed_screen_client") { deps = [ "${common_path}:distributed_screen_utils", "${graphicstandard_path}/frameworks/surface:surface", + "${windowmanager_path}/wm:libwm", "//foundation/distributedschedule/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", "//foundation/graphic/standard/rosen/modules/render_service_client:librender_service_client", - "${windowmanager_path}/wm:libwm", "//foundation/multimodalinput/input:mmi_uinject", ] @@ -52,10 +52,9 @@ ohos_shared_library("distributed_screen_client") { external_deps = [ "hiviewdfx_hilog_native:libhilog", - "multimodalinput_base:libmmi-client", + "input:libmmi-client", ] part_name = "distributed_screen" subsystem_name = "distributedhardware" } - diff --git a/services/screenclient/test/unittest/BUILD.gn b/services/screenclient/test/unittest/BUILD.gn index db6632d2..4993b5ff 100644 --- a/services/screenclient/test/unittest/BUILD.gn +++ b/services/screenclient/test/unittest/BUILD.gn @@ -59,7 +59,7 @@ ohos_unittest("ScreenClientTest") { external_deps = [ "hiviewdfx_hilog_native:libhilog", - "multimodalinput_base:libmmi-client", + "input:libmmi-client", ] } -- Gitee From 3f15c15477932e0d40ce46f6d31d8ddb7e0a3c39 Mon Sep 17 00:00:00 2001 From: sxzheng96 Date: Thu, 17 Mar 2022 10:32:29 +0800 Subject: [PATCH 06/16] fix some word spell problem Signed-off-by: sxzheng96 --- .../screensinktrans/include/screen_sink_trans.h | 4 ++-- .../screensinktrans/src/screen_sink_trans.cpp | 12 ++++++------ .../screensourcetrans/include/screen_source_trans.h | 4 ++-- .../screensourcetrans/src/screen_source_trans.cpp | 12 ++++++------ .../screensinktrans/src/screen_sink_trans_test.cpp | 12 ++++++------ 5 files changed, 22 insertions(+), 22 deletions(-) diff --git a/services/screentransport/screensinktrans/include/screen_sink_trans.h b/services/screentransport/screensinktrans/include/screen_sink_trans.h index abd9e75a..665c3dc0 100644 --- a/services/screentransport/screensinktrans/include/screen_sink_trans.h +++ b/services/screentransport/screensinktrans/include/screen_sink_trans.h @@ -50,8 +50,8 @@ private: int32_t CheckVideoParam(const VideoParam ¶m); int32_t CheckTransParam(const VideoParam &localParam, const VideoParam &remoteParam, const std::string &peerDevId); int32_t InitScreenTrans(const VideoParam &localParam, const VideoParam &remoteParam, const std::string &peerDevId); - int32_t RegisterChannelListner(); - int32_t RegisterProcessorListner(const VideoParam &localParam, const VideoParam &remoteParam, + int32_t RegisterChannelListener(); + int32_t RegisterProcessorListener(const VideoParam &localParam, const VideoParam &remoteParam, const std::string &peerDevId); private: diff --git a/services/screentransport/screensinktrans/src/screen_sink_trans.cpp b/services/screentransport/screensinktrans/src/screen_sink_trans.cpp index 87af942c..6de90dc2 100644 --- a/services/screentransport/screensinktrans/src/screen_sink_trans.cpp +++ b/services/screentransport/screensinktrans/src/screen_sink_trans.cpp @@ -206,7 +206,7 @@ int32_t ScreenSinkTrans::InitScreenTrans(const VideoParam &localParam, const Vid DHLOGE("%s: Create screen data channel failed.", LOG_TAG); return ERR_DH_SCREEN_TRANS_NULL_VALUE; } - int32_t ret = RegisterChannelListner(); + int32_t ret = RegisterChannelListener(); if (ret != DH_SUCCESS) { DHLOGE("%s: Register channel listener failed.", LOG_TAG); screenChannel_ = nullptr; @@ -219,7 +219,7 @@ int32_t ScreenSinkTrans::InitScreenTrans(const VideoParam &localParam, const Vid screenChannel_ = nullptr; return ERR_DH_SCREEN_TRANS_NULL_VALUE; } - ret = RegisterProcessorListner(localParam, remoteParam, peerDevId); + ret = RegisterProcessorListener(localParam, remoteParam, peerDevId); if (ret != DH_SUCCESS) { DHLOGE("%s: Register processor listener failed.", LOG_TAG); screenChannel_ = nullptr; @@ -230,9 +230,9 @@ int32_t ScreenSinkTrans::InitScreenTrans(const VideoParam &localParam, const Vid return DH_SUCCESS; } -int32_t ScreenSinkTrans::RegisterChannelListner() +int32_t ScreenSinkTrans::RegisterChannelListener() { - DHLOGI("%s: RegisterChannelListner.", LOG_TAG); + DHLOGI("%s: RegisterChannelListener.", LOG_TAG); std::shared_ptr listener = shared_from_this(); if (!listener) { DHLOGE("%s: Channel Listener is null.", LOG_TAG); @@ -248,10 +248,10 @@ int32_t ScreenSinkTrans::RegisterChannelListner() return DH_SUCCESS; } -int32_t ScreenSinkTrans::RegisterProcessorListner(const VideoParam &localParam, const VideoParam &remoteParam, +int32_t ScreenSinkTrans::RegisterProcessorListener(const VideoParam &localParam, const VideoParam &remoteParam, const std::string &peerDevId) { - DHLOGI("%s: RegisterProcessorListner.", LOG_TAG); + DHLOGI("%s: RegisterProcessorListener.", LOG_TAG); std::shared_ptr listener = shared_from_this(); if (!listener) { DHLOGE("%s: Channel listener to null.", LOG_TAG); diff --git a/services/screentransport/screensourcetrans/include/screen_source_trans.h b/services/screentransport/screensourcetrans/include/screen_source_trans.h index b513c739..667212b3 100644 --- a/services/screentransport/screensourcetrans/include/screen_source_trans.h +++ b/services/screentransport/screensourcetrans/include/screen_source_trans.h @@ -55,8 +55,8 @@ private: int32_t CheckVideoParam(const VideoParam ¶m); int32_t CheckTransParam(const VideoParam &localParam, const VideoParam &remoteParam, const std::string &peerDevId); int32_t InitScreenTrans(const VideoParam &localParam, const VideoParam &remoteParam, const std::string &peerDevId); - int32_t RegisterChannelListner(); - int32_t RegisterProcessorListner(const VideoParam &localParam, const VideoParam &remoteParam); + int32_t RegisterChannelListener(); + int32_t RegisterProcessorListener(const VideoParam &localParam, const VideoParam &remoteParam); void FeedChannelData(); private: diff --git a/services/screentransport/screensourcetrans/src/screen_source_trans.cpp b/services/screentransport/screensourcetrans/src/screen_source_trans.cpp index 57dd1924..6d2ef574 100644 --- a/services/screentransport/screensourcetrans/src/screen_source_trans.cpp +++ b/services/screentransport/screensourcetrans/src/screen_source_trans.cpp @@ -218,7 +218,7 @@ int32_t ScreenSourceTrans::InitScreenTrans(const VideoParam &localParam, const V DHLOGE("%s: Create screen data channel failed.", LOG_TAG); return ERR_DH_SCREEN_TRANS_NULL_VALUE; } - int32_t ret = RegisterChannelListner(); + int32_t ret = RegisterChannelListener(); if (ret != DH_SUCCESS) { DHLOGE("%s: Register channel listener failed ret: %d.", LOG_TAG, ret); screenChannel_ = nullptr; @@ -231,7 +231,7 @@ int32_t ScreenSourceTrans::InitScreenTrans(const VideoParam &localParam, const V screenChannel_ = nullptr; return ERR_DH_SCREEN_TRANS_NULL_VALUE; } - ret = RegisterProcessorListner(localParam, remoteParam); + ret = RegisterProcessorListener(localParam, remoteParam); if (ret != DH_SUCCESS) { DHLOGE("%s: Register data processor listener failed ret: %d.", LOG_TAG, ret); screenChannel_ = nullptr; @@ -242,9 +242,9 @@ int32_t ScreenSourceTrans::InitScreenTrans(const VideoParam &localParam, const V return DH_SUCCESS; } -int32_t ScreenSourceTrans::RegisterChannelListner() +int32_t ScreenSourceTrans::RegisterChannelListener() { - DHLOGI("%s: RegisterChannelListner.", LOG_TAG); + DHLOGI("%s: RegisterChannelListener.", LOG_TAG); std::shared_ptr listener = shared_from_this(); if (!listener) { DHLOGE("%s: Channel listener is null", LOG_TAG); @@ -264,9 +264,9 @@ int32_t ScreenSourceTrans::RegisterChannelListner() return DH_SUCCESS; } -int32_t ScreenSourceTrans::RegisterProcessorListner(const VideoParam &localParam, const VideoParam &remoteParam) +int32_t ScreenSourceTrans::RegisterProcessorListener(const VideoParam &localParam, const VideoParam &remoteParam) { - DHLOGI("%s: RegisterProcessorListner.", LOG_TAG); + DHLOGI("%s: RegisterProcessorListener.", LOG_TAG); std::shared_ptr listener = shared_from_this(); if (!listener) { DHLOGE("%s: Processor listener is null", LOG_TAG); diff --git a/services/screentransport/test/unittest/screensinktrans/src/screen_sink_trans_test.cpp b/services/screentransport/test/unittest/screensinktrans/src/screen_sink_trans_test.cpp index 3d88b9bf..ff655147 100644 --- a/services/screentransport/test/unittest/screensinktrans/src/screen_sink_trans_test.cpp +++ b/services/screentransport/test/unittest/screensinktrans/src/screen_sink_trans_test.cpp @@ -66,14 +66,14 @@ HWTEST_F(ScreenSinkTransTest, setup_test_001, TestSize.Level1) } /** - * @tc.name: register_processor_listner_001 - * @tc.desc: Verify the RegisterChannelListner function success. + * @tc.name: register_processor_listener_001 + * @tc.desc: Verify the RegisterChannelListener function success. * @tc.type: FUNC * @tc.require: Issue Number */ -HWTEST_F(ScreenSinkTransTest, register_processor_listner_001, TestSize.Level1) +HWTEST_F(ScreenSinkTransTest, register_processor_listener_001, TestSize.Level1) { - EXPECT_EQ(DH_SUCCESS, trans_->RegisterProcessorListner(param_, param_, peerDevId_)); + EXPECT_EQ(DH_SUCCESS, trans_->RegisterProcessorListener(param_, param_, peerDevId_)); } /** @@ -230,7 +230,7 @@ HWTEST_F(ScreenSinkTransTest, on_data_received_test_001, TestSize.Level1) /** * @tc.name: on_processor_state_notify_test_001 - * @tc.desc: Verify the RegisterChannelListner function. + * @tc.desc: Verify the RegisterChannelListener function. * @tc.type: FUNC * @tc.require: Issue Number */ @@ -243,7 +243,7 @@ HWTEST_F(ScreenSinkTransTest, on_processor_state_notify_test_001, TestSize.Level /** * @tc.name: on_processor_state_notify_test_002 - * @tc.desc: Verify the RegisterChannelListner function. + * @tc.desc: Verify the RegisterChannelListener function. * @tc.type: FUNC * @tc.require: Issue Number */ -- Gitee From d65323581a4cb3c71e3f532fe4d7775e53b1b8df Mon Sep 17 00:00:00 2001 From: sxzheng96 Date: Thu, 17 Mar 2022 11:01:04 +0800 Subject: [PATCH 07/16] modify gn file format Signed-off-by: sxzheng96 --- services/screenservice/sourceservice/BUILD.gn | 123 +++++++++--------- 1 file changed, 62 insertions(+), 61 deletions(-) diff --git a/services/screenservice/sourceservice/BUILD.gn b/services/screenservice/sourceservice/BUILD.gn index 69976d2c..499e9a1e 100644 --- a/services/screenservice/sourceservice/BUILD.gn +++ b/services/screenservice/sourceservice/BUILD.gn @@ -13,73 +13,74 @@ import("//build/ohos.gni") import("//build/ohos_var.gni") -import("//foundation/distributedhardware/distributedscreen/distributedscreen.gni") +import( + "//foundation/distributedhardware/distributedscreen/distributedscreen.gni") ohos_shared_library("distributed_screen_source") { - include_dirs = [ - "//third_party/json/include", - "${windowmanager_path}/interfaces/innerkits/dm", - "//utils/native/base/include", - "//utils/system/safwk/native/include", - "//foundation/graphic/standard/interfaces/innerkits/surface", - "${fwk_common_path}/utils/include", - "${mediastandard_path}/interfaces/innerkits/native/media/include", - ] + include_dirs = [ + "//third_party/json/include", + "${windowmanager_path}/interfaces/innerkits/dm", + "//utils/native/base/include", + "//utils/system/safwk/native/include", + "//foundation/graphic/standard/interfaces/innerkits/surface", + "${fwk_common_path}/utils/include", + "${mediastandard_path}/interfaces/innerkits/native/media/include", + ] - include_dirs += [ - "./dscreenservice/include", - "./dscreenservice/include/callback", - "./dscreenmgr/include", - "${interfaces_path}/innerkits/native_cpp/screen_sink/include", - "${interfaces_path}/innerkits/native_cpp/screen_sink/include/callback", - "${interfaces_path}/innerkits/native_cpp/screen_source/include", - "${interfaces_path}/innerkits/native_cpp/screen_source/include/callback", - "${common_path}/include", - "${services_path}/common/utils/include", - "${services_path}/common/databuffer/include", - "${services_path}/common/screen_channel/include", - "${services_path}/screentransport/screensourceprocessor/include", - "${services_path}/screentransport/screensourceprocessor/encoder/include", - "${services_path}/screentransport/screensourcetrans/include", - ] + include_dirs += [ + "./dscreenservice/include", + "./dscreenservice/include/callback", + "./dscreenmgr/include", + "${interfaces_path}/innerkits/native_cpp/screen_sink/include", + "${interfaces_path}/innerkits/native_cpp/screen_sink/include/callback", + "${interfaces_path}/innerkits/native_cpp/screen_source/include", + "${interfaces_path}/innerkits/native_cpp/screen_source/include/callback", + "${common_path}/include", + "${services_path}/common/utils/include", + "${services_path}/common/databuffer/include", + "${services_path}/common/screen_channel/include", + "${services_path}/screentransport/screensourceprocessor/include", + "${services_path}/screentransport/screensourceprocessor/encoder/include", + "${services_path}/screentransport/screensourcetrans/include", + ] - sources = [ - "${services_path}/common/utils/src/dscreen_maprelation.cpp", - "${services_path}/common/utils/src/video_param.cpp", - "${interfaces_path}/innerkits/native_cpp/screen_sink/src/dscreen_sink_proxy.cpp", - "${interfaces_path}/innerkits/native_cpp/screen_source/src/dscreen_source_proxy.cpp", - "./dscreenservice/src/callback/dscreen_source_callback_proxy.cpp", - "./dscreenservice/src/dscreen_source_service.cpp", - "./dscreenservice/src/dscreen_source_stub.cpp", - "./dscreenmgr/src/dscreen.cpp", - "./dscreenmgr/src/dscreen_manager.cpp", - "./dscreenmgr/src/screen_manager_adapter.cpp", - ] + sources = [ + "${interfaces_path}/innerkits/native_cpp/screen_sink/src/dscreen_sink_proxy.cpp", + "${interfaces_path}/innerkits/native_cpp/screen_source/src/dscreen_source_proxy.cpp", + "${services_path}/common/utils/src/dscreen_maprelation.cpp", + "${services_path}/common/utils/src/video_param.cpp", + "./dscreenmgr/src/dscreen.cpp", + "./dscreenmgr/src/dscreen_manager.cpp", + "./dscreenmgr/src/screen_manager_adapter.cpp", + "./dscreenservice/src/callback/dscreen_source_callback_proxy.cpp", + "./dscreenservice/src/dscreen_source_service.cpp", + "./dscreenservice/src/dscreen_source_stub.cpp", + ] - deps = [ - "//utils/native/base:utils", - "${mediastandard_path}/interfaces/innerkits/native/media:media_client", - "${common_path}:distributed_screen_utils", - "${services_path}/screentransport/screensourcetrans:distributed_screen_sourcetrans", - "//foundation/graphic/standard/rosen/modules/render_service_client:librender_service_client", - "//foundation/graphic/standard/frameworks/surface:surface", - "${windowmanager_path}/dm:libdm", - ] + deps = [ + "${common_path}:distributed_screen_utils", + "${mediastandard_path}/interfaces/innerkits/native/media:media_client", + "${services_path}/screentransport/screensourcetrans:distributed_screen_sourcetrans", + "${windowmanager_path}/dm:libdm", + "//foundation/graphic/standard/frameworks/surface:surface", + "//foundation/graphic/standard/rosen/modules/render_service_client:librender_service_client", + "//utils/native/base:utils", + ] - defines = [ - "HI_LOG_ENABLE", - "DH_LOG_TAG=\"dscreensource\"", - "LOG_DOMAIN=0xD004100", - ] + defines = [ + "HI_LOG_ENABLE", + "DH_LOG_TAG=\"dscreensource\"", + "LOG_DOMAIN=0xD004100", + ] - external_deps = [ - "hiviewdfx_hilog_native:libhilog", - "ipc:ipc_core", - "safwk:system_ability_fwk", - "samgr_standard:samgr_proxy", - ] + external_deps = [ + "hiviewdfx_hilog_native:libhilog", + "ipc:ipc_core", + "safwk:system_ability_fwk", + "samgr_standard:samgr_proxy", + ] - subsystem_name = "distributedhardware" + subsystem_name = "distributedhardware" - part_name = "distributed_screen" -} \ No newline at end of file + part_name = "distributed_screen" +} -- Gitee From 5657bd805eeb04343cafcffdc3ad178ad9d016cf Mon Sep 17 00:00:00 2001 From: sxzheng96 Date: Thu, 17 Mar 2022 11:07:35 +0800 Subject: [PATCH 08/16] modify codecheck problem Signed-off-by: sxzheng96 --- .../screenservice/sourceservice/dscreenmgr/src/dscreen.cpp | 6 +++--- .../encoder/src/image_source_encoder.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/services/screenservice/sourceservice/dscreenmgr/src/dscreen.cpp b/services/screenservice/sourceservice/dscreenmgr/src/dscreen.cpp index 8b6896f2..d6e73fdb 100644 --- a/services/screenservice/sourceservice/dscreenmgr/src/dscreen.cpp +++ b/services/screenservice/sourceservice/dscreenmgr/src/dscreen.cpp @@ -260,11 +260,11 @@ int32_t DScreen::NegotiateCodecType(const std::string &remoteCodecInfoStr) } if (std::find(codecTypeCandidates.begin(), codecTypeCandidates.end(), - CODEC_NAME_H264) != codecTypeCandidates.end()) { + CODEC_NAME_H264) != codecTypeCandidates.end()) { videoParam_->SetCodecType(VIDEO_CODEC_TYPE_VIDEO_H264); videoParam_->SetVideoFormat(VIDEO_DATA_FORMAT_NV21); - } else if(std::find(codecTypeCandidates.begin(), codecTypeCandidates.end(), - CODEC_NAME_MPEG4) != codecTypeCandidates.end()) { + } else if (std::find(codecTypeCandidates.begin(), codecTypeCandidates.end(), + CODEC_NAME_MPEG4) != codecTypeCandidates.end()) { videoParam_->SetCodecType(VIDEO_CODEC_TYPE_VIDEO_MPEG4); videoParam_->SetVideoFormat(VIDEO_DATA_FORMAT_RGBA8888); } else { diff --git a/services/screentransport/screensourceprocessor/encoder/src/image_source_encoder.cpp b/services/screentransport/screensourceprocessor/encoder/src/image_source_encoder.cpp index b58a3684..6c03ad56 100644 --- a/services/screentransport/screensourceprocessor/encoder/src/image_source_encoder.cpp +++ b/services/screentransport/screensourceprocessor/encoder/src/image_source_encoder.cpp @@ -162,7 +162,7 @@ int32_t ImageSourceEncoder::SetEncoderFormat(const VideoParam &configParam) break; case VIDEO_CODEC_TYPE_VIDEO_MPEG4: imageFormat_.PutStringValue("codec_mime", "video/mp4v-es"); - break; + break; default: DHLOGE("%s: Codec type is invalid.", LOG_TAG); return ERR_DH_SCREEN_TRANS_ILLEGAL_PARAM; -- Gitee From 2b5525f8fd768f7fefdfe32275b0324ea4c5107e Mon Sep 17 00:00:00 2001 From: sxzheng96 Date: Thu, 17 Mar 2022 11:46:13 +0800 Subject: [PATCH 09/16] modify errcode Signed-off-by: sxzheng96 --- common/include/dscreen_errcode.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/include/dscreen_errcode.h b/common/include/dscreen_errcode.h index b6d01106..a6101bbe 100644 --- a/common/include/dscreen_errcode.h +++ b/common/include/dscreen_errcode.h @@ -50,9 +50,9 @@ enum DScreenErrorCode { ERR_DH_SCREEN_SA_DSCREEN_TASK_NOT_VALID = -50026, ERR_DH_SCREEN_SA_DSCREEN_SCREENGION_SETUP_FAILED = -50027, ERR_DH_SCREEN_SA_INVALID_IPC_CALL = -50028, - ERR_DH_SCREEN_SA_REGISTER_SCREENLISTENER_FAIL = -520029, - ERR_DH_SCREEN_SA_UNREGISTER_SCREENLISTENER_FAIL = -520030, - ERR_DH_SCREEN_SA_DSCREEN_NEGOTIATE_CODEC_FAIL = -520031, + ERR_DH_SCREEN_SA_REGISTER_SCREENLISTENER_FAIL = -500029, + ERR_DH_SCREEN_SA_UNREGISTER_SCREENLISTENER_FAIL = -500030, + ERR_DH_SCREEN_SA_DSCREEN_NEGOTIATE_CODEC_FAIL = -500031, // Transport component error code ERR_DH_SCREEN_TRANS_ERROR = -51000, ERR_DH_SCREEN_TRANS_TIMEOUT = -51001, -- Gitee From c8d5c821ed86f399ca44d91dc714aa52114a6905 Mon Sep 17 00:00:00 2001 From: qinlong Date: Mon, 21 Mar 2022 15:43:08 +0800 Subject: [PATCH 10/16] delete ShowWindow test Signed-off-by: qinlong --- .../src/screen_client_window_adapter_test.cpp | 26 ------------------- 1 file changed, 26 deletions(-) diff --git a/services/screenclient/test/unittest/src/screen_client_window_adapter_test.cpp b/services/screenclient/test/unittest/src/screen_client_window_adapter_test.cpp index 464b9dd8..e559d692 100644 --- a/services/screenclient/test/unittest/src/screen_client_window_adapter_test.cpp +++ b/services/screenclient/test/unittest/src/screen_client_window_adapter_test.cpp @@ -58,32 +58,6 @@ HWTEST_F(ScreenClientWindowAdapterTest, CreateWindow_002, TestSize.Level1) EXPECT_NE(surface, actualSurface); } -/** - * @tc.name: ShowWindow_001 - * @tc.desc: Verify the ShowWindow function. - * @tc.type: FUNC - * @tc.require: Issue Number - */ -HWTEST_F(ScreenClientWindowAdapterTest, ShowWindow_001, TestSize.Level1) -{ - int32_t windowId = 0; - int32_t actual = ScreenClientWindowAdapter::GetInstance().ShowWindow(windowId); - EXPECT_EQ(ERR_DH_SCREEN_SCREENCLIENT_SHOW_WINDOW_ERROR, actual); -} - -/** - * @tc.name: ShowWindow_002 - * @tc.desc: Verify the ShowWindow function. - * @tc.type: FUNC - * @tc.require: Issue Number - */ -HWTEST_F(ScreenClientWindowAdapterTest, ShowWindow_002, TestSize.Level1) -{ - int32_t windowId = 1; - int32_t actual = ScreenClientWindowAdapter::GetInstance().ShowWindow(windowId); - EXPECT_EQ(DH_SUCCESS, actual); -} - /** * @tc.name: MoveWindow_001 * @tc.desc: Verify the MoveWindow function. -- Gitee From 9d30b7f61701cde3de9560f7ce3478a76ce1f7f4 Mon Sep 17 00:00:00 2001 From: sxzheng96 Date: Mon, 21 Mar 2022 18:41:59 +0800 Subject: [PATCH 11/16] fix fuzz test bug Signed-off-by: sxzheng96 --- .../sourceservice/dscreenmgr/src/dscreen_manager.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/services/screenservice/sourceservice/dscreenmgr/src/dscreen_manager.cpp b/services/screenservice/sourceservice/dscreenmgr/src/dscreen_manager.cpp index 1b5ceb49..49812b88 100644 --- a/services/screenservice/sourceservice/dscreenmgr/src/dscreen_manager.cpp +++ b/services/screenservice/sourceservice/dscreenmgr/src/dscreen_manager.cpp @@ -199,6 +199,11 @@ int32_t DScreenManager::EnableDistributedScreen(const std::string &devId, const { DHLOGI("EnableDistributedScreen, devId: %s, dhId:%s", GetAnonyString(devId).c_str(), GetAnonyString(dhId).c_str()); + if (!dScreenCallback_) { + DHLOGE("dscreen manager not init."); + return ERR_DH_SCREEN_SA_ENABLE_FAILED; + } + std::string dScreenIdx = devId + SEPERATOR + dhId; std::shared_ptr dScreen = nullptr; if (dScreens_.count(dScreenIdx) != 0) { -- Gitee From 29221903d16d549b672ff739483e46c5c1ef36d2 Mon Sep 17 00:00:00 2001 From: qinlong Date: Tue, 22 Mar 2022 09:33:04 +0800 Subject: [PATCH 12/16] delete Screen_Client_Test Signed-off-by: qinlong --- bundle.json | 1 - services/screenclient/BUILD.gn | 60 ------ services/screenclient/test/unittest/BUILD.gn | 69 ------- .../unittest/include/screen_client_test.h | 37 ---- .../screen_client_window_adapter_test.h | 41 ----- .../test/unittest/src/screen_client_test.cpp | 171 ------------------ .../src/screen_client_window_adapter_test.cpp | 117 ------------ 7 files changed, 496 deletions(-) delete mode 100644 services/screenclient/BUILD.gn delete mode 100644 services/screenclient/test/unittest/BUILD.gn delete mode 100644 services/screenclient/test/unittest/include/screen_client_test.h delete mode 100644 services/screenclient/test/unittest/include/screen_client_window_adapter_test.h delete mode 100644 services/screenclient/test/unittest/src/screen_client_test.cpp delete mode 100644 services/screenclient/test/unittest/src/screen_client_window_adapter_test.cpp diff --git a/bundle.json b/bundle.json index c89001c4..90b77513 100644 --- a/bundle.json +++ b/bundle.json @@ -79,7 +79,6 @@ "test":[ "//foundation/distributedhardware/distributedscreen/services/screentransport/test/unittest:screen_transport_test", "//foundation/distributedhardware/distributedscreen/services/softbusadapter/test/unittest:SoftBusAdapterTest", - "//foundation/distributedhardware/distributedscreen/services/screenclient/test/unittest:screen_client_test", "//foundation/distributedhardware/distributedscreen/services/common/test/unittest:service_common_test" ] } diff --git a/services/screenclient/BUILD.gn b/services/screenclient/BUILD.gn deleted file mode 100644 index b6a80f2c..00000000 --- a/services/screenclient/BUILD.gn +++ /dev/null @@ -1,60 +0,0 @@ -# Copyright (c) 2022 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import("//build/ohos.gni") -import("//build/ohos_var.gni") -import( - "//foundation/distributedhardware/distributedscreen/distributedscreen.gni") - -ohos_shared_library("distributed_screen_client") { - include_dirs = [ - "${windowmanager_path}/interfaces/innerkits/wm", - "${graphicstandard_path}/interfaces/innerkits/surface", - "${graphicstandard_path}/rosen/modules/render_service_client/core/ui", - "${fwk_common_path}/utils/include", - "//foundation/multimodalinput/input/interfaces/native/innerkits/event/include/", - ] - - include_dirs += [ - "include", - "${common_path}/include", - ] - - sources = [ - "${services_path}/screenclient/src/screen_client.cpp", - "${services_path}/screenclient/src/screen_client_window_adapter.cpp", - ] - - deps = [ - "${common_path}:distributed_screen_utils", - "${graphicstandard_path}/frameworks/surface:surface", - "${windowmanager_path}/wm:libwm", - "//foundation/distributedschedule/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", - "//foundation/graphic/standard/rosen/modules/render_service_client:librender_service_client", - "//foundation/multimodalinput/input:mmi_uinject", - ] - - defines = [ - "HI_LOG_ENABLE", - "DH_LOG_TAG=\"dscreenclient\"", - "LOG_DOMAIN=0xD004100", - ] - - external_deps = [ - "hiviewdfx_hilog_native:libhilog", - "input:libmmi-client", - ] - - part_name = "distributed_screen" - subsystem_name = "distributedhardware" -} diff --git a/services/screenclient/test/unittest/BUILD.gn b/services/screenclient/test/unittest/BUILD.gn deleted file mode 100644 index 4993b5ff..00000000 --- a/services/screenclient/test/unittest/BUILD.gn +++ /dev/null @@ -1,69 +0,0 @@ -# Copyright (c) 2022 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import("//build/test.gni") -import( - "//foundation/distributedhardware/distributedscreen/distributedscreen.gni") - -module_out_path = "distributed_screen/screen_client_test" - -config("module_private_config") { - visibility = [ ":*" ] - - include_dirs = [ - "${windowmanager_path}/interfaces/innerkits/wm", - "${graphicstandard_path}/interfaces/innerkits/surface", - "${graphicstandard_path}/rosen/modules/render_service_client/core/ui", - "${fwk_common_path}/utils/include", - "${fwk_utils_path}/include/log", - ] - - include_dirs += [ - "include", - "${common_path}/include", - "${services_path}/screenclient/include", - "${services_path}/screenclient/test/unittest/include", - ] -} - -## UnitTest screen_client_test -ohos_unittest("ScreenClientTest") { - module_out_path = module_out_path - - sources = [ - "${services_path}/screenclient/test/unittest/src/screen_client_test.cpp", - "${services_path}/screenclient/test/unittest/src/screen_client_window_adapter_test.cpp", - ] - - configs = [ ":module_private_config" ] - - deps = [ - "${fwk_utils_path}:distributedhardwareutils", - "${graphicstandard_path}/frameworks/surface:surface", - "${graphicstandard_path}/rosen/modules/render_service_client:librender_service_client", - "${windowmanager_path}/wm:libwm", - "//foundation/distributedhardware/distributedscreen/services/screenclient:distributed_screen_client", - "//third_party/googletest:gmock", - "//third_party/googletest:gtest_main", - ] - - external_deps = [ - "hiviewdfx_hilog_native:libhilog", - "input:libmmi-client", - ] -} - -group("screen_client_test") { - testonly = true - deps = [ ":ScreenClientTest" ] -} diff --git a/services/screenclient/test/unittest/include/screen_client_test.h b/services/screenclient/test/unittest/include/screen_client_test.h deleted file mode 100644 index 465c22db..00000000 --- a/services/screenclient/test/unittest/include/screen_client_test.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef OHOS_SCREEN_CLIENT_TEST_H -#define OHOS_SCREEN_CLIENT_TEST_H - -#include - -#include "dscreen_errcode.h" -#include "dscreen_log.h" -#include "screen_client.h" -#include "screen_client_window_adapter.h" - -namespace OHOS { -namespace DistributedHardware { -class ScreenClientTest : public testing::Test { -public: - static void SetUpTestCase(void); - static void TearDownTestCase(void); - void SetUp(); - void TearDown(); -}; -} // namespace DistributedHardware -} // namespace OHOS -#endif \ No newline at end of file diff --git a/services/screenclient/test/unittest/include/screen_client_window_adapter_test.h b/services/screenclient/test/unittest/include/screen_client_window_adapter_test.h deleted file mode 100644 index 68467e77..00000000 --- a/services/screenclient/test/unittest/include/screen_client_window_adapter_test.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef OHOS_SCREEN_CLIENT_WINDOW_ADAPTER_TEST_H -#define OHOS_SCREEN_CLIENT_WINDOW_ADAPTER_TEST_H - -#include - -#include "rs_surface_node.h" -#include "window_option.h" -#include "wm_common.h" - -#include "dscreen_constants.h" -#include "dscreen_errcode.h" -#include "dscreen_log.h" -#include "screen_client_window_adapter.h" - -namespace OHOS { -namespace DistributedHardware { -class ScreenClientWindowAdapterTest : public testing::Test { -public: - static void SetUpTestCase(void); - static void TearDownTestCase(void); - void SetUp(); - void TearDown(); -}; -} // namespace DistributedHardware -} // namespace OHOS -#endif \ No newline at end of file diff --git a/services/screenclient/test/unittest/src/screen_client_test.cpp b/services/screenclient/test/unittest/src/screen_client_test.cpp deleted file mode 100644 index 859df30d..00000000 --- a/services/screenclient/test/unittest/src/screen_client_test.cpp +++ /dev/null @@ -1,171 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#define private public -#include "screen_client_test.h" -#undef private - -using namespace testing::ext; - -namespace OHOS { -namespace DistributedHardware { -void ScreenClientTest::SetUpTestCase(void) {} - -void ScreenClientTest::TearDownTestCase(void) {} - -void ScreenClientTest::SetUp() {} - -void ScreenClientTest::TearDown() {} - -/** - * @tc.name: ShowWindow_001 - * @tc.desc: Verify the ShowWindow function. - * @tc.type: FUNC - * @tc.require: Issue Number - */ -HWTEST_F(ScreenClientTest, ShowWindow_001, TestSize.Level1) -{ - int32_t windowId = 0; - int32_t actual = ScreenClient::GetInstance().ShowWindow(windowId); - EXPECT_EQ(ERR_DH_SCREEN_SCREENCLIENT_SHOW_WINDOW_ERROR, actual); -} - -/** - * @tc.name: ShowWindow_002 - * @tc.desc: Verify the ShowWindow function. - * @tc.type: FUNC - * @tc.require: Issue Number - */ -HWTEST_F(ScreenClientTest, ShowWindow_002, TestSize.Level1) -{ - std::shared_ptr windowProperty = std::make_shared(); - ScreenClient::GetInstance().windowId_ = 0; - int32_t windowId = ScreenClient::GetInstance().AddWindow(windowProperty); - int32_t actual = ScreenClient::GetInstance().ShowWindow(windowId); - EXPECT_EQ(DH_SUCCESS, actual); -} - -/** - * @tc.name: AddWindow_001 - * @tc.desc: Verify the AddWindow function. - * @tc.type: FUNC - * @tc.require: Issue Number - */ -HWTEST_F(ScreenClientTest, AddWindow_001, TestSize.Level1) -{ - std::shared_ptr windowProperty = nullptr; - int32_t actual = ScreenClient::GetInstance().AddWindow(windowProperty); - EXPECT_EQ(ERR_DH_SCREEN_SCREENCLIENT_ADD_WINDOW_ERROR, actual); -} - -/** - * @tc.name: AddWindow_002 - * @tc.desc: Verify the AddWindow function. - * @tc.type: FUNC - * @tc.require: Issue Number - */ -HWTEST_F(ScreenClientTest, AddWindow_002, TestSize.Level1) -{ - std::shared_ptr windowProperty = std::make_shared(); - ScreenClient::GetInstance().windowId_ = 2; - int32_t actual = ScreenClient::GetInstance().AddWindow(windowProperty); - EXPECT_EQ(3, actual); -} - -/** - * @tc.name: MoveWindow_001 - * @tc.desc: Verify the MoveWindow function. - * @tc.type: FUNC - * @tc.require: Issue Number - */ -HWTEST_F(ScreenClientTest, MoveWindow_001, TestSize.Level1) -{ - int32_t windowId = 0; - int32_t startX = 0; - int32_t startY = 0; - int32_t actual = ScreenClient::GetInstance().MoveWindow(windowId, startX, startY); - EXPECT_EQ(ERR_DH_SCREEN_SCREENCLIENT_MOVE_WINDOW_ERROR, actual); -} - -/** - * @tc.name: MoveWindow_002 - * @tc.desc: Verify the MoveWindow function. - * @tc.type: FUNC - * @tc.require: Issue Number - */ -HWTEST_F(ScreenClientTest, MoveWindow_002, TestSize.Level1) -{ - int32_t windowId = 1; - int32_t startX = 0; - int32_t startY = 0; - int32_t actual = ScreenClient::GetInstance().MoveWindow(windowId, startX, startY); - EXPECT_EQ(DH_SUCCESS, actual); -} - -/** - * @tc.name: RemoveWindow_001 - * @tc.desc: Verify the RemoveWindow function. - * @tc.type: FUNC - * @tc.require: Issue Number - */ -HWTEST_F(ScreenClientTest, RemoveWindow_001, TestSize.Level1) -{ - int32_t windowId = 0; - int32_t actual = ScreenClient::GetInstance().RemoveWindow(windowId); - EXPECT_EQ(ERR_DH_SCREEN_SCREENCLIENT_REMOVE_WINDOW_ERROR, actual); -} - -/** - * @tc.name: RemoveWindow_002 - * @tc.desc: Verify the RemoveWindow function. - * @tc.type: FUNC - * @tc.require: Issue Number - */ -HWTEST_F(ScreenClientTest, RemoveWindow_002, TestSize.Level1) -{ - int32_t windowId = 1; - int32_t actual = ScreenClient::GetInstance().RemoveWindow(windowId); - EXPECT_EQ(DH_SUCCESS, actual); -} - -/** - * @tc.name: GetSurface_001 - * @tc.desc: Verify the GetSurface function. - * @tc.type: FUNC - * @tc.require: Issue Number - */ -HWTEST_F(ScreenClientTest, GetSurface_001, TestSize.Level1) -{ - int32_t windowId = 0; - sptr actualSurface = ScreenClient::GetInstance().GetSurface(windowId); - EXPECT_EQ(nullptr, actualSurface); -} - -/** - * @tc.name: GetSurface_002 - * @tc.desc: Verify the GetSurface function. - * @tc.type: FUNC - * @tc.require: Issue Number - */ -HWTEST_F(ScreenClientTest, GetSurface_002, TestSize.Level1) -{ - std::shared_ptr windowProperty = std::make_shared(); - ScreenClient::GetInstance().windowId_ = 0; - int32_t windowId = ScreenClient::GetInstance().AddWindow(windowProperty); - sptr actualSurface = ScreenClient::GetInstance().GetSurface(windowId); - EXPECT_NE(nullptr, actualSurface); -} -} -} \ No newline at end of file diff --git a/services/screenclient/test/unittest/src/screen_client_window_adapter_test.cpp b/services/screenclient/test/unittest/src/screen_client_window_adapter_test.cpp deleted file mode 100644 index e559d692..00000000 --- a/services/screenclient/test/unittest/src/screen_client_window_adapter_test.cpp +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#define private public -#include "screen_client_window_adapter_test.h" -#undef private - -using namespace testing::ext; - -namespace OHOS { -namespace DistributedHardware { -void ScreenClientWindowAdapterTest::SetUpTestCase(void) {} - -void ScreenClientWindowAdapterTest::TearDownTestCase(void) {} - -void ScreenClientWindowAdapterTest::SetUp() {} - -void ScreenClientWindowAdapterTest::TearDown() {} - -/** - * @tc.name: CreateWindow_001 - * @tc.desc: Verify the CreateWindow function. - * @tc.type: FUNC - * @tc.require: Issue Number - */ -HWTEST_F(ScreenClientWindowAdapterTest, CreateWindow_001, TestSize.Level1) -{ - std::shared_ptr windowProperty = nullptr; - int32_t windowId = 0; - sptr actualSurface = ScreenClientWindowAdapter::GetInstance().CreateWindow(windowProperty, windowId); - EXPECT_EQ(nullptr, actualSurface); -} - -/** - * @tc.name: CreateWindow_002 - * @tc.desc: Verify the CreateWindow function. - * @tc.type: FUNC - * @tc.require: Issue Number - */ -HWTEST_F(ScreenClientWindowAdapterTest, CreateWindow_002, TestSize.Level1) -{ - std::shared_ptr windowProperty = std::make_shared(); - int32_t windowId = 2; - sptr surface = nullptr; - sptr actualSurface = ScreenClientWindowAdapter::GetInstance().CreateWindow(windowProperty, windowId); - EXPECT_NE(surface, actualSurface); -} - -/** - * @tc.name: MoveWindow_001 - * @tc.desc: Verify the MoveWindow function. - * @tc.type: FUNC - * @tc.require: Issue Number - */ -HWTEST_F(ScreenClientWindowAdapterTest, MoveWindow_001, TestSize.Level1) -{ - int32_t windowId = 0; - int32_t startX = 0; - int32_t startY = 0; - int32_t actual = ScreenClientWindowAdapter::GetInstance().MoveWindow(windowId, startX, startY); - EXPECT_EQ(ERR_DH_SCREEN_SCREENCLIENT_MOVE_WINDOW_ERROR, actual); -} - -/** - * @tc.name: MoveWindow_002 - * @tc.desc: Verify the MoveWindow function. - * @tc.type: FUNC - * @tc.require: Issue Number - */ -HWTEST_F(ScreenClientWindowAdapterTest, MoveWindow_002, TestSize.Level1) -{ - int32_t windowId = 1; - int32_t startX = 0; - int32_t startY = 0; - int32_t actual = ScreenClientWindowAdapter::GetInstance().MoveWindow(windowId, startX, startY); - EXPECT_EQ(DH_SUCCESS, actual); -} - -/** - * @tc.name: RemoveWindow_001 - * @tc.desc: Verify the RemoveWindow function. - * @tc.type: FUNC - * @tc.require: Issue Number - */ -HWTEST_F(ScreenClientWindowAdapterTest, RemoveWindow_001, TestSize.Level1) -{ - int32_t windowId = 0; - int32_t actual = ScreenClientWindowAdapter::GetInstance().RemoveWindow(windowId); - EXPECT_EQ(ERR_DH_SCREEN_SCREENCLIENT_REMOVE_WINDOW_ERROR, actual); -} - -/** - * @tc.name: RemoveWindow_002 - * @tc.desc: Verify the RemoveWindow function. - * @tc.type: FUNC - * @tc.require: Issue Number - */ -HWTEST_F(ScreenClientWindowAdapterTest, RemoveWindow_002, TestSize.Level1) -{ - int32_t windowId = 1; - int32_t actual = ScreenClientWindowAdapter::GetInstance().RemoveWindow(windowId); - EXPECT_EQ(DH_SUCCESS, actual); -} -} -} \ No newline at end of file -- Gitee From 4bd6cd2bb266abb12e809ce5ebd24ae40c56c2be Mon Sep 17 00:00:00 2001 From: qinlong Date: Tue, 22 Mar 2022 09:50:19 +0800 Subject: [PATCH 13/16] delete ScreenClientTest Signed-off-by: qinlong --- services/screenclient/BUILD.gn | 60 ++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 services/screenclient/BUILD.gn diff --git a/services/screenclient/BUILD.gn b/services/screenclient/BUILD.gn new file mode 100644 index 00000000..b6a80f2c --- /dev/null +++ b/services/screenclient/BUILD.gn @@ -0,0 +1,60 @@ +# Copyright (c) 2022 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build/ohos.gni") +import("//build/ohos_var.gni") +import( + "//foundation/distributedhardware/distributedscreen/distributedscreen.gni") + +ohos_shared_library("distributed_screen_client") { + include_dirs = [ + "${windowmanager_path}/interfaces/innerkits/wm", + "${graphicstandard_path}/interfaces/innerkits/surface", + "${graphicstandard_path}/rosen/modules/render_service_client/core/ui", + "${fwk_common_path}/utils/include", + "//foundation/multimodalinput/input/interfaces/native/innerkits/event/include/", + ] + + include_dirs += [ + "include", + "${common_path}/include", + ] + + sources = [ + "${services_path}/screenclient/src/screen_client.cpp", + "${services_path}/screenclient/src/screen_client_window_adapter.cpp", + ] + + deps = [ + "${common_path}:distributed_screen_utils", + "${graphicstandard_path}/frameworks/surface:surface", + "${windowmanager_path}/wm:libwm", + "//foundation/distributedschedule/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", + "//foundation/graphic/standard/rosen/modules/render_service_client:librender_service_client", + "//foundation/multimodalinput/input:mmi_uinject", + ] + + defines = [ + "HI_LOG_ENABLE", + "DH_LOG_TAG=\"dscreenclient\"", + "LOG_DOMAIN=0xD004100", + ] + + external_deps = [ + "hiviewdfx_hilog_native:libhilog", + "input:libmmi-client", + ] + + part_name = "distributed_screen" + subsystem_name = "distributedhardware" +} -- Gitee From 640bdf01f0628037f968cf674650db6d8f648984 Mon Sep 17 00:00:00 2001 From: qinlong Date: Tue, 22 Mar 2022 09:53:49 +0800 Subject: [PATCH 14/16] delete ScreenClientTest Signed-off-by: qinlong --- bundle.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundle.json b/bundle.json index 90b77513..1c71c17f 100644 --- a/bundle.json +++ b/bundle.json @@ -83,4 +83,4 @@ ] } } -} \ No newline at end of file +} -- Gitee From e5fc6924f38140593bd82a3ebc0c6457124ccbbf Mon Sep 17 00:00:00 2001 From: hwzhangchuang Date: Tue, 29 Mar 2022 14:16:53 +0800 Subject: [PATCH 15/16] modify readme Signed-off-by: hwzhangchuang --- README_zh.md | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/README_zh.md b/README_zh.md index a22043e3..20c8ddda 100644 --- a/README_zh.md +++ b/README_zh.md @@ -86,8 +86,16 @@ ## **涉及仓** **** -**分布式屏幕** -[distributed_screen](https://gitee.com/openharmony/distributed_screen) +分布式硬件子系统: -**分布式硬件管理框架** -[distributed_hardware_fwk](https://gitee.com/openharmony/distributed_hardware_fwk) \ No newline at end of file +设备管理 +[device_manager](https://gitee.com/openharmony/device_manager) + +分步式硬件管理框架 +[distributed_hardware_fwk](https://gitee.com/openharmony/distributed_hardware_fwk) + +分布式相机 +[distributed_camera](https://gitee.com/openharmony/distributed_camera) + +**分布式屏幕 +[distributed_screen](https://gitee.com/openharmony/distributed_screen)** \ No newline at end of file -- Gitee From b5639cccd0d351fff41f9364c7361d09a18702c2 Mon Sep 17 00:00:00 2001 From: hwzhangchuang Date: Tue, 29 Mar 2022 14:18:08 +0800 Subject: [PATCH 16/16] modify readme Signed-off-by: hwzhangchuang --- README_zh.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README_zh.md b/README_zh.md index 20c8ddda..1f385bb5 100644 --- a/README_zh.md +++ b/README_zh.md @@ -86,7 +86,7 @@ ## **涉及仓** **** -分布式硬件子系统: +**分布式硬件子系统:** 设备管理 [device_manager](https://gitee.com/openharmony/device_manager) -- Gitee