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 # enable ffrt task instead of pthread task 69 media_foundation_enable_ffrt = false 70 71 # configuration for histreamer created thread's stack size. 72 # 0 means using system default thread stack size, other positive values will be accepted. 73 config_ohos_histreamer_stack_size = 0 74 hst_is_lite_sys = false 75 hst_is_standard_sys = false 76 hst_is_small_sys = false 77 hst_is_mini_sys = false 78} 79 80if (!defined(ohos_lite) || !ohos_lite) { 81 hst_is_lite_sys = false 82 hst_is_standard_sys = true 83} else { 84 hst_is_lite_sys = true 85 if (ohos_kernel_type == "liteos_m") { 86 hst_is_mini_sys = true 87 } else { 88 hst_is_small_sys = true 89 } 90} 91 92if (hst_is_standard_sys) { 93 media_foundation_enable_plugin_file_source = false 94 media_foundation_enable_plugin_file_fd_source = false 95 media_foundation_enable_plugin_ffmpeg_adapter = true 96 media_foundation_enable_plugin_http_source = false 97 media_foundation_enable_plugin_audio_server_sink = false 98 media_foundation_enable_recorder = true 99 media_foundation_enable_plugin_file_fd_sink = false 100 media_foundation_enable_plugin_std_audio_capture = false 101 media_foundation_enable_plugin_std_stream_source = false 102 media_foundation_enable_video = true 103 media_foundation_enable_plugin_std_video_surface_sink = false 104 media_foundation_enable_plugin_codec_adapter = true 105} 106 107if (hst_is_small_sys) { 108 media_foundation_enable_plugin_file_source = true 109 media_foundation_enable_plugin_file_fd_source = true 110 media_foundation_enable_plugin_ffmpeg_adapter = true 111 media_foundation_enable_plugin_http_source = true 112 media_foundation_enable_plugin_hdi_adapter = true 113} 114 115if (hst_is_mini_sys) { 116 media_foundation_enable_plugin_file_source = true 117 media_foundation_enable_plugin_file_fd_source = true 118 media_foundation_enable_plugin_ffmpeg_adapter = true 119 media_foundation_enable_plugin_http_source = true 120 media_foundation_enable_plugin_hdi_adapter = true 121} 122 123if (defined(global_parts_info) && 124 defined(global_parts_info.hiviewdfx_hisysevent)) { 125 has_hisysevent_part = true 126} else { 127 has_hisysevent_part = false 128} 129 130if (defined(global_parts_info) && defined(global_parts_info.third_party_skia)) { 131 has_skia = true 132} else { 133 has_skia = false 134} 135