From e7fde75729c7778430eebe076945d9871a4cdc6d Mon Sep 17 00:00:00 2001 From: wangchaole Date: Wed, 15 Feb 2023 10:03:47 +0800 Subject: [PATCH] fix: merge dcamera client Signed-off-by: wangchaole --- figures/distributedcamera_arch.png | Bin 101997 -> 102170 bytes .../dcamera_source_handler_test.cpp | 2 +- .../cameraoperator/client/BUILD.gn | 6 +- .../client/src/dcamera_client.cpp | 70 +- .../client/src/dcamera_client_common.cpp | 631 ------------------ 5 files changed, 23 insertions(+), 686 deletions(-) delete mode 100644 services/cameraservice/cameraoperator/client/src/dcamera_client_common.cpp diff --git a/figures/distributedcamera_arch.png b/figures/distributedcamera_arch.png index ed769ce56875747c86851dd4157fd82745eb8f26..fdffabcc739952de65f5d137a2793044ef0ebdca 100644 GIT binary patch delta 17621 zcmZU)2T)T_*f)wOSR!Hr6hu%&rP~k%0TDp~5u_6cC`b)Oh0w{Nhy^K1ReF&cLazy- z3Mehqgc?BU2?;H!v|OuM-IGx zqM2e+tVLNmLE#!jnKV9nl92JK$+S2iiQ^DnI^(j*Lq%+m@a5c3dIo1X9xr@Np(yOx z*)?4~bR?m{b{k2(=;=B8BVqg~qhqa8HNM3006gyLfiu9v+9SSuIl9-+wqMnfEE!J+ z|8&d-&dWB+&8{qb;{Btu$3h8=$0X!TziPMAQ}I;+uweSiM%YmCTC%!7X|a(y?c zQzV=(>Q(ax))gmhnc6Dds<0&V$oW4BHy0lR;+3&AZgY;ylZ}pJ)g?Q0a!yjx1zNn- zvKjDpw2UCO@TV_k;+Q+(A7t?L$Jg4_zGvI4_@}~Ghn25;1D9L9;`Qi&?`O_B=0_3^ zDVN+M*^Hg#Gu)9?HosuxmXY(muQZCm2O71B`~0cz|9>(KHL>v{&MONvP6_{u>N626BKqO>&l1U zx+mREpUJYK34LutY?(OZedZrRS_=B>!f1RtC6)(235K-18eAupslB54EW)S~j8Iog zb-h~dmhxCF`V))FDAl8b6!KX%;fo=-J=0&Fddy^;C30|$zyiD6KC){C9165_$~zI5 z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NFP+^L!)J*m8EXj+ zDOeHDbdK$D$HQG^jpq<9s+Vvx+lR%^upD9jo_}%D1J8W_W-6yzUA;Zk+S`0^TlC%^ ziHc^?QrOQ6!Nf$+3wHcFK742jo>%K+5gIGmajP`W0DZc zm-9alwP!92+w|E#F}*1FO!&>}T<>UWCcnjy+O-C+>ZTSHqUgCs7f(=5H&OEFN1+#) z;x<0i&JqF~JMr$|7Bmf?4%$EIfEgj$KNkO@(CP&mj&)LL|LZ=E7Pw))TJPnA{PS>C z%%oVu{Y|a(Kp>kcM&l~vIR9y0>eg6qR;yI_nwu*`jn_%mbXwCwHI+YkOs8&lkxl8o zstO*;8d;UMJ76Q%7Jc|b-PzquZ&*pn=+;n}k&arzLlrkA3WL5;ryUl%+j4FCtuB=Hb2K=3I zmAG|F9du*nfB3H~&>3|KHoaI%Dt_czCKls;P@|fv5X<+V^obZ2m+~Mtt>NO0RTbc{ zvhmWfrr?jn_y3nf@4OZov1h(}JCd=*JlQ!wPJ=(qf7}&0pZ^U|A1v2}7Sy}O8sw&(iOjp@E(@_4n3eqr%jl{Y^jS+4kkV&v^Skj6jXY0 z@I*xS+e@Ou-J}!euVnN`2LJC->DZZiAeK}S-_Uw`W%oaG7#&@)WY?Z0;s~@r z%S<2~bRmv?O5h&kBbWc8MMsB^hzPE$tK$Lp7(BMB_h$Kjc70uJ^uvN1qA+Q1gN*Z_ a0lEKYS9|Oenbg$;lJIo(b6Mw<&;$S&$blyS diff --git a/interfaces/inner_kits/native_cpp/test/unittest/common/camera_source/dcamera_source_handler_test.cpp b/interfaces/inner_kits/native_cpp/test/unittest/common/camera_source/dcamera_source_handler_test.cpp index 549fedeb..d11abb9f 100644 --- a/interfaces/inner_kits/native_cpp/test/unittest/common/camera_source/dcamera_source_handler_test.cpp +++ b/interfaces/inner_kits/native_cpp/test/unittest/common/camera_source/dcamera_source_handler_test.cpp @@ -133,7 +133,7 @@ HWTEST_F(DCameraSourceHandlerTest, dcamera_source_handler_test_004, TestSize.Lev int32_t ret = DCameraSourceHandler::GetInstance().UnregisterDistributedHardware(devId, dhId, uncallback); ret = DCameraSourceHandler::GetInstance().ReleaseSource(); - EXPECT_NE(DCAMERA_OK, ret); + EXPECT_EQ(DCAMERA_OK, ret); } /** diff --git a/services/cameraservice/cameraoperator/client/BUILD.gn b/services/cameraservice/cameraoperator/client/BUILD.gn index d01bd7a0..d513c1af 100644 --- a/services/cameraservice/cameraoperator/client/BUILD.gn +++ b/services/cameraservice/cameraoperator/client/BUILD.gn @@ -51,11 +51,7 @@ ohos_shared_library("distributed_camera_client") { "src/listener/dcamera_photo_surface_listener.cpp", ] - if (!distributed_camera_common) { - sources += [ "src/dcamera_client.cpp" ] - } else { - sources += [ "src/dcamera_client_common.cpp" ] - } + sources += [ "src/dcamera_client.cpp" ] deps = [ "${camerastandard_path}/frameworks/native/camera:camera_framework", diff --git a/services/cameraservice/cameraoperator/client/src/dcamera_client.cpp b/services/cameraservice/cameraoperator/client/src/dcamera_client.cpp index 364cec1e..f369e15b 100644 --- a/services/cameraservice/cameraoperator/client/src/dcamera_client.cpp +++ b/services/cameraservice/cameraoperator/client/src/dcamera_client.cpp @@ -174,7 +174,7 @@ int32_t DCameraClient::StartCapture(std::vector& surface) { DHLOGI("DCameraClient::StartCapture cameraId: %s", GetAnonyString(cameraId_).c_str()); - if ((photoOutput_ == nullptr) && (videoOutput_ == nullptr)) { + if ((photoOutput_ == nullptr) && (previewOutput_ == nullptr)) { DHLOGI("DCameraClient::StartCapture %s config capture session", GetAnonyString(cameraId_).c_str()); if (surface == nullptr) { DHLOGE("DCameraClient::StartCapture: input surface is nullptr."); @@ -190,7 +190,7 @@ int32_t DCameraClient::StartCapture(std::vectorisCapture_)) { + if ((info->streamType_ == CONTINUOUS_FRAME) || (!info->isCapture_)) { continue; } int32_t ret = StartCaptureInner(info); @@ -217,32 +217,6 @@ int32_t DCameraClient::CameraServiceErrorType(const int32_t errorType) int32_t DCameraClient::StopCapture() { DHLOGI("DCameraClient::StopCapture cameraId: %s", GetAnonyString(cameraId_).c_str()); - if (videoOutput_ != nullptr) { - DHLOGI("DCameraClient::StopCapture %s stop videoOutput", GetAnonyString(cameraId_).c_str()); - int32_t ret = ((sptr &)videoOutput_)->Stop(); - if (ret != DCAMERA_OK) { - DHLOGE("DCameraClient::StopCapture videoOutput stop failed, cameraId: %s, ret: %d", - GetAnonyString(cameraId_).c_str(), ret); - } - DHLOGI("DCameraClient::StopCapture %s release videoOutput", GetAnonyString(cameraId_).c_str()); - ret = videoOutput_->Release(); - if (ret != DCAMERA_OK) { - DHLOGE("DCameraClient::StopCapture videoOutput Release failed, cameraId: %s, ret: %d", - GetAnonyString(cameraId_).c_str(), ret); - } - videoOutput_ = nullptr; - } - - if (photoOutput_ != nullptr) { - DHLOGI("DCameraClient::StopCapture %s release photoOutput", GetAnonyString(cameraId_).c_str()); - int32_t ret = photoOutput_->Release(); - if (ret != DCAMERA_OK) { - DHLOGE("DCameraClient::StopCapture photoOutput Release failed, cameraId: %s, ret: %d", - GetAnonyString(cameraId_).c_str(), ret); - } - photoOutput_ = nullptr; - } - if (cameraInput_ != nullptr) { DHLOGI("DCameraClient::StopCapture %s release cameraInput", GetAnonyString(cameraId_).c_str()); int32_t ret = cameraInput_->Close(); @@ -262,11 +236,6 @@ int32_t DCameraClient::StopCapture() if (videoSurface_ != nullptr) { DHLOGI("DCameraClient::StopCapture %s video surface unregister consumer listener", GetAnonyString(cameraId_).c_str()); - int32_t ret = videoSurface_->UnregisterConsumerListener(); - if (ret != DCAMERA_OK) { - DHLOGE("DCameraClient::StopCapture %s video surface unregister consumer listener failed, ret: %d", - GetAnonyString(cameraId_).c_str(), ret); - } videoSurface_ = nullptr; } @@ -282,6 +251,8 @@ int32_t DCameraClient::StopCapture() photoSurface_ = nullptr; } + photoOutput_ = nullptr; + previewOutput_ = nullptr; DHLOGI("DCameraClient::StopCapture %s success", GetAnonyString(cameraId_).c_str()); return DCAMERA_OK; } @@ -401,10 +372,10 @@ int32_t DCameraClient::ConfigCaptureSessionInner() } } - if (videoOutput_ != nullptr) { - ret = captureSession_->AddOutput(videoOutput_); + if (previewOutput_ != nullptr) { + ret = captureSession_->AddOutput(previewOutput_); if (ret != DCAMERA_OK) { - DHLOGE("DCameraClient::ConfigCaptureSession %s add videoOutput to captureSession failed, ret: %d", + DHLOGE("DCameraClient::ConfigCaptureSession %s add previewOutput to captureSession failed, ret: %d", GetAnonyString(cameraId_).c_str(), ret); return ret; } @@ -462,14 +433,15 @@ int32_t DCameraClient::CreatePhotoOutput(std::shared_ptr& in DHLOGI("DCameraClient::CreatePhotoOutput dhId: %s, width: %d, height: %d, format: %d, stream: %d, isCapture: %d", GetAnonyString(cameraId_).c_str(), info->width_, info->height_, info->format_, info->streamType_, info->isCapture_); - photoSurface_ = Surface::CreateSurfaceAsConsumer(); + photoSurface_ = IConsumerSurface::Create(); photoListener_ = new DCameraPhotoSurfaceListener(photoSurface_, resultCallback_); photoSurface_->RegisterConsumerListener((sptr &)photoListener_); CameraStandard::CameraFormat photoFormat = ConvertToCameraFormat(info->format_); CameraStandard::Size photoSize = {info->width_, info->height_}; CameraStandard::Profile photoProfile(photoFormat, photoSize); + sptr bp = photoSurface_->GetProducer(); int rv = cameraManager_->CreatePhotoOutput( - photoProfile, photoSurface_, &((sptr &)photoOutput_)); + photoProfile, bp, &((sptr &)photoOutput_)); if (rv != DCAMERA_OK) { DHLOGE("DCameraClient::CreatePhotoOutput %s create photo output failed", GetAnonyString(cameraId_).c_str()); return DCAMERA_BAD_VALUE; @@ -482,22 +454,22 @@ int32_t DCameraClient::CreatePhotoOutput(std::shared_ptr& in int32_t DCameraClient::CreateVideoOutput(std::shared_ptr& info) { - DHLOGI("DCameraClient::CreateVideoOutput dhId: %s, width: %d, height: %d, format: %d, stream: %d, isCapture: %d", + DHLOGI("DCameraClient::CreatePreviewOutput dhId: %s, width: %d, height: %d, format: %d, stream: %d, isCapture: %d", GetAnonyString(cameraId_).c_str(), info->width_, info->height_, info->format_, info->streamType_, info->isCapture_); - CameraStandard::CameraFormat videoFormat = ConvertToCameraFormat(info->format_); - CameraStandard::Size videoSize = {info->width_, info->height_}; - std::vector framerates = {}; - CameraStandard::VideoProfile videoSettings(videoFormat, videoSize, framerates); - int rv = cameraManager_->CreateVideoOutput( - videoSettings, videoSurface_, &((sptr &)videoOutput_)); + CameraStandard::CameraFormat previewFormat = ConvertToCameraFormat(info->format_); + CameraStandard::Size previewSize = {info->width_, info->height_}; + CameraStandard::Profile previewProfile(previewFormat, previewSize); + int rv = cameraManager_->CreatePreviewOutput( + previewProfile, videoSurface_, &((sptr &)previewOutput_)); if (rv != DCAMERA_OK) { - DHLOGE("DCameraClient::CreateVideoOutput %s create video output failed", GetAnonyString(cameraId_).c_str()); + DHLOGE("DCameraClient::CreatePreviewOutput %s create preview output failed", + GetAnonyString(cameraId_).c_str()); return DCAMERA_BAD_VALUE; } - std::shared_ptr videoCallback = std::make_shared(stateCallback_); - ((sptr &)videoOutput_)->SetCallback(videoCallback); - DHLOGI("DCameraClient::CreateVideoOutput %s success", GetAnonyString(cameraId_).c_str()); + std::shared_ptr previewCallback = std::make_shared(stateCallback_); + ((sptr &)previewOutput_)->SetCallback(previewCallback); + DHLOGI("DCameraClient::CreatePreviewOutput %s success", GetAnonyString(cameraId_).c_str()); return DCAMERA_OK; } diff --git a/services/cameraservice/cameraoperator/client/src/dcamera_client_common.cpp b/services/cameraservice/cameraoperator/client/src/dcamera_client_common.cpp deleted file mode 100644 index 23bc2c1f..00000000 --- a/services/cameraservice/cameraoperator/client/src/dcamera_client_common.cpp +++ /dev/null @@ -1,631 +0,0 @@ -/* - * Copyright (c) 2021-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. - */ - -#include "dcamera_client.h" - -#include "anonymous_string.h" -#include "camera_util.h" -#include "camera_metadata_operator.h" -#include "dcamera_input_callback.h" -#include "dcamera_manager_callback.h" -#include "dcamera_photo_callback.h" -#include "dcamera_preview_callback.h" -#include "dcamera_session_callback.h" -#include "dcamera_utils_tools.h" -#include "dcamera_video_callback.h" -#include "distributed_camera_constants.h" -#include "distributed_camera_errno.h" -#include "distributed_hardware_log.h" -#include "metadata_utils.h" - -namespace OHOS { -namespace DistributedHardware { -DCameraClient::DCameraClient(const std::string& dhId) -{ - DHLOGI("DCameraClient Constructor dhId: %s", GetAnonyString(dhId).c_str()); - cameraId_ = dhId.substr(CAMERA_ID_PREFIX.size()); - isInit_ = false; -} - -DCameraClient::~DCameraClient() -{ - if (isInit_) { - UnInit(); - } -} - -int32_t DCameraClient::Init() -{ - DHLOGI("DCameraClient::Init cameraId: %s", GetAnonyString(cameraId_).c_str()); - cameraManager_ = CameraStandard::CameraManager::GetInstance(); - if (cameraManager_ == nullptr) { - DHLOGE("DCameraClient::Init cameraManager getInstance failed"); - return DCAMERA_BAD_VALUE; - } - cameraManager_->SetCallback(std::make_shared()); - - std::vector> cameraList = cameraManager_->GetSupportedCameras(); - if (cameraList.empty()) { - DHLOGE("DCameraClient::Init no camera device"); - return DCAMERA_BAD_VALUE; - } - DHLOGI("DCameraClient::Init camera size: %d", cameraList.size()); - for (auto& info : cameraList) { - if (info->GetID() == cameraId_) { - DHLOGI("DCameraClient::Init cameraInfo get id: %s", GetAnonyString(info->GetID()).c_str()); - cameraInfo_ = info; - break; - } - } - if (cameraInfo_ == nullptr) { - DHLOGE("DCameraClient::Init cameraInfo is null"); - return DCAMERA_BAD_VALUE; - } - - isInit_ = true; - DHLOGI("DCameraClient::Init %s success", GetAnonyString(cameraId_).c_str()); - return DCAMERA_OK; -} - -int32_t DCameraClient::UnInit() -{ - DHLOGI("DCameraClient::UnInit cameraId: %s", GetAnonyString(cameraId_).c_str()); - if (cameraManager_ != nullptr) { - DHLOGI("DCameraClient::UnInit unregister cameraManager callback"); - cameraManager_->SetCallback(nullptr); - } - - isInit_ = false; - cameraInfo_ = nullptr; - cameraManager_ = nullptr; - DHLOGI("DCameraClient::UnInit %s success", GetAnonyString(cameraId_).c_str()); - return DCAMERA_OK; -} - -int32_t DCameraClient::UpdateSettings(std::vector>& settings) -{ - DHLOGI("DCameraClient::UpdateSettings cameraId: %s", GetAnonyString(cameraId_).c_str()); - for (auto& setting : settings) { - switch (setting->type_) { - case UPDATE_METADATA: { - DHLOGI("DCameraClient::UpdateSettings %s update metadata settings", GetAnonyString(cameraId_).c_str()); - std::string dcSettingValue = setting->value_; - std::string metadataStr = Base64Decode(dcSettingValue); - FindCameraMetadata(metadataStr); - - if (cameraInput_ == nullptr) { - DHLOGE("DCameraClient::UpdateSettings %s cameraInput is null", GetAnonyString(cameraId_).c_str()); - UpdateSettingCache(metadataStr); - return DCAMERA_OK; - } - - int32_t ret = ((sptr &)cameraInput_)->SetCameraSettings(metadataStr); - if (ret != DCAMERA_OK) { - DHLOGE("DCameraClient::UpdateSettings %s update metadata settings failed, ret: %d", - GetAnonyString(cameraId_).c_str(), ret); - return ret; - } - break; - } - default: { - DHLOGE("DCameraClient::UpdateSettings unknown setting type"); - break; - } - } - } - DHLOGI("DCameraClient::UpdateSettings %s success", GetAnonyString(cameraId_).c_str()); - return DCAMERA_OK; -} - -void DCameraClient::UpdateSettingCache(const std::string& metadataStr) -{ - if (cameraMetadatas_.size() == DCAMERA_MAX_METADATA_SIZE) { - DHLOGE("DCameraClient::UpdateSettingCache %s camera metadata oversize", - GetAnonyString(cameraId_).c_str()); - cameraMetadatas_.pop(); - } - cameraMetadatas_.push(metadataStr); -} - -void DCameraClient::FindCameraMetadata(const std::string& metadataStr) -{ - std::shared_ptr cameraMetadata = Camera::MetadataUtils::DecodeFromString(metadataStr); - camera_metadata_item_t focusItem; - int32_t ret = Camera::FindCameraMetadataItem(cameraMetadata->get(), OHOS_CONTROL_FOCUS_MODE, &focusItem); - if (ret == CAM_META_SUCCESS) { - DHLOGI("DCameraClient::FindCameraMetadata focus mode: %d", focusItem.data.u8[0]); - } else { - DHLOGE("DCameraClient::FindCameraMetadata %s find focus mode failed, ret: %d", - GetAnonyString(cameraId_).c_str(), ret); - } - - camera_metadata_item_t exposureItem; - ret = Camera::FindCameraMetadataItem(cameraMetadata->get(), OHOS_CONTROL_EXPOSURE_MODE, &exposureItem); - if (ret == CAM_META_SUCCESS) { - DHLOGI("DCameraClient::FindCameraMetadata exposure mode: %d", exposureItem.data.u8[0]); - } else { - DHLOGE("DCameraClient::FindCameraMetadata %s find exposure mode failed, ret: %d", - GetAnonyString(cameraId_).c_str(), ret); - } - - camera_metadata_item_t stabilityItem; - ret = Camera::FindCameraMetadataItem(cameraMetadata->get(), OHOS_CONTROL_VIDEO_STABILIZATION_MODE, &stabilityItem); - if (ret == CAM_META_SUCCESS) { - DHLOGI("DCameraClient::FindCameraMetadata stabilization mode: %d", stabilityItem.data.u8[0]); - } else { - DHLOGE("DCameraClient::FindCameraMetadata %s find stabilization mode failed, ret: %d", - GetAnonyString(cameraId_).c_str(), ret); - } -} - -int32_t DCameraClient::StartCapture(std::vector>& captureInfos, - sptr& surface) -{ - DHLOGI("DCameraClient::StartCapture cameraId: %s", GetAnonyString(cameraId_).c_str()); - if ((photoOutput_ == nullptr) && (previewOutput_ == nullptr)) { - DHLOGI("DCameraClient::StartCapture %s config capture session", GetAnonyString(cameraId_).c_str()); - if (surface == nullptr) { - DHLOGE("DCameraClient::StartCapture: input surface is nullptr."); - return DCAMERA_BAD_VALUE; - } - videoSurface_ = surface; - int32_t ret = ConfigCaptureSession(captureInfos); - if (ret != DCAMERA_OK) { - DHLOGE("DCameraClient::StartCapture config capture session failed, cameraId: %s, ret: %d", - GetAnonyString(cameraId_).c_str(), ret); - return CameraServiceErrorType(ret); - } - } - - for (auto& info : captureInfos) { - if ((info->streamType_ == CONTINUOUS_FRAME) || (!info->isCapture_)) { - continue; - } - int32_t ret = StartCaptureInner(info); - if (ret != DCAMERA_OK) { - DHLOGE("DCameraClient::StartCapture failed, cameraId: %s, ret: %d", - GetAnonyString(cameraId_).c_str(), ret); - return CameraServiceErrorType(ret); - } - } - DHLOGI("DCameraClient::StartCapture %s success", GetAnonyString(cameraId_).c_str()); - return DCAMERA_OK; -} - -int32_t DCameraClient::CameraServiceErrorType(const int32_t errorType) -{ - if (errorType == CameraStandard::CamServiceError::CAMERA_ALLOC_ERROR) { - return DCAMERA_ALLOC_ERROR; - } else if (errorType == CameraStandard::CamServiceError::CAMERA_DEVICE_BUSY) { - return DCAMERA_DEVICE_BUSY; - } - return errorType; -} - -int32_t DCameraClient::StopCapture() -{ - DHLOGI("DCameraClient::StopCapture cameraId: %s", GetAnonyString(cameraId_).c_str()); - - if (cameraInput_ != nullptr) { - DHLOGI("DCameraClient::StopCapture %s release cameraInput", GetAnonyString(cameraId_).c_str()); - int32_t ret = cameraInput_->Close(); - if (ret != DCAMERA_OK) { - DHLOGE("DCameraClient::StopCapture cameraInput Close failed, cameraId: %s, ret: %d", - GetAnonyString(cameraId_).c_str(), ret); - } - ret = cameraInput_->Release(); - if (ret != DCAMERA_OK) { - DHLOGE("DCameraClient::StopCapture cameraInput Release failed, cameraId: %s, ret: %d", - GetAnonyString(cameraId_).c_str(), ret); - } - cameraInput_ = nullptr; - } - ReleaseCaptureSession(); - - if (videoSurface_ != nullptr) { - DHLOGI("DCameraClient::StopCapture %s video surface unregister consumer listener", - GetAnonyString(cameraId_).c_str()); - int32_t ret = videoSurface_->UnregisterConsumerListener(); - if (ret != DCAMERA_OK) { - DHLOGE("DCameraClient::StopCapture %s video surface unregister consumer listener failed, ret: %d", - GetAnonyString(cameraId_).c_str(), ret); - } - videoSurface_ = nullptr; - } - - if (photoSurface_ != nullptr) { - DHLOGI("DCameraClient::StopCapture %s photo surface unregister consumer listener", - GetAnonyString(cameraId_).c_str()); - int32_t ret = photoSurface_->UnregisterConsumerListener(); - if (ret != DCAMERA_OK) { - DHLOGE("DCameraClient::StopCapture %s photo surface unregister consumer listener failed, ret: %d", - GetAnonyString(cameraId_).c_str(), ret); - } - photoListener_ = nullptr; - photoSurface_ = nullptr; - } - - photoOutput_ = nullptr; - previewOutput_ = nullptr; - DHLOGI("DCameraClient::StopCapture %s success", GetAnonyString(cameraId_).c_str()); - return DCAMERA_OK; -} - -void DCameraClient::ReleaseCaptureSession() -{ - if (captureSession_ == nullptr) { - return; - } - DHLOGI("DCameraClient::StopCapture %s stop captureSession", GetAnonyString(cameraId_).c_str()); - int32_t ret = captureSession_->Stop(); - if (ret != DCAMERA_OK) { - DHLOGE("DCameraClient::StopCapture captureSession stop failed, cameraId: %s, ret: %d", - GetAnonyString(cameraId_).c_str(), ret); - } - DHLOGI("DCameraClient::StopCapture %s release captureSession", GetAnonyString(cameraId_).c_str()); - ret = captureSession_->Release(); - if (ret != DCAMERA_OK) { - DHLOGE("DCameraClient::StopCapture captureSession Release failed, cameraId: %s, ret: %d", - GetAnonyString(cameraId_).c_str(), ret); - } - captureSession_ = nullptr; -} - -int32_t DCameraClient::SetStateCallback(std::shared_ptr& callback) -{ - DHLOGI("DCameraClient::SetStateCallback cameraId: %s", GetAnonyString(cameraId_).c_str()); - if (callback == nullptr) { - DHLOGE("DCameraClient::SetStateCallback %s unregistering state callback", GetAnonyString(cameraId_).c_str()); - } - stateCallback_ = callback; - return DCAMERA_OK; -} - -int32_t DCameraClient::SetResultCallback(std::shared_ptr& callback) -{ - DHLOGI("DCameraClient::SetResultCallback cameraId: %s", GetAnonyString(cameraId_).c_str()); - if (callback == nullptr) { - DHLOGE("DCameraClient::SetResultCallback %s unregistering result callback", GetAnonyString(cameraId_).c_str()); - } - resultCallback_ = callback; - return DCAMERA_OK; -} - -int32_t DCameraClient::ConfigCaptureSession(std::vector>& captureInfos) -{ - DHLOGI("DCameraClient::ConfigCaptureSession cameraId: %s", GetAnonyString(cameraId_).c_str()); - int rv = cameraManager_->CreateCameraInput(cameraInfo_, &((sptr &)cameraInput_)); - if (rv != DCAMERA_OK) { - DHLOGE("DCameraClient::ConfigCaptureSession %s create cameraInput failed", GetAnonyString(cameraId_).c_str()); - return DCAMERA_BAD_VALUE; - } - int32_t rc = ((sptr &)cameraInput_)->Open(); - if (rc != DCAMERA_OK) { - DHLOGE("DCameraClient::ConfigCaptureSession cameraInput_ Open failed, cameraId: %s, ret: %d", - GetAnonyString(cameraId_).c_str(), rc); - return DCAMERA_BAD_VALUE; - } - std::shared_ptr inputCallback = std::make_shared(stateCallback_); - ((sptr &)cameraInput_)->SetErrorCallback(inputCallback); - - while (!cameraMetadatas_.empty()) { - std::string metadataStr = cameraMetadatas_.front(); - FindCameraMetadata(metadataStr); - int32_t ret = ((sptr &)cameraInput_)->SetCameraSettings(metadataStr); - if (ret != DCAMERA_OK) { - DHLOGE("DCameraClient::ConfigCaptureSession %s set camera settings failed, ret: %d", - GetAnonyString(cameraId_).c_str(), ret); - return ret; - } - cameraMetadatas_.pop(); - } - - rv = cameraManager_->CreateCaptureSession(&captureSession_); - if (rv != DCAMERA_OK) { - DHLOGE("DCameraClient::ConfigCaptureSession %s create captureSession failed", - GetAnonyString(cameraId_).c_str()); - return DCAMERA_BAD_VALUE; - } - - std::shared_ptr sessionCallback = std::make_shared(stateCallback_); - captureSession_->SetFocusCallback(sessionCallback); - captureSession_->SetCallback(sessionCallback); - - int32_t ret = CreateCaptureOutput(captureInfos); - if (ret != DCAMERA_OK) { - DHLOGE("DCameraClient::ConfigCaptureSession create capture output failed, cameraId: %s, ret: %d", - GetAnonyString(cameraId_).c_str(), ret); - return ret; - } - - return ConfigCaptureSessionInner(); -} - -int32_t DCameraClient::ConfigCaptureSessionInner() -{ - int32_t ret = captureSession_->BeginConfig(); - if (ret != DCAMERA_OK) { - DHLOGE("DCameraClient::ConfigCaptureSession %s config captureSession failed, ret: %d", - GetAnonyString(cameraId_).c_str(), ret); - return ret; - } - - ret = captureSession_->AddInput(cameraInput_); - if (ret != DCAMERA_OK) { - DHLOGE("DCameraClient::ConfigCaptureSession %s add cameraInput to captureSession failed, ret: %d", - GetAnonyString(cameraId_).c_str(), ret); - return ret; - } - - if (photoOutput_ != nullptr) { - ret = captureSession_->AddOutput(photoOutput_); - if (ret != DCAMERA_OK) { - DHLOGE("DCameraClient::ConfigCaptureSession %s add photoOutput to captureSession failed, ret: %d", - GetAnonyString(cameraId_).c_str(), ret); - return ret; - } - } - - if (previewOutput_ != nullptr) { - ret = captureSession_->AddOutput(previewOutput_); - if (ret != DCAMERA_OK) { - DHLOGE("DCameraClient::ConfigCaptureSession %s add previewOutput to captureSession failed, ret: %d", - GetAnonyString(cameraId_).c_str(), ret); - return ret; - } - } - - ret = captureSession_->CommitConfig(); - if (ret != DCAMERA_OK) { - DHLOGE("DCameraClient::ConfigCaptureSession %s commit captureSession failed, ret: %d", - GetAnonyString(cameraId_).c_str(), ret); - return ret; - } - - ret = captureSession_->Start(); - if (ret != DCAMERA_OK) { - DHLOGE("DCameraClient::ConfigCaptureSession %s start captureSession failed, ret: %d", - GetAnonyString(cameraId_).c_str(), ret); - } - - DHLOGI("DCameraClient::ConfigCaptureSession %s success", GetAnonyString(cameraId_).c_str()); - return DCAMERA_OK; -} - -int32_t DCameraClient::CreateCaptureOutput(std::vector>& captureInfos) -{ - if (captureInfos.empty()) { - DHLOGE("DCameraClient::CreateCaptureOutput no capture info, cameraId: %s", GetAnonyString(cameraId_).c_str()); - return DCAMERA_BAD_VALUE; - } - - for (auto& info : captureInfos) { - if (info->streamType_ == SNAPSHOT_FRAME) { - int32_t ret = CreatePhotoOutput(info); - if (ret != DCAMERA_OK) { - DHLOGE("DCameraClient::CreateCaptureOutput %s create photo output failed, ret: %d", - GetAnonyString(cameraId_).c_str(), ret); - return ret; - } - } else if (info->streamType_ == CONTINUOUS_FRAME) { - int32_t ret = CreateVideoOutput(info); - if (ret != DCAMERA_OK) { - DHLOGE("DCameraClient::CreateCaptureOutput %s create video output failed, ret: %d", - GetAnonyString(cameraId_).c_str(), ret); - return ret; - } - } else { - DHLOGE("DCameraClient::CreateCaptureOutput unknown stream type"); - return DCAMERA_BAD_VALUE; - } - } - return DCAMERA_OK; -} - -int32_t DCameraClient::CreatePhotoOutput(std::shared_ptr& info) -{ - DHLOGI("DCameraClient::CreatePhotoOutput dhId: %s, width: %d, height: %d, format: %d, stream: %d, isCapture: %d", - GetAnonyString(cameraId_).c_str(), info->width_, info->height_, info->format_, info->streamType_, - info->isCapture_); - photoSurface_ = Surface::CreateSurfaceAsConsumer(); - photoListener_ = new DCameraPhotoSurfaceListener(photoSurface_, resultCallback_); - photoSurface_->RegisterConsumerListener((sptr &)photoListener_); - CameraStandard::CameraFormat photoFormat = ConvertToCameraFormat(info->format_); - CameraStandard::Size photoSize = {info->width_, info->height_}; - CameraStandard::Profile photoProfile(photoFormat, photoSize); - int rv = cameraManager_->CreatePhotoOutput( - photoProfile, photoSurface_, &((sptr &)photoOutput_)); - if (rv != DCAMERA_OK) { - DHLOGE("DCameraClient::CreatePhotoOutput %s create photo output failed", GetAnonyString(cameraId_).c_str()); - return DCAMERA_BAD_VALUE; - } - std::shared_ptr photoCallback = std::make_shared(stateCallback_); - ((sptr &)photoOutput_)->SetCallback(photoCallback); - DHLOGI("DCameraClient::CreatePhotoOutput %s success", GetAnonyString(cameraId_).c_str()); - return DCAMERA_OK; -} - -int32_t DCameraClient::CreateVideoOutput(std::shared_ptr& info) -{ - DHLOGI("DCameraClient::CreatePreviewOutput dhId: %s, width: %d, height: %d, format: %d, stream: %d, isCapture: %d", - GetAnonyString(cameraId_).c_str(), info->width_, info->height_, info->format_, info->streamType_, - info->isCapture_); - CameraStandard::CameraFormat previewFormat = ConvertToCameraFormat(info->format_); - CameraStandard::Size previewSize = {info->width_, info->height_}; - CameraStandard::Profile previewProfile(previewFormat, previewSize); - int rv = cameraManager_->CreatePreviewOutput( - previewProfile, videoSurface_, &((sptr &)previewOutput_)); - if (rv != DCAMERA_OK) { - DHLOGE("DCameraClient::CreatePreviewOutput %s create preview output failed", - GetAnonyString(cameraId_).c_str()); - return DCAMERA_BAD_VALUE; - } - std::shared_ptr previewCallback = std::make_shared(stateCallback_); - ((sptr &)previewOutput_)->SetCallback(previewCallback); - DHLOGI("DCameraClient::CreatePreviewOutput %s success", GetAnonyString(cameraId_).c_str()); - return DCAMERA_OK; -} - -CameraStandard::CameraFormat DCameraClient::ConvertToCameraFormat(int32_t format) -{ - CameraStandard::CameraFormat ret = CameraStandard::CameraFormat::CAMERA_FORMAT_INVALID; - DCameraFormat df = static_cast(format); - switch (df) { - case DCameraFormat::OHOS_CAMERA_FORMAT_RGBA_8888: - ret = CameraStandard::CameraFormat::CAMERA_FORMAT_RGBA_8888; - break; - case DCameraFormat::OHOS_CAMERA_FORMAT_YCBCR_420_888: - ret = CameraStandard::CameraFormat::CAMERA_FORMAT_YCBCR_420_888; - break; - case DCameraFormat::OHOS_CAMERA_FORMAT_YCRCB_420_SP: - ret = CameraStandard::CameraFormat::CAMERA_FORMAT_YUV_420_SP; - break; - case DCameraFormat::OHOS_CAMERA_FORMAT_JPEG: - ret = CameraStandard::CameraFormat::CAMERA_FORMAT_JPEG; - break; - default: - break; - } - return ret; -} - -int32_t DCameraClient::StartCaptureInner(std::shared_ptr& info) -{ - switch (info->streamType_) { - case CONTINUOUS_FRAME: { - return StartVideoOutput(); - } - case SNAPSHOT_FRAME: { - return StartPhotoOutput(info); - } - default: { - DHLOGE("DCameraClient::StartCaptureInner unknown stream type"); - return DCAMERA_BAD_VALUE; - } - } -} - -int32_t DCameraClient::StartPhotoOutput(std::shared_ptr& info) -{ - DHLOGI("DCameraClient::StartPhotoOutput cameraId: %s", GetAnonyString(cameraId_).c_str()); - if (photoOutput_ == nullptr) { - DHLOGE("DCameraClient::StartPhotoOutput photoOutput is null"); - return DCAMERA_BAD_VALUE; - } - - std::vector> captureSettings = info->captureSettings_; - std::string metadataSetting; - for (const auto& setting : captureSettings) { - if (setting->type_ == UPDATE_METADATA) { - DHLOGI("DCameraClient::StartPhotoOutput %s update metadata settings", GetAnonyString(cameraId_).c_str()); - metadataSetting = setting->value_; - } - } - - if (metadataSetting.empty()) { - DHLOGE("DCameraClient::StartPhotoOutput no metadata settings to update"); - int32_t ret = ((sptr &)photoOutput_)->Capture(); - if (ret != DCAMERA_OK) { - DHLOGE("DCameraClient::StartPhotoOutput %s photoOutput capture failed, ret: %d", - GetAnonyString(cameraId_).c_str(), ret); - return ret; - } - return DCAMERA_OK; - } - - std::string metadataStr = Base64Decode(metadataSetting); - std::shared_ptr cameraMetadata = Camera::MetadataUtils::DecodeFromString(metadataStr); - std::shared_ptr photoCaptureSetting = - std::make_shared(); - SetPhotoCaptureRotation(cameraMetadata, photoCaptureSetting); - SetPhotoCaptureQuality(cameraMetadata, photoCaptureSetting); - SetPhotoCaptureLocation(cameraMetadata, photoCaptureSetting); - int32_t ret = ((sptr &)photoOutput_)->Capture(photoCaptureSetting); - if (ret != DCAMERA_OK) { - DHLOGE("DCameraClient::StartPhotoOutput %s photoOutput capture failed, ret: %d", - GetAnonyString(cameraId_).c_str(), ret); - return ret; - } - return DCAMERA_OK; -} - -void DCameraClient::SetPhotoCaptureRotation(const std::shared_ptr& cameraMetadata, - std::shared_ptr& photoCaptureSetting) -{ - uint32_t rotationCount = 1; - camera_metadata_item_t item; - int32_t ret = Camera::FindCameraMetadataItem(cameraMetadata->get(), OHOS_JPEG_ORIENTATION, &item); - if ((ret == CAM_META_SUCCESS) && (rotationCount == item.count)) { - CameraStandard::PhotoCaptureSetting::RotationConfig rotation = - static_cast(item.data.i32[0]); - photoCaptureSetting->SetRotation(rotation); - DHLOGI("DCameraClient::SetPhotoCaptureRotation %s photo capture settings set %d rotation: %d", - GetAnonyString(cameraId_).c_str(), item.count, rotation); - } -} - -void DCameraClient::SetPhotoCaptureQuality(const std::shared_ptr& cameraMetadata, - std::shared_ptr& photoCaptureSetting) -{ - uint32_t qualityCount = 1; - camera_metadata_item_t item; - int32_t ret = Camera::FindCameraMetadataItem(cameraMetadata->get(), OHOS_JPEG_QUALITY, &item); - if ((ret == CAM_META_SUCCESS) && (qualityCount == item.count)) { - CameraStandard::PhotoCaptureSetting::QualityLevel quality = - static_cast(item.data.u8[0]); - photoCaptureSetting->SetQuality(quality); - DHLOGI("DCameraClient::SetPhotoCaptureQuality %s photo capture settings set %d quality: %d", - GetAnonyString(cameraId_).c_str(), item.count, quality); - } -} - -void DCameraClient::SetPhotoCaptureLocation(const std::shared_ptr& cameraMetadata, - std::shared_ptr& photoCaptureSetting) -{ - uint32_t locationCount = 3; - camera_metadata_item_t item; - int32_t ret = Camera::FindCameraMetadataItem(cameraMetadata->get(), OHOS_JPEG_GPS_COORDINATES, &item); - if ((ret == CAM_META_SUCCESS) && (locationCount == item.count)) { - int32_t latitudeIndex = 0; - int32_t longitudeIndex = 1; - int32_t altitudeIndex = 2; - std::unique_ptr location = std::make_unique(); - location->latitude = item.data.d[latitudeIndex]; - location->longitude = item.data.d[longitudeIndex]; - location->altitude = item.data.d[altitudeIndex]; - photoCaptureSetting->SetLocation(location); - DHLOGI("DCameraClient::SetPhotoCaptureLocation %s photo capture settings set %d location: " + - "latitude=%f, longitude=%f, altitude=%f", GetAnonyString(cameraId_).c_str(), item.count, - item.data.d[latitudeIndex], item.data.d[longitudeIndex], item.data.d[altitudeIndex]); - } -} - -int32_t DCameraClient::StartVideoOutput() -{ - DHLOGI("DCameraClient::StartVideoOutput cameraId: %s", GetAnonyString(cameraId_).c_str()); - if (videoOutput_ == nullptr) { - DHLOGE("DCameraClient::StartVideoOutput videoOutput is null"); - return DCAMERA_BAD_VALUE; - } - int32_t ret = ((sptr &)videoOutput_)->Start(); - if (ret != DCAMERA_OK) { - DHLOGE("DCameraClient::StartVideoOutput %s videoOutput start failed, ret: %d", - GetAnonyString(cameraId_).c_str(), ret); - return ret; - } - return DCAMERA_OK; -} -} // namespace DistributedHardware -} // namespace OHOS \ No newline at end of file -- Gitee