• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 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/config/ohos/config.gni")
15import("//build/ohos.gni")
16import("//build/config/components/idl_tool/idl.gni")
17import("//foundation/multimedia/video_processing_engine/config.gni")
18
19group("video_processing_service_group") {
20  deps = [
21    ":videoprocessingservice",
22    ":videoprocessingserviceimpl",
23    "sa_profile:video_processing_service",
24    "sa_profile:video_processing_service_etc"
25  ]
26}
27
28idl_interface_sources = [
29  "${target_gen_dir}/video_processing_service_manager_proxy.cpp",
30  "${target_gen_dir}/video_processing_service_manager_stub.cpp",
31]
32
33idl_gen_interface("videoprocessingservice_interface") {
34    src_idl = rebase_path("IVideoProcessingServiceManager.idl")
35    dst_file = string_join(",", idl_interface_sources)
36    log_domainid = "0x00010256"
37    log_tag = "VideoProcessingService"
38}
39
40config("videoprocessingservice_config") {
41  visibility = [ ":*" ]
42  include_dirs = [
43    "include",
44    "${target_gen_dir}",
45  ]
46  cflags = []
47  if (target_cpu == "arm") {
48    cflags += [ "-DBINDER_IPC_32BIT" ]
49  }
50}
51
52config("videoprocessingservice_export_config") {
53  include_dirs = [
54    "$ALGORITHM_COMMON_DIR/include",
55    "$ALGORITHM_EXTENSION_MANAGER_DIR/include",
56    "$DFX_DIR/include",
57    "$INTERFACES_INNER_API_DIR",
58    "$SERVICES_DIR/algorithm/include/",
59    "$SERVICES_DIR/utils/include/",
60    "${target_gen_dir}",
61  ]
62}
63
64ohos_shared_library("videoprocessingserviceimpl") {
65  install_enable = true
66
67  sanitize = {
68    boundary_sanitize = true
69    cfi = true
70    cfi_cross_dso = true
71    integer_overflow = true
72    ubsan = true
73    debug = false
74  }
75
76  configs = [ ":videoprocessingservice_config" ]
77  public_configs = [ ":videoprocessingservice_export_config" ]
78
79  sources = [
80    # common for VPE
81    "$ALGORITHM_COMMON_DIR/vpe_utils_common.cpp",
82    "$DFX_DIR/vpe_trace.cpp",
83    # Only for service
84    "algorithm/video_processing_algorithm_base.cpp",
85    "algorithm/video_processing_algorithm_factory.cpp",
86    "algorithm/video_processing_algorithm_without_data.cpp",
87    "utils/configuration_helper.cpp",
88    "utils/surface_buffer_info.cpp",
89    "utils/vpe_sa_utils.cpp",
90  ]
91  defines = [ "AMS_LOG_TAG = \"VideoProcessingService\"" ]
92
93  include_dirs = [
94    "include",
95    "${target_gen_dir}",
96  ]
97
98  external_deps = [
99    "c_utils:utils",
100    "graphic_2d:2d_graphics",
101    "graphic_surface:surface",
102    "hilog:libhilog",
103    "hitrace:hitrace_meter",
104    "image_framework:image_native",
105    "image_framework:pixelmap",
106    "libxml2:libxml2",
107    "media_foundation:media_foundation",
108  ]
109  subsystem_name = "multimedia"
110  part_name = "video_processing_engine"
111}
112
113ohos_shared_library("videoprocessingservice") {
114  install_enable = true
115
116  sanitize = {
117    boundary_sanitize = true
118    cfi = true
119    cfi_cross_dso = true
120    integer_overflow = true
121    ubsan = true
122    debug = false
123  }
124
125  shlib_type = "sa"
126
127  configs = [ ":videoprocessingservice_config" ]
128  public_configs = [ ":videoprocessingservice_export_config" ]
129
130  output_values = get_target_outputs(":videoprocessingservice_interface")
131  sources = [
132    "src/video_processing_server.cpp",
133  ]
134  sources += filter_include(output_values, [ "*.cpp" ])
135  defines = [ "AMS_LOG_TAG = \"VideoProcessingService\"" ]
136
137  include_dirs = [
138    "include",
139    "${target_gen_dir}"
140  ]
141
142  deps = [
143    ":videoprocessingservice_interface",
144    ":videoprocessingserviceimpl",
145  ]
146
147  external_deps = [
148    "c_utils:utils",
149    "eventhandler:libeventhandler",
150    "graphic_2d:2d_graphics",
151    "graphic_surface:surface",
152    "hilog:libhilog",
153    "hitrace:hitrace_meter",
154    "image_framework:image_native",
155    "image_framework:pixelmap",
156    "ipc:ipc_single",
157    "media_foundation:media_foundation",
158    "safwk:system_ability_fwk",
159    "samgr:samgr_proxy",
160  ]
161  subsystem_name = "multimedia"
162  part_name = "video_processing_engine"
163}
164