1fa7767c5Sopenharmony_ci# Copyright (c) 2021-2021 Huawei Device Co., Ltd. 2fa7767c5Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 3fa7767c5Sopenharmony_ci# you may not use this file except in compliance with the License. 4fa7767c5Sopenharmony_ci# You may obtain a copy of the License at 5fa7767c5Sopenharmony_ci# 6fa7767c5Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 7fa7767c5Sopenharmony_ci# 8fa7767c5Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 9fa7767c5Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 10fa7767c5Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11fa7767c5Sopenharmony_ci# See the License for the specific language governing permissions and 12fa7767c5Sopenharmony_ci# limitations under the License. 13fa7767c5Sopenharmony_ci# 14fa7767c5Sopenharmony_ciimport("//build/ohos.gni") 15fa7767c5Sopenharmony_cideclare_args() { 16fa7767c5Sopenharmony_ci histreamer_root_dir = "//foundation/multimedia/media_foundation" 17fa7767c5Sopenharmony_ci multimedia_root_dir = "//foundation/multimedia" 18fa7767c5Sopenharmony_ci hiviewdfx_root_dir = "//base/hiviewdfx" 19fa7767c5Sopenharmony_ci 20fa7767c5Sopenharmony_ci # build histreamer plugin feature ability 21fa7767c5Sopenharmony_ci # only for small and std (mini device does not support dynamic libraries) 22fa7767c5Sopenharmony_ci media_foundation_enable_plugin_ffmpeg_adapter = false 23fa7767c5Sopenharmony_ci 24fa7767c5Sopenharmony_ci # hdi codec adapter, only for std device (Omx has not been implemented) 25fa7767c5Sopenharmony_ci media_foundation_enable_plugin_codec_adapter = false 26fa7767c5Sopenharmony_ci 27fa7767c5Sopenharmony_ci # only tested on std device 28fa7767c5Sopenharmony_ci media_foundation_enable_plugin_http_source = false 29fa7767c5Sopenharmony_ci 30fa7767c5Sopenharmony_ci # depends on lite audio hdi interface (small device) 31fa7767c5Sopenharmony_ci media_foundation_enable_plugin_hdi_adapter = false 32fa7767c5Sopenharmony_ci 33fa7767c5Sopenharmony_ci # depends on lite media api 34fa7767c5Sopenharmony_ci media_foundation_enable_plugin_stream_source = false 35fa7767c5Sopenharmony_ci 36fa7767c5Sopenharmony_ci # only support mini device bes2600 tech (L0) 37fa7767c5Sopenharmony_ci media_foundation_enable_plugin_lite_aac_decoder = false 38fa7767c5Sopenharmony_ci media_foundation_enable_plugin_http_lite_source = false 39fa7767c5Sopenharmony_ci 40fa7767c5Sopenharmony_ci # no external dependence 41fa7767c5Sopenharmony_ci media_foundation_enable_plugin_file_source = false 42fa7767c5Sopenharmony_ci media_foundation_enable_plugin_file_fd_source = false 43fa7767c5Sopenharmony_ci media_foundation_enable_plugin_file_fd_sink = false 44fa7767c5Sopenharmony_ci media_foundation_enable_plugin_aac_demuxer = false 45fa7767c5Sopenharmony_ci media_foundation_enable_plugin_wav_demuxer = false 46fa7767c5Sopenharmony_ci 47fa7767c5Sopenharmony_ci # no release (https://gitee.com/histreamer/minimp3) 48fa7767c5Sopenharmony_ci media_foundation_enable_plugin_minimp3_adapter = false 49fa7767c5Sopenharmony_ci media_foundation_enable_plugin_minimp4_demuxer = false 50fa7767c5Sopenharmony_ci 51fa7767c5Sopenharmony_ci # depends on std media api 52fa7767c5Sopenharmony_ci media_foundation_enable_plugin_std_stream_source = false 53fa7767c5Sopenharmony_ci 54fa7767c5Sopenharmony_ci # depends on std audio service 55fa7767c5Sopenharmony_ci media_foundation_enable_plugin_std_audio_capture = false 56fa7767c5Sopenharmony_ci media_foundation_enable_plugin_audio_server_sink = false 57fa7767c5Sopenharmony_ci 58fa7767c5Sopenharmony_ci # depends on std surface 59fa7767c5Sopenharmony_ci media_foundation_enable_plugin_std_video_surface_sink = false 60fa7767c5Sopenharmony_ci media_foundation_enable_plugin_std_video_capture = false 61fa7767c5Sopenharmony_ci 62fa7767c5Sopenharmony_ci media_foundation_enable_plugin_avs3_audio_decoder = false 63fa7767c5Sopenharmony_ci 64fa7767c5Sopenharmony_ci media_foundation_enable_recorder = false 65fa7767c5Sopenharmony_ci media_foundation_enable_video = false 66fa7767c5Sopenharmony_ci media_foundation_enable_avs3da = false 67fa7767c5Sopenharmony_ci 68fa7767c5Sopenharmony_ci # enable ffrt task instead of pthread task 69fa7767c5Sopenharmony_ci media_foundation_enable_ffrt = false 70fa7767c5Sopenharmony_ci 71fa7767c5Sopenharmony_ci # configuration for histreamer created thread's stack size. 72fa7767c5Sopenharmony_ci # 0 means using system default thread stack size, other positive values will be accepted. 73fa7767c5Sopenharmony_ci config_ohos_histreamer_stack_size = 0 74fa7767c5Sopenharmony_ci hst_is_lite_sys = false 75fa7767c5Sopenharmony_ci hst_is_standard_sys = false 76fa7767c5Sopenharmony_ci hst_is_small_sys = false 77fa7767c5Sopenharmony_ci hst_is_mini_sys = false 78fa7767c5Sopenharmony_ci} 79fa7767c5Sopenharmony_ci 80fa7767c5Sopenharmony_ciif (!defined(ohos_lite) || !ohos_lite) { 81fa7767c5Sopenharmony_ci hst_is_lite_sys = false 82fa7767c5Sopenharmony_ci hst_is_standard_sys = true 83fa7767c5Sopenharmony_ci} else { 84fa7767c5Sopenharmony_ci hst_is_lite_sys = true 85fa7767c5Sopenharmony_ci if (ohos_kernel_type == "liteos_m") { 86fa7767c5Sopenharmony_ci hst_is_mini_sys = true 87fa7767c5Sopenharmony_ci } else { 88fa7767c5Sopenharmony_ci hst_is_small_sys = true 89fa7767c5Sopenharmony_ci } 90fa7767c5Sopenharmony_ci} 91fa7767c5Sopenharmony_ci 92fa7767c5Sopenharmony_ciif (hst_is_standard_sys) { 93fa7767c5Sopenharmony_ci media_foundation_enable_plugin_file_source = false 94fa7767c5Sopenharmony_ci media_foundation_enable_plugin_file_fd_source = false 95fa7767c5Sopenharmony_ci media_foundation_enable_plugin_ffmpeg_adapter = true 96fa7767c5Sopenharmony_ci media_foundation_enable_plugin_http_source = false 97fa7767c5Sopenharmony_ci media_foundation_enable_plugin_audio_server_sink = false 98fa7767c5Sopenharmony_ci media_foundation_enable_recorder = true 99fa7767c5Sopenharmony_ci media_foundation_enable_plugin_file_fd_sink = false 100fa7767c5Sopenharmony_ci media_foundation_enable_plugin_std_audio_capture = false 101fa7767c5Sopenharmony_ci media_foundation_enable_plugin_std_stream_source = false 102fa7767c5Sopenharmony_ci media_foundation_enable_video = true 103fa7767c5Sopenharmony_ci media_foundation_enable_plugin_std_video_surface_sink = false 104fa7767c5Sopenharmony_ci media_foundation_enable_plugin_codec_adapter = true 105fa7767c5Sopenharmony_ci} 106fa7767c5Sopenharmony_ci 107fa7767c5Sopenharmony_ciif (hst_is_small_sys) { 108fa7767c5Sopenharmony_ci media_foundation_enable_plugin_file_source = true 109fa7767c5Sopenharmony_ci media_foundation_enable_plugin_file_fd_source = true 110fa7767c5Sopenharmony_ci media_foundation_enable_plugin_ffmpeg_adapter = true 111fa7767c5Sopenharmony_ci media_foundation_enable_plugin_http_source = true 112fa7767c5Sopenharmony_ci media_foundation_enable_plugin_hdi_adapter = true 113fa7767c5Sopenharmony_ci} 114fa7767c5Sopenharmony_ci 115fa7767c5Sopenharmony_ciif (hst_is_mini_sys) { 116fa7767c5Sopenharmony_ci media_foundation_enable_plugin_file_source = true 117fa7767c5Sopenharmony_ci media_foundation_enable_plugin_file_fd_source = true 118fa7767c5Sopenharmony_ci media_foundation_enable_plugin_ffmpeg_adapter = true 119fa7767c5Sopenharmony_ci media_foundation_enable_plugin_http_source = true 120fa7767c5Sopenharmony_ci media_foundation_enable_plugin_hdi_adapter = true 121fa7767c5Sopenharmony_ci} 122fa7767c5Sopenharmony_ci 123fa7767c5Sopenharmony_ciif (defined(global_parts_info) && 124fa7767c5Sopenharmony_ci defined(global_parts_info.hiviewdfx_hisysevent)) { 125fa7767c5Sopenharmony_ci has_hisysevent_part = true 126fa7767c5Sopenharmony_ci} else { 127fa7767c5Sopenharmony_ci has_hisysevent_part = false 128fa7767c5Sopenharmony_ci} 129fa7767c5Sopenharmony_ci 130fa7767c5Sopenharmony_ciif (defined(global_parts_info) && defined(global_parts_info.third_party_skia)) { 131fa7767c5Sopenharmony_ci has_skia = true 132fa7767c5Sopenharmony_ci} else { 133fa7767c5Sopenharmony_ci has_skia = false 134fa7767c5Sopenharmony_ci} 135