1# Copyright (c) 2022-2023 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 include_dirs = [ 21 "${fwk_common_path}/utils/include", 22 "${fwk_utils_path}/include/eventbus", 23 "${graphicstandard_path}/frameworks/surface/include", 24 "${services_path}/cameraservice/base/include", 25 ] 26 27 include_dirs += [ 28 "include/interfaces", 29 "include/eventbus", 30 "include/pipeline", 31 "include/utils", 32 "include/pipeline_node/multimedia_codec/decoder", 33 "include/pipeline_node/multimedia_codec/encoder", 34 "include/pipeline_node/fpscontroller", 35 "include/pipeline_node/scale_conversion", 36 "${common_path}/include/constants", 37 "${common_path}/include/utils", 38 "${feeding_smoother_path}/base", 39 "${feeding_smoother_path}/derived", 40 "${feeding_smoother_path}/utils", 41 "${innerkits_path}/native_cpp/camera_source/include", 42 "//third_party/json/include", 43 ] 44 45 sources = [ 46 "${services_path}/cameraservice/base/src/dcamera_sink_frame_info.cpp", 47 "src/pipeline/abstract_data_process.cpp", 48 "src/pipeline/dcamera_pipeline_sink.cpp", 49 "src/pipeline/dcamera_pipeline_source.cpp", 50 "src/pipeline_node/fpscontroller/fps_controller_process.cpp", 51 "src/pipeline_node/multimedia_codec/decoder/decode_surface_listener.cpp", 52 "src/pipeline_node/multimedia_codec/decoder/decode_video_callback.cpp", 53 "src/pipeline_node/multimedia_codec/encoder/encode_data_process.cpp", 54 "src/pipeline_node/multimedia_codec/encoder/encode_video_callback.cpp", 55 "src/utils/image_common_type.cpp", 56 "src/utils/property_carrier.cpp", 57 ] 58 59 deps = [ "${common_path}:distributed_camera_utils" ] 60 61 if (!distributed_camera_common) { 62 include_dirs += [ "//third_party/libyuv/files/include" ] 63 sources += [ 64 "src/pipeline_node/multimedia_codec/decoder/decode_data_process.cpp", 65 "src/pipeline_node/scale_conversion/scale_convert_process.cpp", 66 ] 67 deps += [ "//third_party/libyuv:yuv" ] 68 } else { 69 include_dirs += [ "//third_party/ffmpeg/" ] 70 sources += [ 71 "src/pipeline_node/multimedia_codec/decoder/decode_data_process_common.cpp", 72 "src/pipeline_node/scale_conversion/scale_convert_process_common.cpp", 73 ] 74 deps += [ "//third_party/ffmpeg:libohosffmpeg" ] 75 } 76 77 cflags = [ 78 "-fPIC", 79 "-Wall", 80 ] 81 82 if (distributed_camera_common) { 83 cflags += [ "-DDCAMERA_SUPPORT_FFMPEG" ] 84 } 85 86 defines = [ 87 "HI_LOG_ENABLE", 88 "DH_LOG_TAG=\"dcameradataproc\"", 89 "LOG_DOMAIN=0xD004100", 90 ] 91 92 external_deps = [ 93 "c_utils:utils", 94 "drivers_interface_display:libdisplay_composer_proxy_1.0", 95 "eventhandler:libeventhandler", 96 "graphic_2d:surface", 97 "hitrace:hitrace_meter", 98 "player_framework:media_client", 99 ] 100 101 subsystem_name = "distributedhardware" 102 103 part_name = "distributed_camera" 104} 105