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 deps = [ "${common_path}:distributed_camera_utils" ] 63 64 external_deps = [ 65 "av_codec:av_codec_client", 66 "cJSON:cjson", 67 "c_utils:utils", 68 "drivers_interface_display:libdisplay_composer_proxy_1.0", 69 "eventhandler:libeventhandler", 70 "graphic_surface:surface", 71 "hilog:libhilog", 72 "hitrace:hitrace_meter", 73 "media_foundation:media_foundation", 74 "safwk:system_ability_fwk", 75 "samgr:samgr_proxy", 76 ] 77 78 if (!distributed_camera_common) { 79 sources += [ 80 "src/pipeline_node/multimedia_codec/decoder/decode_data_process.cpp", 81 "src/pipeline_node/scale_conversion/scale_convert_process.cpp", 82 ] 83 } else { 84 sources += [ 85 "src/pipeline_node/multimedia_codec/decoder/decode_data_process_common.cpp", 86 "src/pipeline_node/scale_conversion/scale_convert_process_common.cpp", 87 ] 88 external_deps += [ "ffmpeg:libohosffmpeg" ] 89 } 90 91 cflags = [ 92 "-fPIC", 93 "-Wall", 94 ] 95 96 if (distributed_camera_common) { 97 cflags += [ "-DDCAMERA_SUPPORT_FFMPEG" ] 98 } else { 99 cflags += [ "-DDCAMERA_MMAP_RESERVE" ] 100 } 101 102 defines = [ 103 "HI_LOG_ENABLE", 104 "DH_LOG_TAG=\"dcameradataproc\"", 105 "LOG_DOMAIN=0xD004150", 106 ] 107 108 if (build_variant == "root") { 109 defines += [ "DUMP_DCAMERA_FILE" ] 110 } 111 112 subsystem_name = "distributedhardware" 113 114 part_name = "distributed_camera" 115} 116