• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2023-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
14declare_args() {
15  av_codec_support_capi = true
16  av_codec_support_codec = true
17  av_codec_client_support_codec = true
18  av_codec_support_codeclist = true
19  av_codec_support_hcodec = true
20  av_codec_support_demuxer = true
21  av_codec_support_source = true
22  av_codec_support_muxer = true
23  av_codec_support_test = true
24  av_codec_support_xcollie = true
25  av_codec_support_bitstream_dump = true
26  av_codec_support_codec_perf_test = false
27  av_codec_support_drm = false
28  av_codec_enable_special_codec = false
29}
30av_codec_sanitize = {
31  boundary_sanitize = true
32  cfi = true
33  cfi_cross_dso = true
34  integer_overflow = true
35  ubsan = true
36  debug = false
37}
38av_codec_root_dir = "//foundation/multimedia/av_codec"
39media_foundation_root_dir = "//foundation/multimedia/media_foundation"
40audio_framework_root_dir = "//foundation/multimedia/audio_framework"
41graphic_2d_root_dir = "//foundation/graphic/graphic_2d"
42c_utils_root_dir = "//commonlibrary/c_utils"
43drm_framework_root_dir = "//foundation/multimedia/drm_framework"
44
45av_codec_defines = [
46  "HST_ANY_WITH_NO_RTTI",
47  "MEDIA_OHOS",
48]
49
50if (av_codec_support_capi) {
51  av_codec_defines += [ "SUPPORT_CAPI" ]
52} else {
53  av_codec_defines += [ "UNSUPPORT_CAPI" ]
54}
55
56if (av_codec_support_codec) {
57  av_codec_defines += [ "SUPPORT_CODEC" ]
58} else {
59  av_codec_defines += [ "UNSUPPORT_CODEC" ]
60}
61
62if (av_codec_support_codeclist) {
63  av_codec_defines += [ "SUPPORT_CODECLIST" ]
64} else {
65  av_codec_defines += [ "UNSUPPORT_CODECLIST" ]
66}
67
68if (av_codec_support_hcodec) {
69  av_codec_defines += [ "SUPPORT_HCODEC" ]
70} else {
71  av_codec_defines += [ "UNSUPPORT_HCODEC" ]
72}
73
74if (av_codec_support_demuxer) {
75  av_codec_defines += [ "SUPPORT_DEMUXER" ]
76} else {
77  av_codec_defines += [ "UNSUPPORT_DEMUXER" ]
78}
79
80if (av_codec_support_muxer) {
81  av_codec_defines += [ "SUPPORT_MUXER" ]
82} else {
83  av_codec_defines += [ "UNSUPPORT_MUXER" ]
84}
85
86if (av_codec_support_source) {
87  av_codec_defines += [ "SUPPORT_SOURCE" ]
88} else {
89  av_codec_defines += [ "UNSUPPORT_SOURCE" ]
90}
91
92if (av_codec_support_xcollie) {
93  av_codec_defines += [ "HICOLLIE_ENABLE" ]
94}
95
96if (av_codec_support_bitstream_dump) {
97  av_codec_defines += [ "BITSTREAM_DUMP_ENABLE" ]
98}
99
100if (defined(global_parts_info) &&
101    defined(global_parts_info.multimedia_drm_framework)) {
102  av_codec_support_drm = true
103}
104
105if (av_codec_support_drm) {
106  av_codec_defines += [ "SUPPORT_DRM" ]
107} else {
108  av_codec_defines += [ "UNSUPPORT_DRM" ]
109}
110