• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-2021 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")
15declare_args() {
16  histreamer_root_dir = "//foundation/multimedia/media_foundation"
17  multimedia_root_dir = "//foundation/multimedia"
18  hiviewdfx_root_dir = "//base/hiviewdfx"
19
20  # build histreamer plugin feature ability
21  # only for small and std (mini device does not support dynamic libraries)
22  media_foundation_enable_plugin_ffmpeg_adapter = false
23
24  # hdi codec adapter, only for std device (Omx has not been implemented)
25  media_foundation_enable_plugin_codec_adapter = false
26
27  # only tested on std device
28  media_foundation_enable_plugin_http_source = false
29
30  # depends on lite audio hdi interface (small device)
31  media_foundation_enable_plugin_hdi_adapter = false
32
33  # depends on lite media api
34  media_foundation_enable_plugin_stream_source = false
35
36  # only support mini device bes2600 tech (L0)
37  media_foundation_enable_plugin_lite_aac_decoder = false
38  media_foundation_enable_plugin_http_lite_source = false
39
40  # no external dependence
41  media_foundation_enable_plugin_file_source = false
42  media_foundation_enable_plugin_file_fd_source = false
43  media_foundation_enable_plugin_file_fd_sink = false
44  media_foundation_enable_plugin_aac_demuxer = false
45  media_foundation_enable_plugin_wav_demuxer = false
46
47  # no release (https://gitee.com/histreamer/minimp3)
48  media_foundation_enable_plugin_minimp3_adapter = false
49  media_foundation_enable_plugin_minimp4_demuxer = false
50
51  # depends on std media api
52  media_foundation_enable_plugin_std_stream_source = false
53
54  # depends on std audio service
55  media_foundation_enable_plugin_std_audio_capture = false
56  media_foundation_enable_plugin_audio_server_sink = false
57
58  # depends on std surface
59  media_foundation_enable_plugin_std_video_surface_sink = false
60  media_foundation_enable_plugin_std_video_capture = false
61
62  media_foundation_enable_plugin_avs3_audio_decoder = false
63
64  media_foundation_enable_recorder = false
65  media_foundation_enable_video = false
66  media_foundation_enable_avs3da = false
67
68  media_foundation_enable_rm_demuxer = false
69  media_foundation_enable_cook_audio_decoder = false
70  media_foundation_enable_lrc_demuxer = false
71  media_foundation_enable_sami_demuxer = false
72  media_foundation_enable_ass_demuxer = false
73
74  # enable ffrt task instead of pthread task
75  media_foundation_enable_ffrt = false
76
77  # configuration for histreamer created thread's stack size.
78  # 0 means using system default thread stack size, other positive values will be accepted.
79  config_ohos_histreamer_stack_size = 0
80  hst_is_lite_sys = false
81  hst_is_standard_sys = false
82  hst_is_small_sys = false
83  hst_is_mini_sys = false
84}
85
86if (!defined(ohos_lite) || !ohos_lite) {
87  hst_is_lite_sys = false
88  hst_is_standard_sys = true
89} else {
90  hst_is_lite_sys = true
91  if (ohos_kernel_type == "liteos_m") {
92    hst_is_mini_sys = true
93  } else {
94    hst_is_small_sys = true
95  }
96}
97
98if (hst_is_standard_sys) {
99  media_foundation_enable_plugin_file_source = false
100  media_foundation_enable_plugin_file_fd_source = false
101  media_foundation_enable_plugin_ffmpeg_adapter = true
102  media_foundation_enable_plugin_http_source = false
103  media_foundation_enable_plugin_audio_server_sink = false
104  media_foundation_enable_recorder = true
105  media_foundation_enable_plugin_file_fd_sink = false
106  media_foundation_enable_plugin_std_audio_capture = false
107  media_foundation_enable_plugin_std_stream_source = false
108  media_foundation_enable_video = true
109  media_foundation_enable_plugin_std_video_surface_sink = false
110  media_foundation_enable_plugin_codec_adapter = true
111}
112
113if (hst_is_small_sys) {
114  media_foundation_enable_plugin_file_source = true
115  media_foundation_enable_plugin_file_fd_source = true
116  media_foundation_enable_plugin_ffmpeg_adapter = true
117  media_foundation_enable_plugin_http_source = true
118  media_foundation_enable_plugin_hdi_adapter = true
119}
120
121if (hst_is_mini_sys) {
122  media_foundation_enable_plugin_file_source = true
123  media_foundation_enable_plugin_file_fd_source = true
124  media_foundation_enable_plugin_ffmpeg_adapter = true
125  media_foundation_enable_plugin_http_source = true
126  media_foundation_enable_plugin_hdi_adapter = true
127}
128
129if (defined(global_parts_info) &&
130    defined(global_parts_info.hiviewdfx_hisysevent)) {
131  has_hisysevent_part = true
132} else {
133  has_hisysevent_part = false
134}
135
136if (defined(global_parts_info) && defined(global_parts_info.third_party_skia)) {
137  has_skia = true
138} else {
139  has_skia = false
140}
141