From 82532dae86b871743a9cfd7922107c748ef8e928 Mon Sep 17 00:00:00 2001 From: linziming Date: Mon, 18 Dec 2023 08:17:11 +0000 Subject: [PATCH 1/4] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E8=AF=B4?= =?UTF-8?q?=E6=98=8E=E3=80=91Media.Core=E8=83=BD=E5=8A=9B=E4=B8=8B?= =?UTF-8?q?=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: linziming --- .../BUILD.gn | 3 ++- .../encodeoninputbufferavailable_fuzzer.cpp | 2 +- .../BUILD.gn | 3 ++- .../encodeonoutputbufferavailable_fuzzer.cpp | 2 +- .../BUILD.gn | 3 ++- .../decodeoninputbufferavailable_fuzzer.cpp | 2 +- .../BUILD.gn | 3 ++- .../decodeonoutputbufferavailable_fuzzer.cpp | 2 +- services/data_process/BUILD.gn | 3 ++- .../decoder/decode_data_process.h | 16 ++++++++-------- .../decoder/decode_video_callback.h | 8 ++++---- .../encoder/encode_data_process.h | 16 ++++++++-------- .../encoder/encode_video_callback.h | 8 ++++---- .../decoder/decode_data_process.cpp | 12 ++++++------ .../decoder/decode_data_process_common.cpp | 18 +++++++++--------- .../decoder/decode_video_callback.cpp | 6 +++--- .../encoder/encode_data_process.cpp | 16 ++++++++-------- .../encoder/encode_video_callback.cpp | 6 +++--- .../unittest/common/pipeline_node/BUILD.gn | 3 ++- .../pipeline_node/decode_data_process_test.cpp | 6 +++--- .../pipeline_node/encode_data_process_test.cpp | 6 +++--- 21 files changed, 75 insertions(+), 69 deletions(-) diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/encodeoninputbufferavailable_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/encodeoninputbufferavailable_fuzzer/BUILD.gn index 8cb37842..75efa96d 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/encodeoninputbufferavailable_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/encodeoninputbufferavailable_fuzzer/BUILD.gn @@ -68,13 +68,14 @@ ohos_fuzztest("EncodeOnInputBufferAvailableFuzzTest") { ] external_deps = [ - "av_codec:av_codec_client", "c_utils:utils", "drivers_interface_display:libdisplay_composer_proxy_1.0", "eventhandler:libeventhandler", "graphic_2d:surface", "hitrace:hitrace_meter", ] + + public_external_deps = [ "av_codec:av_codec_client" ] } ############################################################################### diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/encodeoninputbufferavailable_fuzzer/encodeoninputbufferavailable_fuzzer.cpp b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/encodeoninputbufferavailable_fuzzer/encodeoninputbufferavailable_fuzzer.cpp index f97838fe..9d4d969c 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/encodeoninputbufferavailable_fuzzer/encodeoninputbufferavailable_fuzzer.cpp +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/encodeoninputbufferavailable_fuzzer/encodeoninputbufferavailable_fuzzer.cpp @@ -30,7 +30,7 @@ void EncodeOnInputBufferAvailableFuzzTest(const uint8_t* data, size_t size) std::shared_ptr encodeDataProcess = std::make_shared(sinkPipeline); std::shared_ptr encodeVideoCallback = std::make_shared(encodeDataProcess); - std::shared_ptr buffer = nullptr; + std::shared_ptr buffer = nullptr; encodeVideoCallback->OnInputBufferAvailable(index, buffer); } } diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/encodeonoutputbufferavailable_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/encodeonoutputbufferavailable_fuzzer/BUILD.gn index 8f545edd..590b56e9 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/encodeonoutputbufferavailable_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/encodeonoutputbufferavailable_fuzzer/BUILD.gn @@ -68,13 +68,14 @@ ohos_fuzztest("EncodeOnOutputBufferAvailableFuzzTest") { ] external_deps = [ - "av_codec:av_codec_client", "c_utils:utils", "drivers_interface_display:libdisplay_composer_proxy_1.0", "eventhandler:libeventhandler", "graphic_2d:surface", "hitrace:hitrace_meter", ] + + public_external_deps = [ "av_codec:av_codec_client" ] } ############################################################################### diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/encodeonoutputbufferavailable_fuzzer/encodeonoutputbufferavailable_fuzzer.cpp b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/encodeonoutputbufferavailable_fuzzer/encodeonoutputbufferavailable_fuzzer.cpp index 2215a766..0471170c 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/encodeonoutputbufferavailable_fuzzer/encodeonoutputbufferavailable_fuzzer.cpp +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/encodeonoutputbufferavailable_fuzzer/encodeonoutputbufferavailable_fuzzer.cpp @@ -35,7 +35,7 @@ void EncodeOnOutputBufferAvailableFuzzTest(const uint8_t* data, size_t size) std::shared_ptr sinkPipeline = std::make_shared(); std::shared_ptr encodeDataProcess = std::make_shared(sinkPipeline); std::shared_ptr encodeVideoCallback = std::make_shared(encodeDataProcess); - std::shared_ptr buffer = nullptr; + std::shared_ptr buffer = nullptr; encodeVideoCallback->OnOutputBufferAvailable(index, info, flag, buffer); } } diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/decodeoninputbufferavailable_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/decodeoninputbufferavailable_fuzzer/BUILD.gn index 90cd852e..dec7e996 100644 --- a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/decodeoninputbufferavailable_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/decodeoninputbufferavailable_fuzzer/BUILD.gn @@ -68,12 +68,13 @@ ohos_fuzztest("DecodeOnInputBufferAvailableFuzzTest") { ] external_deps = [ - "av_codec:av_codec_client", "c_utils:utils", "eventhandler:libeventhandler", "graphic_2d:surface", "hitrace:hitrace_meter", ] + + public_external_deps = [ "av_codec:av_codec_client" ] } ############################################################################### diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/decodeoninputbufferavailable_fuzzer/decodeoninputbufferavailable_fuzzer.cpp b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/decodeoninputbufferavailable_fuzzer/decodeoninputbufferavailable_fuzzer.cpp index 9e041ea8..e5094bff 100644 --- a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/decodeoninputbufferavailable_fuzzer/decodeoninputbufferavailable_fuzzer.cpp +++ b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/decodeoninputbufferavailable_fuzzer/decodeoninputbufferavailable_fuzzer.cpp @@ -31,7 +31,7 @@ void DecodeOnInputBufferAvailableFuzzTest(const uint8_t* data, size_t size) std::shared_ptr decodeDataProcess = std::make_shared(eventBusPipeline, sourcePipeline); std::shared_ptr decodeVideoCallback = std::make_shared(decodeDataProcess); - std::shared_ptr buffer = nullptr; + std::shared_ptr buffer = nullptr; decodeVideoCallback->OnInputBufferAvailable(index, buffer); } } diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/decodeonoutputbufferavailable_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/decodeonoutputbufferavailable_fuzzer/BUILD.gn index ac660830..1cc0977a 100644 --- a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/decodeonoutputbufferavailable_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/decodeonoutputbufferavailable_fuzzer/BUILD.gn @@ -68,12 +68,13 @@ ohos_fuzztest("DecodeOnOutputBufferAvailableFuzzTest") { ] external_deps = [ - "av_codec:av_codec_client", "c_utils:utils", "eventhandler:libeventhandler", "graphic_2d:surface", "hitrace:hitrace_meter", ] + + public_external_deps = [ "av_codec:av_codec_client" ] } ############################################################################### diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/decodeonoutputbufferavailable_fuzzer/decodeonoutputbufferavailable_fuzzer.cpp b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/decodeonoutputbufferavailable_fuzzer/decodeonoutputbufferavailable_fuzzer.cpp index ec7a3688..b4d6339b 100644 --- a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/decodeonoutputbufferavailable_fuzzer/decodeonoutputbufferavailable_fuzzer.cpp +++ b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/decodeonoutputbufferavailable_fuzzer/decodeonoutputbufferavailable_fuzzer.cpp @@ -37,7 +37,7 @@ void DecodeOnOutputBufferAvailableFuzzTest(const uint8_t* data, size_t size) std::shared_ptr decodeDataProcess = std::make_shared(eventBusPipeline, sourcePipeline); std::shared_ptr decodeVideoCallback = std::make_shared(decodeDataProcess); - std::shared_ptr buffer = nullptr; + std::shared_ptr buffer = nullptr; decodeVideoCallback->OnOutputBufferAvailable(index, info, flag, buffer); } diff --git a/services/data_process/BUILD.gn b/services/data_process/BUILD.gn index 3cbe5adb..2a191122 100644 --- a/services/data_process/BUILD.gn +++ b/services/data_process/BUILD.gn @@ -102,7 +102,6 @@ ohos_shared_library("distributed_camera_data_process") { } external_deps = [ - "av_codec:av_codec_client", "c_utils:utils", "drivers_interface_display:libdisplay_composer_proxy_1.0", "eventhandler:libeventhandler", @@ -112,6 +111,8 @@ ohos_shared_library("distributed_camera_data_process") { "samgr:samgr_proxy", ] + public_external_deps = [ "av_codec:av_codec_client" ] + if (!distributed_camera_common) { external_deps += [ "libyuv:yuv" ] } diff --git a/services/data_process/include/pipeline_node/multimedia_codec/decoder/decode_data_process.h b/services/data_process/include/pipeline_node/multimedia_codec/decoder/decode_data_process.h index 71c638d4..b99d70a2 100644 --- a/services/data_process/include/pipeline_node/multimedia_codec/decoder/decode_data_process.h +++ b/services/data_process/include/pipeline_node/multimedia_codec/decoder/decode_data_process.h @@ -25,13 +25,13 @@ #include "avcodec_common.h" #include "avcodec_video_decoder.h" -#include "avsharedmemory.h" +#include "buffer/avsharedmemory.h" #include "event.h" #include "event_bus.h" #include "event_sender.h" #include "event_registration.h" #include "eventbus_handler.h" -#include "format.h" +#include "meta/format.h" #include "ibuffer_consumer_listener.h" #include "iconsumer_surface.h" #include "avcodec_errors.h" @@ -65,10 +65,10 @@ public: void OnEvent(DCameraCodecEvent& ev) override; void OnError(); - void OnInputBufferAvailable(uint32_t index, std::shared_ptr buffer); - void OnOutputFormatChanged(const MediaAVCodec::Format &format); + void OnInputBufferAvailable(uint32_t index, std::shared_ptr buffer); + void OnOutputFormatChanged(const Media::Format &format); void OnOutputBufferAvailable(uint32_t index, const MediaAVCodec::AVCodecBufferInfo& info, - const MediaAVCodec::AVCodecBufferFlag& flag, std::shared_ptr buffer); + const MediaAVCodec::AVCodecBufferFlag& flag, std::shared_ptr buffer); void GetDecoderOutputBuffer(const sptr& surface); VideoConfigParams GetSourceConfig() const; VideoConfigParams GetTargetConfig() const; @@ -142,11 +142,11 @@ private: int64_t lastFeedDecoderInputBufferTimeUs_ = 0; int64_t outputTimeStampUs_ = 0; std::string processType_; - MediaAVCodec::Format metadataFormat_; - MediaAVCodec::Format decodeOutputFormat_; + Media::Format metadataFormat_; + Media::Format decodeOutputFormat_; MediaAVCodec::AVCodecBufferInfo outputInfo_; std::queue> inputBuffersQueue_; - std::queue> availableInputBufferQueue_; + std::queue> availableInputBufferQueue_; std::queue availableInputIndexsQueue_; std::deque frameInfoDeque_; }; diff --git a/services/data_process/include/pipeline_node/multimedia_codec/decoder/decode_video_callback.h b/services/data_process/include/pipeline_node/multimedia_codec/decoder/decode_video_callback.h index 9eb7fcc7..12bc0d54 100644 --- a/services/data_process/include/pipeline_node/multimedia_codec/decoder/decode_video_callback.h +++ b/services/data_process/include/pipeline_node/multimedia_codec/decoder/decode_video_callback.h @@ -18,7 +18,7 @@ #include "avcodec_errors.h" #include "avcodec_common.h" -#include "format.h" +#include "meta/format.h" #include "decode_data_process.h" @@ -33,10 +33,10 @@ public: ~DecodeVideoCallback() override = default; void OnError(MediaAVCodec::AVCodecErrorType errorType, int32_t errorCode) override; - void OnInputBufferAvailable(uint32_t index, std::shared_ptr buffer) override; - void OnOutputFormatChanged(const MediaAVCodec::Format &format) override; + void OnInputBufferAvailable(uint32_t index, std::shared_ptr buffer) override; + void OnOutputFormatChanged(const Media::Format &format) override; void OnOutputBufferAvailable(uint32_t index, MediaAVCodec::AVCodecBufferInfo info, - MediaAVCodec::AVCodecBufferFlag flag, std::shared_ptr buffer) override; + MediaAVCodec::AVCodecBufferFlag flag, std::shared_ptr buffer) override; private: std::weak_ptr decodeVideoNode_; }; diff --git a/services/data_process/include/pipeline_node/multimedia_codec/encoder/encode_data_process.h b/services/data_process/include/pipeline_node/multimedia_codec/encoder/encode_data_process.h index d6ea033b..f39bf6be 100644 --- a/services/data_process/include/pipeline_node/multimedia_codec/encoder/encode_data_process.h +++ b/services/data_process/include/pipeline_node/multimedia_codec/encoder/encode_data_process.h @@ -22,8 +22,8 @@ #include "avcodec_common.h" #include "avcodec_video_encoder.h" -#include "avsharedmemory.h" -#include "format.h" +#include "buffer/avsharedmemory.h" +#include "meta/format.h" #include "avcodec_errors.h" #include "securec.h" #include "surface.h" @@ -55,10 +55,10 @@ public: void ReleaseProcessNode() override; void OnError(); - void OnInputBufferAvailable(uint32_t index, std::shared_ptr buffer); - void OnOutputFormatChanged(const MediaAVCodec::Format &format); + void OnInputBufferAvailable(uint32_t index, std::shared_ptr buffer); + void OnOutputFormatChanged(const Media::Format &format); void OnOutputBufferAvailable(uint32_t index, MediaAVCodec::AVCodecBufferInfo info, - MediaAVCodec::AVCodecBufferFlag flag, std::shared_ptr buffer); + MediaAVCodec::AVCodecBufferFlag flag, std::shared_ptr buffer); VideoConfigParams GetSourceConfig() const; VideoConfigParams GetTargetConfig() const; @@ -80,7 +80,7 @@ private: void IncreaseWaitEncodeCnt(); void ReduceWaitEncodeCnt(); int32_t GetEncoderOutputBuffer(uint32_t index, MediaAVCodec::AVCodecBufferInfo info, - MediaAVCodec::AVCodecBufferFlag flag, std::shared_ptr& buffer); + MediaAVCodec::AVCodecBufferFlag flag, std::shared_ptr& buffer); int32_t EncodeDone(std::vector>& outputBuffers); private: @@ -136,8 +136,8 @@ private: int64_t lastFeedEncoderInputBufferTimeUs_ = 0; int64_t inputTimeStampUs_ = 0; std::string processType_; - MediaAVCodec::Format metadataFormat_; - MediaAVCodec::Format encodeOutputFormat_; + Media::Format metadataFormat_; + Media::Format encodeOutputFormat_; std::string surfaceStr_ = "surface"; int32_t index_ = FRAME_HEAD; }; diff --git a/services/data_process/include/pipeline_node/multimedia_codec/encoder/encode_video_callback.h b/services/data_process/include/pipeline_node/multimedia_codec/encoder/encode_video_callback.h index 4f2d93f3..aec5c70c 100644 --- a/services/data_process/include/pipeline_node/multimedia_codec/encoder/encode_video_callback.h +++ b/services/data_process/include/pipeline_node/multimedia_codec/encoder/encode_video_callback.h @@ -18,7 +18,7 @@ #include "avcodec_errors.h" #include "avcodec_common.h" -#include "format.h" +#include "meta/format.h" #include "encode_data_process.h" @@ -33,10 +33,10 @@ public: ~EncodeVideoCallback() override = default; void OnError(MediaAVCodec::AVCodecErrorType errorType, int32_t errorCode) override; - void OnInputBufferAvailable(uint32_t index, std::shared_ptr buffer) override; - void OnOutputFormatChanged(const MediaAVCodec::Format &format) override; + void OnInputBufferAvailable(uint32_t index, std::shared_ptr buffer) override; + void OnOutputFormatChanged(const Media::Format &format) override; void OnOutputBufferAvailable(uint32_t index, MediaAVCodec::AVCodecBufferInfo info, - MediaAVCodec::AVCodecBufferFlag flag, std::shared_ptr buffer) override; + MediaAVCodec::AVCodecBufferFlag flag, std::shared_ptr buffer) override; private: std::weak_ptr encodeVideoNode_; }; diff --git a/services/data_process/src/pipeline_node/multimedia_codec/decoder/decode_data_process.cpp b/services/data_process/src/pipeline_node/multimedia_codec/decoder/decode_data_process.cpp index 60edcbce..f5e3f452 100644 --- a/services/data_process/src/pipeline_node/multimedia_codec/decoder/decode_data_process.cpp +++ b/services/data_process/src/pipeline_node/multimedia_codec/decoder/decode_data_process.cpp @@ -179,7 +179,7 @@ int32_t DecodeDataProcess::InitDecoderMetadataFormat() return DCAMERA_NOT_FOUND; } - metadataFormat_.PutIntValue("pixel_format", MediaAVCodec::VideoPixelFormat::NV12); + metadataFormat_.PutIntValue("pixel_format", static_cast(MediaAVCodec::VideoPixelFormat::NV12)); metadataFormat_.PutStringValue("codec_mime", processType_); metadataFormat_.PutIntValue("width", sourceConfig_.GetWidth()); metadataFormat_.PutIntValue("height", sourceConfig_.GetHeight()); @@ -344,7 +344,7 @@ void DecodeDataProcess::ReleaseProcessNode() processType_ = ""; std::queue>().swap(inputBuffersQueue_); std::queue().swap(availableInputIndexsQueue_); - std::queue>().swap(availableInputBufferQueue_); + std::queue>().swap(availableInputBufferQueue_); std::deque().swap(frameInfoDeque_); waitDecoderOutputCount_ = 0; lastFeedDecoderInputBufferTimeUs_ = 0; @@ -443,7 +443,7 @@ int32_t DecodeDataProcess::FeedDecoderInputBuffer() return DCAMERA_OK; } uint32_t index = availableInputIndexsQueue_.front(); - std::shared_ptr sharedMemoryInput = availableInputBufferQueue_.front(); + std::shared_ptr sharedMemoryInput = availableInputBufferQueue_.front(); if (sharedMemoryInput == nullptr) { DHLOGE("Failed to obtain the input shared memory corresponding to the [%u] index.", index); return DCAMERA_BAD_VALUE; @@ -711,7 +711,7 @@ void DecodeDataProcess::OnError() targetPipelineSource->OnError(DataProcessErrorType::ERROR_PIPELINE_DECODER); } -void DecodeDataProcess::OnInputBufferAvailable(uint32_t index, std::shared_ptr buffer) +void DecodeDataProcess::OnInputBufferAvailable(uint32_t index, std::shared_ptr buffer) { DHLOGD("DecodeDataProcess::OnInputBufferAvailable"); std::lock_guard lck(mtxHoldCount_); @@ -724,7 +724,7 @@ void DecodeDataProcess::OnInputBufferAvailable(uint32_t index, std::shared_ptr buffer) + const MediaAVCodec::AVCodecBufferFlag& flag, std::shared_ptr buffer) { int64_t finishDecodeT = GetNowTimeStampUs(); if (!isDecoderProcess_.load()) { diff --git a/services/data_process/src/pipeline_node/multimedia_codec/decoder/decode_data_process_common.cpp b/services/data_process/src/pipeline_node/multimedia_codec/decoder/decode_data_process_common.cpp index f78cfbf7..2185a99f 100644 --- a/services/data_process/src/pipeline_node/multimedia_codec/decoder/decode_data_process_common.cpp +++ b/services/data_process/src/pipeline_node/multimedia_codec/decoder/decode_data_process_common.cpp @@ -181,19 +181,19 @@ int32_t DecodeDataProcess::InitDecoderMetadataFormat() DHLOGI("Init video decoder metadata format. videoformat: %d", processedConfig_.GetVideoformat()); switch (processedConfig_.GetVideoformat()) { case Videoformat::YUVI420: - metadataFormat_.PutIntValue("pixel_format", MediaAVCodec::VideoPixelFormat::YUVI420); + metadataFormat_.PutIntValue("pixel_format", static_cast(MediaAVCodec::VideoPixelFormat::YUVI420)); metadataFormat_.PutIntValue("max_input_size", MAX_YUV420_BUFFER_SIZE); break; case Videoformat::NV12: - metadataFormat_.PutIntValue("pixel_format", MediaAVCodec::VideoPixelFormat::NV12); + metadataFormat_.PutIntValue("pixel_format", static_cast(MediaAVCodec::VideoPixelFormat::NV12)); metadataFormat_.PutIntValue("max_input_size", MAX_YUV420_BUFFER_SIZE); break; case Videoformat::NV21: - metadataFormat_.PutIntValue("pixel_format", MediaAVCodec::VideoPixelFormat::NV21); + metadataFormat_.PutIntValue("pixel_format", static_cast(MediaAVCodec::VideoPixelFormat::NV21)); metadataFormat_.PutIntValue("max_input_size", MAX_YUV420_BUFFER_SIZE); break; case Videoformat::RGBA_8888: - metadataFormat_.PutIntValue("pixel_format", MediaAVCodec::VideoPixelFormat::RGBA); + metadataFormat_.PutIntValue("pixel_format", static_cast(MediaAVCodec::VideoPixelFormat::RGBA)); metadataFormat_.PutIntValue("max_input_size", MAX_RGB32_BUFFER_SIZE); break; default: @@ -365,7 +365,7 @@ void DecodeDataProcess::ReleaseProcessNode() processType_ = ""; std::queue>().swap(inputBuffersQueue_); std::queue().swap(availableInputIndexsQueue_); - std::queue>().swap(availableInputBufferQueue_); + std::queue>().swap(availableInputBufferQueue_); std::deque().swap(frameInfoDeque_); waitDecoderOutputCount_ = 0; lastFeedDecoderInputBufferTimeUs_ = 0; @@ -464,7 +464,7 @@ int32_t DecodeDataProcess::FeedDecoderInputBuffer() return DCAMERA_OK; } uint32_t index = availableInputIndexsQueue_.front(); - std::shared_ptr sharedMemoryInput = availableInputBufferQueue_.front(); + std::shared_ptr sharedMemoryInput = availableInputBufferQueue_.front(); if (sharedMemoryInput == nullptr) { DHLOGE("Failed to obtain the input shared memory corresponding to the [%u] index.", index); return DCAMERA_BAD_VALUE; @@ -712,7 +712,7 @@ void DecodeDataProcess::OnError() targetPipelineSource->OnError(DataProcessErrorType::ERROR_PIPELINE_DECODER); } -void DecodeDataProcess::OnInputBufferAvailable(uint32_t index, std::shared_ptr buffer) +void DecodeDataProcess::OnInputBufferAvailable(uint32_t index, std::shared_ptr buffer) { DHLOGD("DecodeDataProcess::OnInputBufferAvailable"); std::lock_guard lck(mtxHoldCount_); @@ -725,7 +725,7 @@ void DecodeDataProcess::OnInputBufferAvailable(uint32_t index, std::shared_ptr buffer) + const MediaAVCodec::AVCodecBufferFlag& flag, std::shared_ptr buffer) { int64_t finishDecodeT = GetNowTimeStampUs(); if (!isDecoderProcess_.load()) { diff --git a/services/data_process/src/pipeline_node/multimedia_codec/decoder/decode_video_callback.cpp b/services/data_process/src/pipeline_node/multimedia_codec/decoder/decode_video_callback.cpp index b0391d92..12fb2acd 100644 --- a/services/data_process/src/pipeline_node/multimedia_codec/decoder/decode_video_callback.cpp +++ b/services/data_process/src/pipeline_node/multimedia_codec/decoder/decode_video_callback.cpp @@ -30,7 +30,7 @@ void DecodeVideoCallback::OnError(MediaAVCodec::AVCodecErrorType errorType, int3 targetDecoderNode->OnError(); } -void DecodeVideoCallback::OnInputBufferAvailable(uint32_t index, std::shared_ptr buffer) +void DecodeVideoCallback::OnInputBufferAvailable(uint32_t index, std::shared_ptr buffer) { DHLOGD("DecodeVideoCallback : OnInputBufferAvailable."); std::shared_ptr targetDecoderNode = decodeVideoNode_.lock(); @@ -41,7 +41,7 @@ void DecodeVideoCallback::OnInputBufferAvailable(uint32_t index, std::shared_ptr targetDecoderNode->OnInputBufferAvailable(index, buffer); } -void DecodeVideoCallback::OnOutputFormatChanged(const MediaAVCodec::Format &format) +void DecodeVideoCallback::OnOutputFormatChanged(const Media::Format &format) { DHLOGD("DecodeVideoCallback : OnOutputFormatChanged."); std::shared_ptr targetDecoderNode = decodeVideoNode_.lock(); @@ -53,7 +53,7 @@ void DecodeVideoCallback::OnOutputFormatChanged(const MediaAVCodec::Format &form } void DecodeVideoCallback::OnOutputBufferAvailable(uint32_t index, MediaAVCodec::AVCodecBufferInfo info, - MediaAVCodec::AVCodecBufferFlag flag, std::shared_ptr buffer) + MediaAVCodec::AVCodecBufferFlag flag, std::shared_ptr buffer) { DHLOGD("DecodeVideoCallback : OnOutputBufferAvailable. Only relaese buffer when using surface output."); std::shared_ptr targetDecoderNode = decodeVideoNode_.lock(); diff --git a/services/data_process/src/pipeline_node/multimedia_codec/encoder/encode_data_process.cpp b/services/data_process/src/pipeline_node/multimedia_codec/encoder/encode_data_process.cpp index 72371212..36dff26b 100644 --- a/services/data_process/src/pipeline_node/multimedia_codec/encoder/encode_data_process.cpp +++ b/services/data_process/src/pipeline_node/multimedia_codec/encoder/encode_data_process.cpp @@ -188,19 +188,19 @@ int32_t EncodeDataProcess::InitEncoderMetadataFormat() } switch (sourceConfig_.GetVideoformat()) { case Videoformat::YUVI420: - metadataFormat_.PutIntValue("pixel_format", MediaAVCodec::VideoPixelFormat::YUVI420); + metadataFormat_.PutIntValue("pixel_format", static_cast(MediaAVCodec::VideoPixelFormat::YUVI420)); metadataFormat_.PutLongValue("max_input_size", NORM_YUV420_BUFFER_SIZE); break; case Videoformat::NV12: - metadataFormat_.PutIntValue("pixel_format", MediaAVCodec::VideoPixelFormat::NV12); + metadataFormat_.PutIntValue("pixel_format", static_cast(MediaAVCodec::VideoPixelFormat::NV12)); metadataFormat_.PutLongValue("max_input_size", NORM_YUV420_BUFFER_SIZE); break; case Videoformat::NV21: - metadataFormat_.PutIntValue("pixel_format", MediaAVCodec::VideoPixelFormat::NV21); + metadataFormat_.PutIntValue("pixel_format", static_cast(MediaAVCodec::VideoPixelFormat::NV21)); metadataFormat_.PutLongValue("max_input_size", NORM_YUV420_BUFFER_SIZE); break; case Videoformat::RGBA_8888: - metadataFormat_.PutIntValue("pixel_format", MediaAVCodec::VideoPixelFormat::RGBA); + metadataFormat_.PutIntValue("pixel_format", static_cast(MediaAVCodec::VideoPixelFormat::RGBA)); metadataFormat_.PutLongValue("max_input_size", NORM_RGB32_BUFFER_SIZE); break; default: @@ -473,7 +473,7 @@ void EncodeDataProcess::ReduceWaitEncodeCnt() } int32_t EncodeDataProcess::GetEncoderOutputBuffer(uint32_t index, MediaAVCodec::AVCodecBufferInfo info, - MediaAVCodec::AVCodecBufferFlag flag, std::shared_ptr& buffer) + MediaAVCodec::AVCodecBufferFlag flag, std::shared_ptr& buffer) { DHLOGD("Get encoder output buffer."); if (videoEncoder_ == nullptr) { @@ -559,12 +559,12 @@ void EncodeDataProcess::OnError() targetPipelineSink->OnError(DataProcessErrorType::ERROR_PIPELINE_ENCODER); } -void EncodeDataProcess::OnInputBufferAvailable(uint32_t index, std::shared_ptr buffer) +void EncodeDataProcess::OnInputBufferAvailable(uint32_t index, std::shared_ptr buffer) { DHLOGD("The available input buffer index : %u. No operation when using surface input.", index); } -void EncodeDataProcess::OnOutputFormatChanged(const MediaAVCodec::Format &format) +void EncodeDataProcess::OnOutputFormatChanged(const Media::Format &format) { if (encodeOutputFormat_.GetFormatMap().empty()) { DHLOGE("The first changed video encoder output format is null."); @@ -574,7 +574,7 @@ void EncodeDataProcess::OnOutputFormatChanged(const MediaAVCodec::Format &format } void EncodeDataProcess::OnOutputBufferAvailable(uint32_t index, MediaAVCodec::AVCodecBufferInfo info, - MediaAVCodec::AVCodecBufferFlag flag, std::shared_ptr buffer) + MediaAVCodec::AVCodecBufferFlag flag, std::shared_ptr buffer) { if (!isEncoderProcess_.load()) { DHLOGE("EncodeNode occurred error or start release."); diff --git a/services/data_process/src/pipeline_node/multimedia_codec/encoder/encode_video_callback.cpp b/services/data_process/src/pipeline_node/multimedia_codec/encoder/encode_video_callback.cpp index 8d8036e0..9d57bca5 100644 --- a/services/data_process/src/pipeline_node/multimedia_codec/encoder/encode_video_callback.cpp +++ b/services/data_process/src/pipeline_node/multimedia_codec/encoder/encode_video_callback.cpp @@ -29,7 +29,7 @@ void EncodeVideoCallback::OnError(MediaAVCodec::AVCodecErrorType errorType, int3 targetEncoderNode->OnError(); } -void EncodeVideoCallback::OnInputBufferAvailable(uint32_t index, std::shared_ptr buffer) +void EncodeVideoCallback::OnInputBufferAvailable(uint32_t index, std::shared_ptr buffer) { DHLOGD("EncodeVideoCallback : OnInputBufferAvailable. No operation when using surface input."); std::shared_ptr targetEncoderNode = encodeVideoNode_.lock(); @@ -40,7 +40,7 @@ void EncodeVideoCallback::OnInputBufferAvailable(uint32_t index, std::shared_ptr targetEncoderNode->OnInputBufferAvailable(index, buffer); } -void EncodeVideoCallback::OnOutputFormatChanged(const MediaAVCodec::Format &format) +void EncodeVideoCallback::OnOutputFormatChanged(const Media::Format &format) { DHLOGD("EncodeVideoCallback : OnOutputFormatChanged."); std::shared_ptr targetEncoderNode = encodeVideoNode_.lock(); @@ -52,7 +52,7 @@ void EncodeVideoCallback::OnOutputFormatChanged(const MediaAVCodec::Format &form } void EncodeVideoCallback::OnOutputBufferAvailable(uint32_t index, MediaAVCodec::AVCodecBufferInfo info, - MediaAVCodec::AVCodecBufferFlag flag, std::shared_ptr buffer) + MediaAVCodec::AVCodecBufferFlag flag, std::shared_ptr buffer) { DHLOGD("EncodeVideoCallback : OnOutputBufferAvailable."); std::shared_ptr targetEncoderNode = encodeVideoNode_.lock(); diff --git a/services/data_process/test/unittest/common/pipeline_node/BUILD.gn b/services/data_process/test/unittest/common/pipeline_node/BUILD.gn index 26de7b6d..d7e47eb9 100644 --- a/services/data_process/test/unittest/common/pipeline_node/BUILD.gn +++ b/services/data_process/test/unittest/common/pipeline_node/BUILD.gn @@ -68,7 +68,6 @@ ohos_unittest("DCameraDataProcessPipelineNodeTest") { ] external_deps = [ - "av_codec:av_codec_client", "c_utils:utils", "drivers_interface_display:libdisplay_composer_proxy_1.0", "eventhandler:libeventhandler", @@ -76,6 +75,8 @@ ohos_unittest("DCameraDataProcessPipelineNodeTest") { "hitrace:hitrace_meter", ] + public_external_deps = [ "av_codec:av_codec_client" ] + defines = [ "HI_LOG_ENABLE", "DH_LOG_TAG=\"DCameraDataProcessPipelineNodeTest\"", diff --git a/services/data_process/test/unittest/common/pipeline_node/decode_data_process_test.cpp b/services/data_process/test/unittest/common/pipeline_node/decode_data_process_test.cpp index a89f869d..f1c9af89 100644 --- a/services/data_process/test/unittest/common/pipeline_node/decode_data_process_test.cpp +++ b/services/data_process/test/unittest/common/pipeline_node/decode_data_process_test.cpp @@ -429,7 +429,7 @@ HWTEST_F(DecodeDataProcessTest, decode_data_process_test_012, TestSize.Level1) EXPECT_EQ(rc, DCAMERA_OK); uint32_t index = 1; - std::shared_ptr buffer = nullptr; + std::shared_ptr buffer = nullptr; testDecodeDataProcess_->OnInputBufferAvailable(index, buffer); size_t capacity = 100; std::vector> inputBuffers; @@ -583,9 +583,9 @@ HWTEST_F(DecodeDataProcessTest, decode_data_process_test_016, TestSize.Level1) EXPECT_EQ(rc, DCAMERA_OK); uint32_t index = 1; - std::shared_ptr buffer = nullptr; + std::shared_ptr buffer = nullptr; testDecodeDataProcess_->OnInputBufferAvailable(index, buffer); - MediaAVCodec::Format format; + Media::Format format; testDecodeDataProcess_->OnOutputFormatChanged(format); MediaAVCodec::AVCodecBufferInfo info; MediaAVCodec::AVCodecBufferFlag flag = MediaAVCodec::AVCODEC_BUFFER_FLAG_CODEC_DATA; diff --git a/services/data_process/test/unittest/common/pipeline_node/encode_data_process_test.cpp b/services/data_process/test/unittest/common/pipeline_node/encode_data_process_test.cpp index c54bb10e..6742e64c 100644 --- a/services/data_process/test/unittest/common/pipeline_node/encode_data_process_test.cpp +++ b/services/data_process/test/unittest/common/pipeline_node/encode_data_process_test.cpp @@ -438,7 +438,7 @@ HWTEST_F(EncodeDataProcessTest, encode_data_process_test_013, TestSize.Level1) testEncodeDataProcess_->ReduceWaitEncodeCnt(); uint32_t index = time; MediaAVCodec::AVCodecBufferInfo info; - std::shared_ptr buffer = nullptr; + std::shared_ptr buffer = nullptr; MediaAVCodec::AVCodecBufferFlag flag = MediaAVCodec::AVCODEC_BUFFER_FLAG_CODEC_DATA; int32_t rc = testEncodeDataProcess_->GetEncoderOutputBuffer(index, info, flag, buffer); EXPECT_EQ(rc, DCAMERA_BAD_VALUE); @@ -495,11 +495,11 @@ HWTEST_F(EncodeDataProcessTest, encode_data_process_test_015, TestSize.Level1) uint32_t index = 0; MediaAVCodec::AVCodecBufferInfo info; MediaAVCodec::AVCodecBufferFlag flag = MediaAVCodec::AVCODEC_BUFFER_FLAG_CODEC_DATA; - std::shared_ptr buffer = nullptr; + std::shared_ptr buffer = nullptr; testEncodeDataProcess_->OnOutputBufferAvailable(index, info, flag, buffer); testEncodeDataProcess_->OnError(); testEncodeDataProcess_->OnInputBufferAvailable(index, buffer); - MediaAVCodec::Format format; + Media::Format format; testEncodeDataProcess_->OnOutputFormatChanged(format); testEncodeDataProcess_->OnOutputBufferAvailable(index, info, flag, buffer); EXPECT_EQ(rc, DCAMERA_OK); -- Gitee From d6ff90eb1b0b7ce7f6df57bfd069db5e40c814d7 Mon Sep 17 00:00:00 2001 From: linziming Date: Tue, 19 Dec 2023 07:40:52 +0000 Subject: [PATCH 2/4] =?UTF-8?q?=E5=8F=96=E6=B6=88=E4=BD=BF=E7=94=A8public?= =?UTF-8?q?=5Fexternal=5Fdeps?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: linziming --- bundle.json | 1 + .../sinkfuzztest/encodeoninputbufferavailable_fuzzer/BUILD.gn | 4 ++-- .../encodeonoutputbufferavailable_fuzzer/BUILD.gn | 4 ++-- .../decodeoninputbufferavailable_fuzzer/BUILD.gn | 4 ++-- .../decodeonoutputbufferavailable_fuzzer/BUILD.gn | 4 ++-- services/data_process/BUILD.gn | 4 ++-- .../data_process/test/unittest/common/pipeline_node/BUILD.gn | 4 ++-- 7 files changed, 13 insertions(+), 12 deletions(-) diff --git a/bundle.json b/bundle.json index 04256ac6..5745353a 100644 --- a/bundle.json +++ b/bundle.json @@ -44,6 +44,7 @@ "c_utils", "dsoftbus", "hicollie", + "histreamer", "hisysevent", "hilog", "samgr", diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/encodeoninputbufferavailable_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/encodeoninputbufferavailable_fuzzer/BUILD.gn index 75efa96d..39c5b5d7 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/encodeoninputbufferavailable_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/encodeoninputbufferavailable_fuzzer/BUILD.gn @@ -68,14 +68,14 @@ ohos_fuzztest("EncodeOnInputBufferAvailableFuzzTest") { ] external_deps = [ + "av_codec:av_codec_client", "c_utils:utils", "drivers_interface_display:libdisplay_composer_proxy_1.0", "eventhandler:libeventhandler", "graphic_2d:surface", + "histreamer:media_foundation", "hitrace:hitrace_meter", ] - - public_external_deps = [ "av_codec:av_codec_client" ] } ############################################################################### diff --git a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/encodeonoutputbufferavailable_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/encodeonoutputbufferavailable_fuzzer/BUILD.gn index 590b56e9..c576c1ca 100644 --- a/interfaces/inner_kits/native_cpp/test/sinkfuzztest/encodeonoutputbufferavailable_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sinkfuzztest/encodeonoutputbufferavailable_fuzzer/BUILD.gn @@ -68,14 +68,14 @@ ohos_fuzztest("EncodeOnOutputBufferAvailableFuzzTest") { ] external_deps = [ + "av_codec:av_codec_client", "c_utils:utils", "drivers_interface_display:libdisplay_composer_proxy_1.0", "eventhandler:libeventhandler", "graphic_2d:surface", + "histreamer:media_foundation", "hitrace:hitrace_meter", ] - - public_external_deps = [ "av_codec:av_codec_client" ] } ############################################################################### diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/decodeoninputbufferavailable_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/decodeoninputbufferavailable_fuzzer/BUILD.gn index dec7e996..4b4ddb4a 100644 --- a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/decodeoninputbufferavailable_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/decodeoninputbufferavailable_fuzzer/BUILD.gn @@ -68,13 +68,13 @@ ohos_fuzztest("DecodeOnInputBufferAvailableFuzzTest") { ] external_deps = [ + "av_codec:av_codec_client", "c_utils:utils", "eventhandler:libeventhandler", "graphic_2d:surface", + "histreamer:media_foundation", "hitrace:hitrace_meter", ] - - public_external_deps = [ "av_codec:av_codec_client" ] } ############################################################################### diff --git a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/decodeonoutputbufferavailable_fuzzer/BUILD.gn b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/decodeonoutputbufferavailable_fuzzer/BUILD.gn index 1cc0977a..e815286e 100644 --- a/interfaces/inner_kits/native_cpp/test/sourcefuzztest/decodeonoutputbufferavailable_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/test/sourcefuzztest/decodeonoutputbufferavailable_fuzzer/BUILD.gn @@ -68,13 +68,13 @@ ohos_fuzztest("DecodeOnOutputBufferAvailableFuzzTest") { ] external_deps = [ + "av_codec:av_codec_client", "c_utils:utils", "eventhandler:libeventhandler", "graphic_2d:surface", + "histreamer:media_foundation", "hitrace:hitrace_meter", ] - - public_external_deps = [ "av_codec:av_codec_client" ] } ############################################################################### diff --git a/services/data_process/BUILD.gn b/services/data_process/BUILD.gn index 2a191122..596d55a9 100644 --- a/services/data_process/BUILD.gn +++ b/services/data_process/BUILD.gn @@ -102,17 +102,17 @@ ohos_shared_library("distributed_camera_data_process") { } external_deps = [ + "av_codec:av_codec_client", "c_utils:utils", "drivers_interface_display:libdisplay_composer_proxy_1.0", "eventhandler:libeventhandler", "graphic_2d:surface", + "histreamer:media_foundation", "hitrace:hitrace_meter", "safwk:system_ability_fwk", "samgr:samgr_proxy", ] - public_external_deps = [ "av_codec:av_codec_client" ] - if (!distributed_camera_common) { external_deps += [ "libyuv:yuv" ] } diff --git a/services/data_process/test/unittest/common/pipeline_node/BUILD.gn b/services/data_process/test/unittest/common/pipeline_node/BUILD.gn index d7e47eb9..eed0319c 100644 --- a/services/data_process/test/unittest/common/pipeline_node/BUILD.gn +++ b/services/data_process/test/unittest/common/pipeline_node/BUILD.gn @@ -68,15 +68,15 @@ ohos_unittest("DCameraDataProcessPipelineNodeTest") { ] external_deps = [ + "av_codec:av_codec_client", "c_utils:utils", "drivers_interface_display:libdisplay_composer_proxy_1.0", "eventhandler:libeventhandler", "graphic_2d:surface", + "histreamer:media_foundation", "hitrace:hitrace_meter", ] - public_external_deps = [ "av_codec:av_codec_client" ] - defines = [ "HI_LOG_ENABLE", "DH_LOG_TAG=\"DCameraDataProcessPipelineNodeTest\"", -- Gitee From 4bac53da24ffcaa5ff87fae88cc8ce8ba06216bc Mon Sep 17 00:00:00 2001 From: "yaoruozi1@huawei.com" Date: Tue, 19 Dec 2023 21:26:35 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9UT?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yaoruozi1@huawei.com --- .../camera_sink/dcamera_sink_handler_test.cpp | 24 +++++++------------ 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/interfaces/inner_kits/native_cpp/test/unittest/common/camera_sink/dcamera_sink_handler_test.cpp b/interfaces/inner_kits/native_cpp/test/unittest/common/camera_sink/dcamera_sink_handler_test.cpp index 33fe6cfe..cc2aaa39 100644 --- a/interfaces/inner_kits/native_cpp/test/unittest/common/camera_sink/dcamera_sink_handler_test.cpp +++ b/interfaces/inner_kits/native_cpp/test/unittest/common/camera_sink/dcamera_sink_handler_test.cpp @@ -46,7 +46,6 @@ public: static void TearDownTestCase(void); void SetUp(); void TearDown(); - void SetTokenID(); }; namespace { @@ -65,21 +64,12 @@ void DCameraSinkHandlerTest::TearDownTestCase(void) void DCameraSinkHandlerTest::SetUp(void) { DHLOGI("enter"); -} - -void DCameraSinkHandlerTest::TearDown(void) -{ - DHLOGI("enter"); -} - -void DCameraSinkHandlerTest::SetTokenID() -{ uint64_t tokenId; int32_t numberOfPermissions = 3; const char *perms[numberOfPermissions]; perms[0] = "ohos.permission.ENABLE_DISTRIBUTED_HARDWARE"; - perms[1] = "ohos.permission.DISTRIBUTED_DATASYNC"; - perms[2] = "ohos.permission.CAMERA"; + perms[1] = OHOS_PERMISSION_DISTRIBUTED_DATASYNC; + perms[2] = "ohos.permission.ACCESS_DISTRIBUTED_HARDWARE"; NativeTokenInfoParams infoInstance = { .dcapsNum = 0, .permsNum = numberOfPermissions, @@ -87,7 +77,7 @@ void DCameraSinkHandlerTest::SetTokenID() .dcaps = NULL, .perms = perms, .acls = NULL, - .processName = "dcamera_client_demo", + .processName = "dcamera_sink_handler", .aplStr = "system_basic", }; tokenId = GetAccessTokenId(&infoInstance); @@ -95,6 +85,12 @@ void DCameraSinkHandlerTest::SetTokenID() OHOS::Security::AccessToken::AccessTokenKit::ReloadNativeTokenInfo(); } +void DCameraSinkHandlerTest::TearDown(void) +{ + DHLOGI("enter"); +} + + /** * @tc.name: dcamera_sink_handler_test_001 * @tc.desc: Verify the InitSource function. @@ -117,7 +113,6 @@ HWTEST_F(DCameraSinkHandlerTest, dcamera_sink_handler_test_001, TestSize.Level1) HWTEST_F(DCameraSinkHandlerTest, dcamera_sink_handler_test_002, TestSize.Level1) { std::string params = "test002"; - SetTokenID(); int32_t ret = DCameraSinkHandler::GetInstance().InitSink(params); EXPECT_EQ(DCAMERA_OK, ret); @@ -190,7 +185,6 @@ HWTEST_F(DCameraSinkHandlerTest, dcamera_sink_handler_test_005, TestSize.Level1) HWTEST_F(DCameraSinkHandlerTest, dcamera_sink_handler_test_006, TestSize.Level1) { std::string params = "test006"; - SetTokenID(); int32_t systemAbilityId = 4804; sptr loadCallback(new DCameraSinkLoadCallback(params)); loadCallback->OnLoadSystemAbilityFail(systemAbilityId); -- Gitee From 8fde65a51a9e38a0ce60b1fc9014731f10cd753d Mon Sep 17 00:00:00 2001 From: "yaoruozi1@huawei.com" Date: Wed, 20 Dec 2023 09:42:00 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9UT?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yaoruozi1@huawei.com --- .../unittest/common/camera_sink/dcamera_sink_handler_test.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/interfaces/inner_kits/native_cpp/test/unittest/common/camera_sink/dcamera_sink_handler_test.cpp b/interfaces/inner_kits/native_cpp/test/unittest/common/camera_sink/dcamera_sink_handler_test.cpp index cc2aaa39..84974e09 100644 --- a/interfaces/inner_kits/native_cpp/test/unittest/common/camera_sink/dcamera_sink_handler_test.cpp +++ b/interfaces/inner_kits/native_cpp/test/unittest/common/camera_sink/dcamera_sink_handler_test.cpp @@ -90,7 +90,6 @@ void DCameraSinkHandlerTest::TearDown(void) DHLOGI("enter"); } - /** * @tc.name: dcamera_sink_handler_test_001 * @tc.desc: Verify the InitSource function. -- Gitee