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 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
17config("hevc_decoder_public_cfg") {
18  include_dirs = [
19    "$av_codec_root_dir/services/engine/base/include",
20    "$av_codec_root_dir/services/engine/codec/video/hevcdecoder",
21    "$av_codec_root_dir/services/engine/codec/video/hevcdecoder/include",
22    "$av_codec_root_dir/interfaces/inner_api/native",
23  ]
24}
25
26ohos_shared_library("hevc_decoder") {
27  branch_protector_ret = "pac_ret"
28  install_enable = true
29  sanitize = av_codec_sanitize
30  public_configs = [ ":hevc_decoder_public_cfg" ]
31  include_dirs = [
32    "$av_codec_root_dir/services/dfx/include",
33    "$av_codec_root_dir/services/engine/common/include",
34    "$av_codec_root_dir/services/utils/include",
35    "$av_codec_root_dir/services/engine/plugin/interface",
36  ]
37
38  defines = []
39  defines += av_codec_defines
40
41  sources = [
42    "$av_codec_root_dir/services/engine/codec/video/hevcdecoder/hevc_decoder.cpp",
43    "$av_codec_root_dir/services/engine/codec/video/hevcdecoder/hevc_decoder_api.cpp",
44  ]
45
46  deps = [
47    "$av_codec_root_dir/services/engine/base:av_codec_codec_base",
48    "$av_codec_root_dir/services/engine/common:av_codec_engine_common",
49  ]
50
51  public_deps = [
52    "$av_codec_root_dir/services/dfx:av_codec_service_dfx",
53    "$av_codec_root_dir/services/utils:av_codec_service_utils",
54  ]
55
56  external_deps = [
57    "bounds_checking_function:libsec_static",
58    "c_utils:utils",
59    "ffmpeg:libohosffmpeg",
60    "graphic_surface:surface",
61    "graphic_surface:sync_fence",
62    "hilog:libhilog",
63    "hisysevent:libhisysevent",
64    "hitrace:hitrace_meter",
65    "init:libbegetutil",
66    "media_foundation:media_foundation",
67  ]
68
69  subsystem_name = "multimedia"
70  part_name = "av_codec"
71
72  if (build_variant != "user") {
73    defines += [ "BUILD_ENG_VERSION" ]
74  }
75}
76