diff --git a/distributedcamera.gni b/distributedcamera.gni index fc2a0e8..577887b 100644 --- a/distributedcamera.gni +++ b/distributedcamera.gni @@ -37,3 +37,7 @@ fwk_common_path = "${distributedhardwarefwk_path}/common" fwk_services_path = "${distributedhardwarefwk_path}/services" build_flags = [ "-Werror" ] + +declare_args() { + distributed_camera_common = true +} diff --git a/services/cameraservice/cameraoperator/client/BUILD.gn b/services/cameraservice/cameraoperator/client/BUILD.gn index fcf2a64..753351f 100644 --- a/services/cameraservice/cameraoperator/client/BUILD.gn +++ b/services/cameraservice/cameraoperator/client/BUILD.gn @@ -57,7 +57,7 @@ ohos_shared_library("distributed_camera_client") { "src/callback/dcamera_video_callback.cpp", ] - if ("${product_name}" == "m40") { + if (!distributed_camera_common) { sources += [ "src/dcamera_client.cpp", "src/listener/dcamera_photo_surface_listener.cpp", diff --git a/services/cameraservice/cameraoperator/handler/BUILD.gn b/services/cameraservice/cameraoperator/handler/BUILD.gn index 1474f3c..a1e100f 100644 --- a/services/cameraservice/cameraoperator/handler/BUILD.gn +++ b/services/cameraservice/cameraoperator/handler/BUILD.gn @@ -47,7 +47,7 @@ ohos_shared_library("distributed_camera_handler") { sources = [ "${services_path}/cameraservice/cameraoperator/client/src/callback/dcamera_manager_callback.cpp" ] - if ("${product_name}" == "m40") { + if (!distributed_camera_common) { sources += [ "src/dcamera_handler.cpp" ] } else { sources += [ "src/dcamera_handler_common.cpp" ] diff --git a/services/cameraservice/sinkservice/BUILD.gn b/services/cameraservice/sinkservice/BUILD.gn index 9467335..6780bc1 100644 --- a/services/cameraservice/sinkservice/BUILD.gn +++ b/services/cameraservice/sinkservice/BUILD.gn @@ -89,7 +89,7 @@ ohos_shared_library("distributed_camera_sink") { "src/distributedcameramgr/listener/dcamera_sink_output_channel_listener.cpp", ] - if ("${product_name}" == "m40") { + if (!distributed_camera_common) { sources += [ "src/distributedcameramgr/dcamera_sink_data_process.cpp" ] } else { sources += diff --git a/services/data_process/BUILD.gn b/services/data_process/BUILD.gn index 4fd4944..afa1847 100644 --- a/services/data_process/BUILD.gn +++ b/services/data_process/BUILD.gn @@ -57,7 +57,7 @@ ohos_shared_library("distributed_camera_data_process") { "src/utils/image_common_type.cpp", ] - if ("${product_name}" == "m40") { + if (!distributed_camera_common) { sources += [ "src/pipeline_node/multimedia_codec/decoder/decode_data_process.cpp", "src/pipeline_node/multimedia_codec/encoder/encode_data_process.cpp",