• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 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 complince 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/ace/ace.gni")
16import("../../castplus_cast_engine_part.gni")
17import("../../config.gni")
18
19ohos_shared_library("cj_multimedia_avsession_ffi") {
20  branch_protector_ret = "pac_ret"
21  sanitize = {
22    cfi = true
23    cfi_cross_dso = true
24    debug = false
25  }
26
27  cflags = [
28    "-fdata-sections",
29    "-ffunction-sections",
30    "-fvisibility=hidden",
31  ]
32
33  include_dirs = [
34    "../native/session/include",
35    "../../interfaces/inner_api/native/session/include",
36    "../../utils/include",
37    "include",
38  ]
39
40  sources = [
41    "src/cj_avsession_callback.cpp",
42    "src/cj_avsession_controller_callback.cpp",
43    "src/cj_avsession_controller_ffi.cpp",
44    "src/cj_avsession_controller_impl.cpp",
45    "src/cj_avsession_ffi.cpp",
46    "src/cj_avsession_impl.cpp",
47    "src/cj_avsession_manager_ffi.cpp",
48    "src/cj_avsession_manager_impl.cpp",
49    "src/cj_avsession_media_description.cpp",
50    "src/cj_avsession_utils.cpp",
51  ]
52
53  deps = [
54    "../../utils:avsession_utils",
55    "../common:avsession_common",
56    "../native/session:avsession_client",
57  ]
58
59  external_deps = [
60    "ability_base:base",
61    "ability_base:want",
62    "ability_base:zuri",
63    "ability_runtime:ability_context_native",
64    "ability_runtime:ability_manager",
65    "ability_runtime:abilitykit_native",
66    "ability_runtime:app_manager",
67    "ability_runtime:cj_want_agent_ffi",
68    "ability_runtime:wantagent_innerkits",
69    "access_token:libtokenid_sdk",
70    "audio_framework:audio_client",
71    "bundle_framework:appexecfwk_base",
72    "bundle_framework:appexecfwk_core",
73    "c_utils:utils",
74    "curl:curl_shared",
75    "hilog:libhilog",
76    "image_framework:cj_image_ffi",
77    "image_framework:image",
78    "image_framework:image_native",
79    "input:libmmi-client",
80    "ipc:ipc_single",
81    "napi:ace_napi",
82    "napi:cj_bind_ffi",
83    "napi:cj_bind_native",
84    "safwk:system_ability_fwk",
85    "samgr:samgr_proxy",
86  ]
87
88  if (castplus_cast_engine_enable) {
89    cflags += [ "-DCASTPLUS_CAST_ENGINE_ENABLE" ]
90    sources += [
91      "src/cj_avsession_cast_controller_callback.cpp",
92      "src/cj_avsession_cast_controller_ffi.cpp",
93      "src/cj_avsession_cast_controller_impl.cpp",
94    ]
95    deps += [ "../native/session:avsession_cast_client" ]
96  }
97
98  innerapi_tags = [ "platformsdk" ]
99  part_name = "av_session"
100  subsystem_name = "multimedia"
101}
102