From a4878b102ce845049077773192d63f4bfe30c466 Mon Sep 17 00:00:00 2001 From: hobbycao Date: Fri, 11 Mar 2022 16:22:19 +0800 Subject: [PATCH] distributedcamera hdi adapter Signed-off-by: hobbycao --- camera_hdf/hdi_impl/BUILD.gn | 23 +++++++++++++++---- .../dcamera_device/dmetadata_processor.h | 7 +++++- .../include/dcamera_host/dcamera_host.h | 7 +++++- .../include/dstream_operator/dcamera_steam.h | 7 +++++- camera_hdf/hdi_impl/include/utils/dcamera.h | 6 ++++- .../dcamera_device/dmetadata_processor.cpp | 2 +- .../src/dstream_operator/dcamera_steam.cpp | 3 +-- camera_hdf/hdi_impl/test/BUILD.gn | 22 +++++++++++++++--- camera_hdf/interfaces/hdi_ipc/client/BUILD.gn | 19 ++++++++++++++- .../device/dcamera_device_callback_stub.cpp | 4 ++++ .../client/device/dcamera_device_proxy.cpp | 4 ++++ .../host/dcamera_host_callback_stub.cpp | 4 ++++ .../client/host/dcamera_host_proxy.cpp | 5 ++++ .../dstream_operator_callback_stub.cpp | 4 ++++ .../operator/dstream_operator_proxy.cpp | 5 ++++ .../interfaces/hdi_ipc/config/host/BUILD.gn | 20 +++++++++++++++- .../hdi_ipc/config/provider/BUILD.gn | 19 ++++++++++++++- .../interfaces/hdi_ipc/ipc_data_utils.h | 7 +++++- .../device/dcamera_device_callback_proxy.cpp | 4 ++++ .../server/device/dcamera_device_stub.cpp | 4 ++++ .../host/dcamera_host_callback_proxy.cpp | 4 ++++ .../hdi_ipc/server/host/dcamera_host_stub.cpp | 4 ++++ .../doffline_stream_operator_stub.cpp | 4 ++++ .../dstream_operator_callback_proxy.cpp | 4 ++++ .../server/operator/dstream_operator_stub.cpp | 4 ++++ .../server/provider/dcamera_provider_stub.cpp | 2 ++ distributedcamera.gni | 4 +++- .../icamera_source_data_process.h | 2 +- .../include/utils/image_common_type.h | 1 + 29 files changed, 185 insertions(+), 20 deletions(-) diff --git a/camera_hdf/hdi_impl/BUILD.gn b/camera_hdf/hdi_impl/BUILD.gn index 9e152f18..fbb5c864 100644 --- a/camera_hdf/hdi_impl/BUILD.gn +++ b/camera_hdf/hdi_impl/BUILD.gn @@ -36,8 +36,6 @@ ohos_shared_library("distributed_camera_hdf") { "${fwk_common_path}/utils/include/", "${fwk_utils_path}/include", "${fwk_utils_path}/include/log", - "${camera_hdf_path}/camera/interfaces/include", - "${camera_hdf_path}/gralloc/src/adapter", "${display_hdf_path}/interfaces/include", "${hdf_framework_path}/include/utils", "${hdf_framework_path}/include/core", @@ -51,7 +49,7 @@ ohos_shared_library("distributed_camera_hdf") { #producer "//foundation/graphic/standard/frameworks/surface/include", "//foundation/graphic/standard/interfaces/kits/surface", - "//foundation/graphic/standard/utils/include", + "//foundation/graphic/standard/utils/buffer_handle/export", "//foundation/communication/ipc/ipc/native/src/core/include", "//foundation/communication/ipc/interfaces/innerkits/ipc_core/include", "//foundation/multimedia/camera_standard/frameworks/native/metadata/include", @@ -79,6 +77,23 @@ ohos_shared_library("distributed_camera_hdf") { "src/utils/dcamera.cpp" ] + cflags = [ + "-fPIC", + "-Wall", + ] + + if (device_name == "baltimore") { + cflags += [ "-DBALTIMORE_CAMERA" ] + include_dirs += [ + "${camera_hdf_path_baltimore}/camera/interfaces/include", + ] + } else { + include_dirs += [ + "${camera_hdf_path}/camera/interfaces/include", + "${camera_hdf_path}/camera/interfaces/hdi_ipc", + ] + } + deps = [ "//utils/native/base:utils", "${common_path}:distributed_camera_utils", @@ -89,7 +104,6 @@ ohos_shared_library("distributed_camera_hdf") { "//drivers/peripheral/display/hal:hdi_display_gralloc", "//foundation/multimedia/camera_standard/frameworks/native/metadata:metadata", "//third_party/jsoncpp:jsoncpp", - "${camera_hdf_path}/gralloc/src/adapter:libgralloc_adapter", ] defines = [ @@ -102,6 +116,7 @@ ohos_shared_library("distributed_camera_hdf") { "hiviewdfx_hilog_native:libhilog", ] + cflags_cc = cflags subsystem_name = "distributedhardware" part_name = "distributed_camera" diff --git a/camera_hdf/hdi_impl/include/dcamera_device/dmetadata_processor.h b/camera_hdf/hdi_impl/include/dcamera_device/dmetadata_processor.h index e5102398..c434ae6a 100644 --- a/camera_hdf/hdi_impl/include/dcamera_device/dmetadata_processor.h +++ b/camera_hdf/hdi_impl/include/dcamera_device/dmetadata_processor.h @@ -21,8 +21,13 @@ #include #include "constants.h" #include "dcamera.h" -#include + #include +#ifdef BALTIMORE_CAMERA +#include +#else +#include +#endif namespace OHOS { namespace DistributedHardware { diff --git a/camera_hdf/hdi_impl/include/dcamera_host/dcamera_host.h b/camera_hdf/hdi_impl/include/dcamera_host/dcamera_host.h index 603ad354..b9947727 100644 --- a/camera_hdf/hdi_impl/include/dcamera_host/dcamera_host.h +++ b/camera_hdf/hdi_impl/include/dcamera_host/dcamera_host.h @@ -21,8 +21,13 @@ #include "icamera_device.h" #include "icamera_host_callback.h" #include "icamera_device_callback.h" -#include + #include +#ifdef BALTIMORE_CAMERA +#include +#else +#include +#endif namespace OHOS { namespace DistributedHardware { diff --git a/camera_hdf/hdi_impl/include/dstream_operator/dcamera_steam.h b/camera_hdf/hdi_impl/include/dstream_operator/dcamera_steam.h index 703ae264..ac1d1f20 100644 --- a/camera_hdf/hdi_impl/include/dstream_operator/dcamera_steam.h +++ b/camera_hdf/hdi_impl/include/dstream_operator/dcamera_steam.h @@ -19,8 +19,13 @@ #include "surface.h" #include "dimage_buffer.h" #include "dbuffer_manager.h" -#include + #include +#ifdef BALTIMORE_CAMERA +#include +#else +#include +#endif namespace OHOS { namespace DistributedHardware { diff --git a/camera_hdf/hdi_impl/include/utils/dcamera.h b/camera_hdf/hdi_impl/include/utils/dcamera.h index 768db551..de4f61a1 100644 --- a/camera_hdf/hdi_impl/include/utils/dcamera.h +++ b/camera_hdf/hdi_impl/include/utils/dcamera.h @@ -16,8 +16,12 @@ #ifndef DISTRIBUTED_CAMERA_H #define DISTRIBUTED_CAMERA_H -#include #include +#ifdef BALTIMORE_CAMERA +#include +#else +#include +#endif namespace OHOS { namespace DistributedHardware { diff --git a/camera_hdf/hdi_impl/src/dcamera_device/dmetadata_processor.cpp b/camera_hdf/hdi_impl/src/dcamera_device/dmetadata_processor.cpp index c8602c36..44fa7a12 100644 --- a/camera_hdf/hdi_impl/src/dcamera_device/dmetadata_processor.cpp +++ b/camera_hdf/hdi_impl/src/dcamera_device/dmetadata_processor.cpp @@ -458,7 +458,7 @@ void DMetadataProcessor::ResizeMetadataHeader(common_metadata_header_t *header, uint32_t DMetadataProcessor::GetDataSize(uint32_t type) { - int32_t size = 0; + uint32_t size = 0; if (type == META_TYPE_BYTE) { size = sizeof(uint8_t); } else if (type == META_TYPE_INT32) { diff --git a/camera_hdf/hdi_impl/src/dstream_operator/dcamera_steam.cpp b/camera_hdf/hdi_impl/src/dstream_operator/dcamera_steam.cpp index 06ac97e9..ee3cb82a 100644 --- a/camera_hdf/hdi_impl/src/dstream_operator/dcamera_steam.cpp +++ b/camera_hdf/hdi_impl/src/dstream_operator/dcamera_steam.cpp @@ -197,8 +197,7 @@ DCamRetCode DCameraStream::GetNextRequest() } std::shared_ptr imageBuffer = std::make_shared(); - auto surface = OHOS::SurfaceBufferImpl::FromBase(surfaceBuffer); - RetCode ret = DBufferManager::SurfaceBufferToDImageBuffer(surface, imageBuffer); + RetCode ret = DBufferManager::SurfaceBufferToDImageBuffer(surfaceBuffer, imageBuffer); if (ret != RC_OK) { DHLOGE("Convert surface buffer to image buffer failed, streamId = %d.", dcStreamInfo_->streamId_); return DCamRetCode::EXCEED_MAX_NUMBER; diff --git a/camera_hdf/hdi_impl/test/BUILD.gn b/camera_hdf/hdi_impl/test/BUILD.gn index 04c5bca3..e00a47e7 100644 --- a/camera_hdf/hdi_impl/test/BUILD.gn +++ b/camera_hdf/hdi_impl/test/BUILD.gn @@ -21,8 +21,7 @@ ohos_executable("dcamera_hdi_sample") { "dcamera_hdi_sample.cpp", "common.cpp" ] - cflags = [ "-Wall" ] - cflags_cc = cflags + include_dirs = [ "${distributedcamera_hdf_path}/interfaces/include", "${distributedcamera_hdf_path}/interfaces/hdi_ipc/client/device", @@ -43,7 +42,6 @@ ohos_executable("dcamera_hdi_sample") { "${common_path}/include/constants", "${fwk_utils_path}/include", "${fwk_utils_path}/include/log", - "${camera_hdf_path}/camera/interfaces/include", "${hdf_framework_path}/include/utils", "${hdf_uhdf_path}/include/hdi", "${hdf_uhdf_path}/osal/include", @@ -61,6 +59,23 @@ ohos_executable("dcamera_hdi_sample") { "${fwk_common_path}/utils/include", ] + cflags = [ + "-fPIC", + "-Wall", + ] + + if (device_name == "baltimore") { + cflags += [ "-DBALTIMORE_CAMERA" ] + include_dirs += [ + "${camera_hdf_path_baltimore}/camera/interfaces/include", + ] + } else { + include_dirs += [ + "${camera_hdf_path}/camera/interfaces/include", + "${camera_hdf_path}/camera/interfaces/hdi_ipc", + ] + } + deps = [ "${fwk_utils_path}:distributedhardwareutils", "${distributedcamera_hdf_path}/interfaces/hdi_ipc/client:distributed_camera_hdf_client", @@ -78,6 +93,7 @@ ohos_executable("dcamera_hdi_sample") { "samgr_standard:samgr_proxy", ] + cflags_cc = cflags part_name = "distributed_camera" subsystem_name = "distributedhardware" } \ No newline at end of file diff --git a/camera_hdf/interfaces/hdi_ipc/client/BUILD.gn b/camera_hdf/interfaces/hdi_ipc/client/BUILD.gn index 7353b562..571dd1e6 100644 --- a/camera_hdf/interfaces/hdi_ipc/client/BUILD.gn +++ b/camera_hdf/interfaces/hdi_ipc/client/BUILD.gn @@ -25,7 +25,6 @@ ohos_shared_library("distributed_camera_hdf_client") { "${fwk_common_path}/utils/include/", "${fwk_utils_path}/include", "${fwk_utils_path}/include/log", - "${camera_hdf_path}/camera/interfaces/include", "${hdf_framework_path}/include/utils", "${hdf_uhdf_path}/include/hdi", "${hdf_uhdf_path}/osal/include", @@ -40,6 +39,23 @@ ohos_shared_library("distributed_camera_hdf_client") { "//foundation/multimedia/camera_standard/frameworks/native/metadata/include", ] + cflags = [ + "-fPIC", + "-Wall", + ] + + if (device_name == "baltimore") { + cflags += [ "-DBALTIMORE_CAMERA" ] + include_dirs += [ + "${camera_hdf_path_baltimore}/camera/interfaces/include", + ] + } else { + include_dirs += [ + "${camera_hdf_path}/camera/interfaces/include", + "${camera_hdf_path}/camera/interfaces/hdi_ipc", + ] + } + sources = [ "device/dcamera_device_callback_stub.cpp", "device/dcamera_device_callback.cpp", @@ -76,6 +92,7 @@ ohos_shared_library("distributed_camera_hdf_client") { "hiviewdfx_hilog_native:libhilog", ] + cflags_cc = cflags subsystem_name = "distributedhardware" part_name = "distributed_camera" } diff --git a/camera_hdf/interfaces/hdi_ipc/client/device/dcamera_device_callback_stub.cpp b/camera_hdf/interfaces/hdi_ipc/client/device/dcamera_device_callback_stub.cpp index 6e86fd0d..a72665e4 100644 --- a/camera_hdf/interfaces/hdi_ipc/client/device/dcamera_device_callback_stub.cpp +++ b/camera_hdf/interfaces/hdi_ipc/client/device/dcamera_device_callback_stub.cpp @@ -21,6 +21,10 @@ #include +#ifndef BALTIMORE_CAMERA +#include "cmd_common.h" +#endif + namespace OHOS { namespace DistributedHardware { int32_t DCameraDeviceCallbackStub::OnRemoteRequest(uint32_t code, MessageParcel &data, MessageParcel &reply, diff --git a/camera_hdf/interfaces/hdi_ipc/client/device/dcamera_device_proxy.cpp b/camera_hdf/interfaces/hdi_ipc/client/device/dcamera_device_proxy.cpp index badfd01f..5f4dc2ed 100644 --- a/camera_hdf/interfaces/hdi_ipc/client/device/dcamera_device_proxy.cpp +++ b/camera_hdf/interfaces/hdi_ipc/client/device/dcamera_device_proxy.cpp @@ -22,6 +22,10 @@ #include "istream_operator_callback.h" #include "metadata_utils.h" +#ifndef BALTIMORE_CAMERA +#include "cmd_common.h" +#endif + namespace OHOS { namespace DistributedHardware { CamRetCode DCameraDeviceProxy::GetStreamOperator( diff --git a/camera_hdf/interfaces/hdi_ipc/client/host/dcamera_host_callback_stub.cpp b/camera_hdf/interfaces/hdi_ipc/client/host/dcamera_host_callback_stub.cpp index 36e27e2c..957b7d0c 100644 --- a/camera_hdf/interfaces/hdi_ipc/client/host/dcamera_host_callback_stub.cpp +++ b/camera_hdf/interfaces/hdi_ipc/client/host/dcamera_host_callback_stub.cpp @@ -19,6 +19,10 @@ #include +#ifndef BALTIMORE_CAMERA +#include "cmd_common.h" +#endif + namespace OHOS { namespace DistributedHardware { int32_t DCameraHostCallbackStub::OnRemoteRequest(uint32_t code, MessageParcel &data, MessageParcel &reply, diff --git a/camera_hdf/interfaces/hdi_ipc/client/host/dcamera_host_proxy.cpp b/camera_hdf/interfaces/hdi_ipc/client/host/dcamera_host_proxy.cpp index 9565f39e..8074be6f 100644 --- a/camera_hdf/interfaces/hdi_ipc/client/host/dcamera_host_proxy.cpp +++ b/camera_hdf/interfaces/hdi_ipc/client/host/dcamera_host_proxy.cpp @@ -15,6 +15,7 @@ #include "dcamera_host_proxy.h" #include +#include #include #include "distributed_hardware_log.h" #include "icamera_device.h" @@ -23,6 +24,10 @@ #include "ipc_data_utils.h" #include "metadata_utils.h" +#ifndef BALTIMORE_CAMERA +#include "cmd_common.h" +#endif + OHOS::sptr OHOS::Camera::ICameraHost::Get(const char *serviceName) { using namespace OHOS::HDI::ServiceManager::V1_0; diff --git a/camera_hdf/interfaces/hdi_ipc/client/operator/dstream_operator_callback_stub.cpp b/camera_hdf/interfaces/hdi_ipc/client/operator/dstream_operator_callback_stub.cpp index 3c22c28b..ebc6b256 100644 --- a/camera_hdf/interfaces/hdi_ipc/client/operator/dstream_operator_callback_stub.cpp +++ b/camera_hdf/interfaces/hdi_ipc/client/operator/dstream_operator_callback_stub.cpp @@ -19,6 +19,10 @@ #include "distributed_hardware_log.h" #include "dstream_operator_callback.h" +#ifndef BALTIMORE_CAMERA +#include "cmd_common.h" +#endif + namespace OHOS { namespace DistributedHardware { int32_t DStreamOperatorCallbackStub::OnRemoteRequest(uint32_t code, MessageParcel &data, MessageParcel &reply, diff --git a/camera_hdf/interfaces/hdi_ipc/client/operator/dstream_operator_proxy.cpp b/camera_hdf/interfaces/hdi_ipc/client/operator/dstream_operator_proxy.cpp index e5937f82..c30915d2 100644 --- a/camera_hdf/interfaces/hdi_ipc/client/operator/dstream_operator_proxy.cpp +++ b/camera_hdf/interfaces/hdi_ipc/client/operator/dstream_operator_proxy.cpp @@ -15,6 +15,7 @@ #include "dstream_operator_proxy.h" #include +#include #include #include "distributed_hardware_log.h" #include "ioffline_stream_operator.h" @@ -22,6 +23,10 @@ #include "istream_operator_callback.h" #include "metadata_utils.h" +#ifndef BALTIMORE_CAMERA +#include "cmd_common.h" +#endif + namespace OHOS { namespace DistributedHardware { CamRetCode DStreamOperatorProxy::IsStreamsSupported(OperationMode mode, diff --git a/camera_hdf/interfaces/hdi_ipc/config/host/BUILD.gn b/camera_hdf/interfaces/hdi_ipc/config/host/BUILD.gn index 77652f8a..1db284c8 100644 --- a/camera_hdf/interfaces/hdi_ipc/config/host/BUILD.gn +++ b/camera_hdf/interfaces/hdi_ipc/config/host/BUILD.gn @@ -28,7 +28,6 @@ ohos_shared_library("distributed_camera_host_config") { "${common_path}/include/constants", "//utils/native/base/include", "//utils/system/safwk/native/include", - "${camera_hdf_path}/camera/interfaces/include", "${hdf_framework_path}/include/utils", "${hdf_framework_path}/include/core", "${hdf_framework_path}/include/osal", @@ -46,6 +45,23 @@ ohos_shared_library("distributed_camera_host_config") { "//foundation/multimedia/camera_standard/frameworks/native/metadata/include", ] + cflags = [ + "-fPIC", + "-Wall", + ] + + if (device_name == "baltimore") { + cflags += [ "-DBALTIMORE_CAMERA" ] + include_dirs += [ + "${camera_hdf_path_baltimore}/camera/interfaces/include", + ] + } else { + include_dirs += [ + "${camera_hdf_path}/camera/interfaces/include", + "${camera_hdf_path}/camera/interfaces/hdi_ipc", + ] + } + sources = [ "dcamera_host_config.cpp" ] @@ -67,6 +83,8 @@ ohos_shared_library("distributed_camera_host_config") { "hiviewdfx_hilog_native:libhilog", ] install_images = [ chipset_base_dir ] + + cflags_cc = cflags subsystem_name = "distributedhardware" part_name = "distributed_camera" diff --git a/camera_hdf/interfaces/hdi_ipc/config/provider/BUILD.gn b/camera_hdf/interfaces/hdi_ipc/config/provider/BUILD.gn index 8c2f45ee..d514dc70 100644 --- a/camera_hdf/interfaces/hdi_ipc/config/provider/BUILD.gn +++ b/camera_hdf/interfaces/hdi_ipc/config/provider/BUILD.gn @@ -23,7 +23,6 @@ ohos_shared_library("distributed_camera_provider_config") { "${distributedcamera_hdf_path}/hdi_impl/include/utils", "//utils/native/base/include", "//utils/system/safwk/native/include", - "${camera_hdf_path}/camera/interfaces/include", "${hdf_framework_path}/include/utils", "${hdf_framework_path}/include/core", "${hdf_framework_path}/include/osal", @@ -41,6 +40,23 @@ ohos_shared_library("distributed_camera_provider_config") { "//foundation/multimedia/camera_standard/frameworks/native/metadata/include", ] + cflags = [ + "-fPIC", + "-Wall", + ] + + if (device_name == "baltimore") { + cflags += [ "-DBALTIMORE_CAMERA" ] + include_dirs += [ + "${camera_hdf_path_baltimore}/camera/interfaces/include", + ] + } else { + include_dirs += [ + "${camera_hdf_path}/camera/interfaces/include", + "${camera_hdf_path}/camera/interfaces/hdi_ipc", + ] + } + sources = [ "dcamera_provider_config.cpp" ] @@ -62,6 +78,7 @@ ohos_shared_library("distributed_camera_provider_config") { "hiviewdfx_hilog_native:libhilog", ] install_images = [ chipset_base_dir ] + cflags_cc = cflags subsystem_name = "distributedhardware" part_name = "distributed_camera" diff --git a/camera_hdf/interfaces/hdi_ipc/ipc_data_utils.h b/camera_hdf/interfaces/hdi_ipc/ipc_data_utils.h index b57c44e6..e657d632 100644 --- a/camera_hdf/interfaces/hdi_ipc/ipc_data_utils.h +++ b/camera_hdf/interfaces/hdi_ipc/ipc_data_utils.h @@ -23,8 +23,13 @@ #include #include #include "camera_metadata_info.h" -#include + #include +#ifdef BALTIMORE_CAMERA +#include +#else +#include +#endif namespace OHOS { namespace DistributedHardware { diff --git a/camera_hdf/interfaces/hdi_ipc/server/device/dcamera_device_callback_proxy.cpp b/camera_hdf/interfaces/hdi_ipc/server/device/dcamera_device_callback_proxy.cpp index c1d7c658..44b7e834 100644 --- a/camera_hdf/interfaces/hdi_ipc/server/device/dcamera_device_callback_proxy.cpp +++ b/camera_hdf/interfaces/hdi_ipc/server/device/dcamera_device_callback_proxy.cpp @@ -20,6 +20,10 @@ #include "ipc_data_utils.h" #include "metadata_utils.h" +#ifndef BALTIMORE_CAMERA +#include "cmd_common.h" +#endif + namespace OHOS { namespace DistributedHardware { void DCameraDeviceCallbackProxy::OnError(ErrorType type, int32_t errorMsg) diff --git a/camera_hdf/interfaces/hdi_ipc/server/device/dcamera_device_stub.cpp b/camera_hdf/interfaces/hdi_ipc/server/device/dcamera_device_stub.cpp index 81be1631..f2691921 100644 --- a/camera_hdf/interfaces/hdi_ipc/server/device/dcamera_device_stub.cpp +++ b/camera_hdf/interfaces/hdi_ipc/server/device/dcamera_device_stub.cpp @@ -22,6 +22,10 @@ #include "istream_operator_callback.h" #include "metadata_utils.h" +#ifndef BALTIMORE_CAMERA +#include "cmd_common.h" +#endif + namespace OHOS { namespace DistributedHardware { int32_t DCameraDeviceStub::OnRemoteRequest(uint32_t code, MessageParcel& data, MessageParcel& reply, diff --git a/camera_hdf/interfaces/hdi_ipc/server/host/dcamera_host_callback_proxy.cpp b/camera_hdf/interfaces/hdi_ipc/server/host/dcamera_host_callback_proxy.cpp index eed9b4f4..2fdae24c 100644 --- a/camera_hdf/interfaces/hdi_ipc/server/host/dcamera_host_callback_proxy.cpp +++ b/camera_hdf/interfaces/hdi_ipc/server/host/dcamera_host_callback_proxy.cpp @@ -18,6 +18,10 @@ #include #include "distributed_hardware_log.h" +#ifndef BALTIMORE_CAMERA +#include "cmd_common.h" +#endif + namespace OHOS { namespace DistributedHardware { void DCameraHostCallbackProxy::OnCameraStatus(const std::string &cameraId, CameraStatus status) diff --git a/camera_hdf/interfaces/hdi_ipc/server/host/dcamera_host_stub.cpp b/camera_hdf/interfaces/hdi_ipc/server/host/dcamera_host_stub.cpp index 5c11b712..32eadba3 100644 --- a/camera_hdf/interfaces/hdi_ipc/server/host/dcamera_host_stub.cpp +++ b/camera_hdf/interfaces/hdi_ipc/server/host/dcamera_host_stub.cpp @@ -23,6 +23,10 @@ #include "ipc_data_utils.h" #include "metadata_utils.h" +#ifndef BALTIMORE_CAMERA +#include "cmd_common.h" +#endif + namespace OHOS { namespace DistributedHardware { DCameraHostStub::DCameraHostStub() diff --git a/camera_hdf/interfaces/hdi_ipc/server/operator/doffline_stream_operator_stub.cpp b/camera_hdf/interfaces/hdi_ipc/server/operator/doffline_stream_operator_stub.cpp index d378f32b..d5be009c 100644 --- a/camera_hdf/interfaces/hdi_ipc/server/operator/doffline_stream_operator_stub.cpp +++ b/camera_hdf/interfaces/hdi_ipc/server/operator/doffline_stream_operator_stub.cpp @@ -17,6 +17,10 @@ #include #include "distributed_hardware_log.h" +#ifndef BALTIMORE_CAMERA +#include "cmd_common.h" +#endif + namespace OHOS { namespace DistributedHardware { int32_t DOfflineStreamOperatorStub::OnRemoteRequest(uint32_t code, MessageParcel &data, MessageParcel &reply, diff --git a/camera_hdf/interfaces/hdi_ipc/server/operator/dstream_operator_callback_proxy.cpp b/camera_hdf/interfaces/hdi_ipc/server/operator/dstream_operator_callback_proxy.cpp index 9e206856..b971960a 100644 --- a/camera_hdf/interfaces/hdi_ipc/server/operator/dstream_operator_callback_proxy.cpp +++ b/camera_hdf/interfaces/hdi_ipc/server/operator/dstream_operator_callback_proxy.cpp @@ -18,6 +18,10 @@ #include #include "distributed_hardware_log.h" +#ifndef BALTIMORE_CAMERA +#include "cmd_common.h" +#endif + namespace OHOS { namespace DistributedHardware { void DStreamOperatorCallbackProxy::OnCaptureStarted(int32_t captureId, const std::vector &streamId) diff --git a/camera_hdf/interfaces/hdi_ipc/server/operator/dstream_operator_stub.cpp b/camera_hdf/interfaces/hdi_ipc/server/operator/dstream_operator_stub.cpp index b8dc46ad..8a3132b9 100644 --- a/camera_hdf/interfaces/hdi_ipc/server/operator/dstream_operator_stub.cpp +++ b/camera_hdf/interfaces/hdi_ipc/server/operator/dstream_operator_stub.cpp @@ -21,6 +21,10 @@ #include "istream_operator_callback.h" #include "metadata_utils.h" +#ifndef BALTIMORE_CAMERA +#include "cmd_common.h" +#endif + namespace OHOS { namespace DistributedHardware { int32_t DStreamOperatorStub::OnRemoteRequest(uint32_t code, MessageParcel &data, MessageParcel &reply, diff --git a/camera_hdf/interfaces/hdi_ipc/server/provider/dcamera_provider_stub.cpp b/camera_hdf/interfaces/hdi_ipc/server/provider/dcamera_provider_stub.cpp index cb1245a9..b4c00961 100644 --- a/camera_hdf/interfaces/hdi_ipc/server/provider/dcamera_provider_stub.cpp +++ b/camera_hdf/interfaces/hdi_ipc/server/provider/dcamera_provider_stub.cpp @@ -14,6 +14,8 @@ */ #include "dcamera_provider_stub.h" + +#include #include #include #include diff --git a/distributedcamera.gni b/distributedcamera.gni index 8207be52..feba3fe8 100644 --- a/distributedcamera.gni +++ b/distributedcamera.gni @@ -17,7 +17,9 @@ distributedhardwarefwk_path = "//foundation/distributedhardware/distributedhardw hdf_framework_path = "//drivers/framework" -camera_hdf_path = "//drivers/peripheral/adapter" +camera_hdf_path_baltimore = "//drivers/peripheral/adapter" + +camera_hdf_path = "//drivers/peripheral" display_hdf_path = "//drivers/peripheral/display" diff --git a/services/cameraservice/sourceservice/include/distributedcameramgr/dcamerainterface/icamera_source_data_process.h b/services/cameraservice/sourceservice/include/distributedcameramgr/dcamerainterface/icamera_source_data_process.h index 5c19df20..d8b9693d 100644 --- a/services/cameraservice/sourceservice/include/distributedcameramgr/dcamerainterface/icamera_source_data_process.h +++ b/services/cameraservice/sourceservice/include/distributedcameramgr/dcamerainterface/icamera_source_data_process.h @@ -47,7 +47,7 @@ public: bool operator < (const DCameraStreamConfig& others) const { - return (this->width_ < others.width_) || ((this->width_ == others.width_) && (this->height_ < this->height_)); + return (this->width_ < others.width_) || ((this->width_ == others.width_) && (this->height_ < others.height_)); } }; diff --git a/services/data_process/include/utils/image_common_type.h b/services/data_process/include/utils/image_common_type.h index 9f692ea8..0b33c4c6 100644 --- a/services/data_process/include/utils/image_common_type.h +++ b/services/data_process/include/utils/image_common_type.h @@ -17,6 +17,7 @@ #define OHOS_IMAGE_COMMON_TYPE_H #include +#include namespace OHOS { namespace DistributedHardware { -- Gitee