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/ohos.gni")
15import("//foundation/multimedia/av_codec/config.gni")
16
17ohos_static_library("av_codec_engine_codeclist") {
18  branch_protector_ret = "pac_ret"
19  sanitize = av_codec_sanitize
20  include_dirs = [
21    "./",
22    "$av_codec_root_dir/interfaces/inner_api/native",
23    "$av_codec_root_dir/interfaces/kits/c",
24    "$av_codec_root_dir/services/dfx/include",
25    "$av_codec_root_dir/services/utils/include/",
26    "$av_codec_root_dir/services/engine/base/include/",
27    "$av_codec_root_dir/services/engine/codec/include/audio/",
28    "$av_codec_root_dir/services/engine/codec/include/video/",
29    "$av_codec_root_dir/services/engine/codec/video/fcodec",
30    "$av_codec_root_dir/services/engine/codec/video/hevcdecoder",
31    "$av_codec_root_dir/services/engine/common/include/",
32    "$av_codec_root_dir/services/media_engine/plugins/ffmpeg_adapter/common/",
33  ]
34  defines = []
35  if (av_codec_enable_special_codec) {
36    defines += [ "AV_CODEC_AUDIO_VIVID_CAPACITY" ]
37  }
38  if (target_cpu == "arm64") {
39    av_codec_path = "\"/system/lib64\""
40  } else {
41    av_codec_path = "\"/system/lib\""
42  }
43  defines += [ "AV_CODEC_PATH=${av_codec_path}" ]
44
45  sources = [
46    "$av_codec_root_dir/services/media_engine/plugins/ffmpeg_adapter/common/hdi_codec.cpp",
47    "audio_codeclist_info.cpp",
48    "codec_ability_singleton.cpp",
49    "codeclist_builder.cpp",
50    "codeclist_core.cpp",
51  ]
52
53  deps = [
54    "$av_codec_root_dir/services/dfx:av_codec_service_dfx",
55    "$av_codec_root_dir/services/utils:av_codec_service_utils",
56  ]
57
58  external_deps = [
59    "drivers_interface_codec:libcodec_proxy_3.0",
60    "ffmpeg:libohosffmpeg",
61    "graphic_surface:surface",
62    "graphic_surface:sync_fence",
63    "hilog:libhilog",
64    "media_foundation:media_foundation",
65  ]
66
67  subsystem_name = "multimedia"
68  part_name = "av_codec"
69}
70