146f34cbfSopenharmony_ci# Copyright (C) 2024 Huawei Device Co., Ltd.
246f34cbfSopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
346f34cbfSopenharmony_ci# you may not use this file except in compliance with the License.
446f34cbfSopenharmony_ci# You may obtain a copy of the License at
546f34cbfSopenharmony_ci#
646f34cbfSopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
746f34cbfSopenharmony_ci#
846f34cbfSopenharmony_ci# Unless required by applicable law or agreed to in writing, software
946f34cbfSopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
1046f34cbfSopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1146f34cbfSopenharmony_ci# See the License for the specific language governing permissions and
1246f34cbfSopenharmony_ci# limitations under the License.
1346f34cbfSopenharmony_ci
1446f34cbfSopenharmony_ciimport("//build/ohos.gni")
1546f34cbfSopenharmony_ciimport("//build/ohos/ace/ace.gni")
1646f34cbfSopenharmony_ciimport("../../config.gni")
1746f34cbfSopenharmony_ciimport("../../multimedia_aafwk.gni")
1846f34cbfSopenharmony_ci
1946f34cbfSopenharmony_ciohos_shared_library("cj_multimedia_audio_ffi") {
2046f34cbfSopenharmony_ci  sanitize = {
2146f34cbfSopenharmony_ci    cfi = true  # Enable/disable control flow integrity detection
2246f34cbfSopenharmony_ci    boundary_sanitize = true  # Enable boundary san detection
2346f34cbfSopenharmony_ci    cfi_cross_dso = true  # Cross-SO CFI Checks
2446f34cbfSopenharmony_ci    integer_overflow = true  # Enable integer overflow detection
2546f34cbfSopenharmony_ci    ubsan = true  # Enable some Ubsan options
2646f34cbfSopenharmony_ci    debug = false
2746f34cbfSopenharmony_ci  }
2846f34cbfSopenharmony_ci
2946f34cbfSopenharmony_ci  include_dirs = [
3046f34cbfSopenharmony_ci    "include",
3146f34cbfSopenharmony_ci    "../../frameworks/native/include",
3246f34cbfSopenharmony_ci    "../../interfaces/inner_api",
3346f34cbfSopenharmony_ci  ]
3446f34cbfSopenharmony_ci
3546f34cbfSopenharmony_ci  sources = [
3646f34cbfSopenharmony_ci    "src/multimedia_audio_capturer_callback.cpp",
3746f34cbfSopenharmony_ci    "src/multimedia_audio_capturer_impl.cpp",
3846f34cbfSopenharmony_ci    "src/multimedia_audio_common.cpp",
3946f34cbfSopenharmony_ci    "src/multimedia_audio_ffi.cpp",
4046f34cbfSopenharmony_ci    "src/multimedia_audio_manager_impl.cpp",
4146f34cbfSopenharmony_ci    "src/multimedia_audio_routing_manager_callback.cpp",
4246f34cbfSopenharmony_ci    "src/multimedia_audio_routing_manager_impl.cpp",
4346f34cbfSopenharmony_ci    "src/multimedia_audio_stream_manager_callback.cpp",
4446f34cbfSopenharmony_ci    "src/multimedia_audio_stream_manager_impl.cpp",
4546f34cbfSopenharmony_ci    "src/multimedia_audio_volume_group_manager_impl.cpp",
4646f34cbfSopenharmony_ci    "src/multimedia_audio_volume_manager_impl.cpp",
4746f34cbfSopenharmony_ci  ]
4846f34cbfSopenharmony_ci
4946f34cbfSopenharmony_ci  deps = [
5046f34cbfSopenharmony_ci    "../../services/audio_policy:audio_policy_client",
5146f34cbfSopenharmony_ci    "../../services/audio_service:audio_client",
5246f34cbfSopenharmony_ci    "../native/audiocapturer:audio_capturer",
5346f34cbfSopenharmony_ci    "../native/audiorenderer:audio_renderer",
5446f34cbfSopenharmony_ci    "../native/audioutils:audio_utils",
5546f34cbfSopenharmony_ci  ]
5646f34cbfSopenharmony_ci
5746f34cbfSopenharmony_ci  external_deps = [
5846f34cbfSopenharmony_ci    "c_utils:utils",
5946f34cbfSopenharmony_ci    "hilog:libhilog",
6046f34cbfSopenharmony_ci    "napi:ace_napi",
6146f34cbfSopenharmony_ci    "napi:cj_bind_ffi",
6246f34cbfSopenharmony_ci    "napi:cj_bind_native",
6346f34cbfSopenharmony_ci  ]
6446f34cbfSopenharmony_ci
6546f34cbfSopenharmony_ci  innerapi_tags = [ "platformsdk" ]
6646f34cbfSopenharmony_ci  part_name = "audio_framework"
6746f34cbfSopenharmony_ci  subsystem_name = "multimedia"
6846f34cbfSopenharmony_ci}
69