• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022-2024 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14import("//build/ohos.gni")
15import("//build/ohos_var.gni")
16import(
17    "//foundation/distributedhardware/distributed_camera/distributedcamera.gni")
18
19ohos_shared_library("distributed_camera_data_process") {
20  sanitize = {
21    cfi = true
22    cfi_cross_dso = true
23    debug = false
24    boundary_sanitize = true
25    integer_overflow = true
26    ubsan = true
27  }
28  stack_protector_ret = true
29
30  include_dirs = [
31    "include/interfaces",
32    "include/eventbus",
33    "include/pipeline",
34    "include/utils",
35    "include/pipeline_node/multimedia_codec/decoder",
36    "include/pipeline_node/multimedia_codec/encoder",
37    "include/pipeline_node/fpscontroller",
38    "include/pipeline_node/scale_conversion",
39    "${common_path}/include/constants",
40    "${common_path}/include/utils",
41    "${feeding_smoother_path}/base",
42    "${feeding_smoother_path}/derived",
43    "${feeding_smoother_path}/utils",
44    "${innerkits_path}/native_cpp/camera_source/include",
45    "${services_path}/cameraservice/base/include",
46  ]
47
48  sources = [
49    "${services_path}/cameraservice/base/src/dcamera_sink_frame_info.cpp",
50    "src/pipeline/abstract_data_process.cpp",
51    "src/pipeline/dcamera_pipeline_sink.cpp",
52    "src/pipeline/dcamera_pipeline_source.cpp",
53    "src/pipeline_node/fpscontroller/fps_controller_process.cpp",
54    "src/pipeline_node/multimedia_codec/decoder/decode_surface_listener.cpp",
55    "src/pipeline_node/multimedia_codec/decoder/decode_video_callback.cpp",
56    "src/pipeline_node/multimedia_codec/encoder/encode_data_process.cpp",
57    "src/pipeline_node/multimedia_codec/encoder/encode_video_callback.cpp",
58    "src/utils/image_common_type.cpp",
59    "src/utils/property_carrier.cpp",
60  ]
61
62  ldflags = [
63    "-fpie",
64    "-Wl,-z,relro",
65    "-Wl,-z,now",
66  ]
67
68  deps = [ "${common_path}:distributed_camera_utils" ]
69
70  external_deps = [
71    "av_codec:av_codec_client",
72    "cJSON:cjson",
73    "c_utils:utils",
74    "drivers_interface_display:libdisplay_composer_hdi_impl_1.2",
75    "drivers_interface_display:libdisplay_composer_proxy_1.0",
76    "eventhandler:libeventhandler",
77    "graphic_surface:surface",
78    "hilog:libhilog",
79    "hitrace:hitrace_meter",
80    "ipc:ipc_single",
81    "media_foundation:media_foundation",
82    "safwk:system_ability_fwk",
83    "samgr:samgr_proxy",
84  ]
85
86  if (!distributed_camera_common) {
87    sources += [
88      "src/pipeline_node/multimedia_codec/decoder/decode_data_process.cpp",
89      "src/pipeline_node/scale_conversion/scale_convert_process.cpp",
90    ]
91  } else {
92    sources += [
93      "src/pipeline_node/multimedia_codec/decoder/decode_data_process_common.cpp",
94      "src/pipeline_node/scale_conversion/scale_convert_process_common.cpp",
95    ]
96    external_deps += [ "ffmpeg:libohosffmpeg" ]
97  }
98
99  cflags = [
100    "-fPIC",
101    "-Wall",
102  ]
103
104  if (distributed_camera_common) {
105    cflags += [ "-DDCAMERA_SUPPORT_FFMPEG" ]
106  } else {
107    cflags += [ "-DDCAMERA_MMAP_RESERVE" ]
108  }
109
110  defines = [
111    "HI_LOG_ENABLE",
112    "DH_LOG_TAG=\"dcameradataproc\"",
113    "LOG_DOMAIN=0xD004150",
114  ]
115
116  if (build_variant == "root") {
117    defines += [ "DUMP_DCAMERA_FILE" ]
118  }
119
120  subsystem_name = "distributedhardware"
121
122  part_name = "distributed_camera"
123}
124