• 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_drm = false
27  av_codec_enable_special_codec = false
28  av_codec_support_video_processing_engine = false
29  if (defined(global_parts_info) &&
30      defined(global_parts_info.multimedia_video_processing_engine)) {
31    av_codec_support_video_processing_engine = true
32  }
33  av_codec_support_libcurl = true
34  av_codec_support_software_codec = true
35  av_codec_support_fcodec = true
36  av_codec_support_avc_encoder = true
37  av_codec_support_hevc_decoder = true
38  av_codec_support_mp4v_decoder = true
39  av_codec_enable_start_stop_on_demand = false
40  av_codec_hcodec_enable_qos_the_whole_time = false
41  av_codec_enable_codec_rm = false
42  av_codec_enable_codec_rv = false
43  av_codec_enable_codec_cook = false
44  av_codec_enable_demuxer_lrc = false
45  av_codec_enable_demuxer_sami = false
46  av_codec_enable_demuxer_ass = false
47  av_codec_support_camera_post_processor = false
48  if (defined(global_parts_info) &&
49      defined(global_parts_info.hdf_drivers_interface_camera_ext)) {
50    av_codec_support_camera_post_processor = true
51  }
52}
53av_codec_sanitize = {
54  boundary_sanitize = true
55  cfi = true
56  cfi_cross_dso = true
57  integer_overflow = true
58  ubsan = true
59  debug = false
60}
61av_codec_test_sanitize = {
62  debug = false
63}
64av_codec_root_dir = "//foundation/multimedia/av_codec"
65media_foundation_root_dir = "//foundation/multimedia/media_foundation"
66audio_framework_root_dir = "//foundation/multimedia/audio_framework"
67graphic_2d_root_dir = "//foundation/graphic/graphic_2d"
68graphic_suface_root_dir = "//foundation/graphic/graphic_surface"
69c_utils_root_dir = "//commonlibrary/c_utils"
70drm_framework_root_dir = "//foundation/multimedia/drm_framework"
71video_processing_engine_root_dir =
72    "//foundation/multimedia/video_processing_engine"
73
74av_codec_defines = [
75  "HST_ANY_WITH_NO_RTTI",
76  "MEDIA_OHOS",
77]
78
79if (av_codec_support_capi) {
80  av_codec_defines += [ "SUPPORT_CAPI" ]
81} else {
82  av_codec_defines += [ "UNSUPPORT_CAPI" ]
83}
84
85if (av_codec_support_codec) {
86  av_codec_defines += [ "SUPPORT_CODEC" ]
87} else {
88  av_codec_defines += [ "UNSUPPORT_CODEC" ]
89}
90
91if (av_codec_support_codeclist) {
92  av_codec_defines += [ "SUPPORT_CODECLIST" ]
93} else {
94  av_codec_defines += [ "UNSUPPORT_CODECLIST" ]
95}
96
97if (av_codec_support_hcodec) {
98  av_codec_defines += [ "SUPPORT_HCODEC" ]
99} else {
100  av_codec_defines += [ "UNSUPPORT_HCODEC" ]
101}
102
103if (av_codec_support_demuxer) {
104  av_codec_defines += [ "SUPPORT_DEMUXER" ]
105} else {
106  av_codec_defines += [ "UNSUPPORT_DEMUXER" ]
107}
108
109if (av_codec_support_muxer) {
110  av_codec_defines += [ "SUPPORT_MUXER" ]
111} else {
112  av_codec_defines += [ "UNSUPPORT_MUXER" ]
113}
114
115if (av_codec_support_source) {
116  av_codec_defines += [ "SUPPORT_SOURCE" ]
117} else {
118  av_codec_defines += [ "UNSUPPORT_SOURCE" ]
119}
120
121if (av_codec_support_xcollie) {
122  av_codec_defines += [ "HICOLLIE_ENABLE" ]
123}
124
125if (av_codec_support_bitstream_dump) {
126  av_codec_defines += [ "BITSTREAM_DUMP_ENABLE" ]
127}
128
129if (defined(global_parts_info) &&
130    defined(global_parts_info.multimedia_drm_framework)) {
131  av_codec_support_drm = true
132}
133
134if (av_codec_support_drm) {
135  av_codec_defines += [ "SUPPORT_DRM" ]
136} else {
137  av_codec_defines += [ "UNSUPPORT_DRM" ]
138}
139
140if (av_codec_support_mp4v_decoder) {
141  av_codec_defines += ["SUPPORT_CODEC_MP4V_ES"]
142}
143
144if (!av_codec_support_software_codec) {
145  av_codec_support_fcodec = false
146  av_codec_support_avc_encoder = false
147  av_codec_support_hevc_decoder = false
148}
149
150if (av_codec_enable_codec_rm) {
151  av_codec_defines += [ "SUPPORT_CODEC_RM" ]
152}
153
154if (av_codec_enable_codec_rv) {
155  av_codec_defines += [ "SUPPORT_CODEC_RV" ]
156}
157
158if (av_codec_enable_codec_cook) {
159  av_codec_defines += [ "SUPPORT_CODEC_COOK" ]
160}
161
162if (av_codec_enable_demuxer_lrc) {
163  av_codec_defines += [ "SUPPORT_DEMUXER_LRC" ]
164}
165
166if (av_codec_enable_demuxer_sami) {
167  av_codec_defines += [ "SUPPORT_DEMUXER_SAMI" ]
168}
169
170if (av_codec_enable_demuxer_ass) {
171  av_codec_defines += [ "SUPPORT_DEMUXER_ASS" ]
172}