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_ci 15fa7767c5Sopenharmony_ciimport("//foundation/multimedia/media_foundation/config.gni") 16fa7767c5Sopenharmony_ci 17fa7767c5Sopenharmony_ciconfig("histreamer_foundation_config") { 18fa7767c5Sopenharmony_ci include_dirs = [ 19fa7767c5Sopenharmony_ci "$histreamer_root_dir/interface/foundation", 20fa7767c5Sopenharmony_ci "$histreamer_root_dir/foundation", 21fa7767c5Sopenharmony_ci ] 22fa7767c5Sopenharmony_ci if (hst_is_lite_sys) { 23fa7767c5Sopenharmony_ci include_dirs += [ 24fa7767c5Sopenharmony_ci "$hmultimedia_root_dir/media_utils_lite/interfaces/kits", 25fa7767c5Sopenharmony_ci "$hiviewdfx_root_dir/hilog_lite/interfaces/native/innerkits", 26fa7767c5Sopenharmony_ci ] 27fa7767c5Sopenharmony_ci } else { 28fa7767c5Sopenharmony_ci include_dirs += 29fa7767c5Sopenharmony_ci [ "$hiviewdfx_root_dir/hilog/interfaces/native/innerkits/include" ] 30fa7767c5Sopenharmony_ci } 31fa7767c5Sopenharmony_ci} 32fa7767c5Sopenharmony_ci 33fa7767c5Sopenharmony_ciif (hst_is_lite_sys) { 34fa7767c5Sopenharmony_ci source_set("histreamer_foundation") { 35fa7767c5Sopenharmony_ci include_dirs = [ "$hiviewdfx_root_dir/hitrace/interfaces/native/innerkits/include/hitrace_meter" ] 36fa7767c5Sopenharmony_ci sources = [ 37fa7767c5Sopenharmony_ci "osal/filesystem/file_system.cpp", 38fa7767c5Sopenharmony_ci "osal/thread/condition_variable.cpp", 39fa7767c5Sopenharmony_ci "osal/thread/mutex.cpp", 40fa7767c5Sopenharmony_ci "osal/thread/scoped_lock.cpp", 41fa7767c5Sopenharmony_ci "osal/thread/task.cpp", 42fa7767c5Sopenharmony_ci "osal/thread/thread.cpp", 43fa7767c5Sopenharmony_ci "osal/utils/util.cpp", 44fa7767c5Sopenharmony_ci "utils/constants.cpp", 45fa7767c5Sopenharmony_ci "utils/dump_buffer.cpp", 46fa7767c5Sopenharmony_ci "utils/hitrace_utils.cpp", 47fa7767c5Sopenharmony_ci "utils/steady_clock.cpp", 48fa7767c5Sopenharmony_ci ] 49fa7767c5Sopenharmony_ci public_configs = [ 50fa7767c5Sopenharmony_ci ":histreamer_foundation_config", 51fa7767c5Sopenharmony_ci "$histreamer_root_dir:histreamer_presets", 52fa7767c5Sopenharmony_ci ] 53fa7767c5Sopenharmony_ci deps = [ "$multimedia_root_dir/media_utils_lite:media_common" ] 54fa7767c5Sopenharmony_ci if (hst_is_mini_sys) { 55fa7767c5Sopenharmony_ci deps += 56fa7767c5Sopenharmony_ci [ "$hiviewdfx_root_dir/hilog_lite/frameworks/featured:hilog_static" ] 57fa7767c5Sopenharmony_ci public_deps = [ "//third_party/bounds_checking_function:libsec_static" ] 58fa7767c5Sopenharmony_ci } else { 59fa7767c5Sopenharmony_ci deps += 60fa7767c5Sopenharmony_ci [ "$hiviewdfx_root_dir/hilog_lite/frameworks/featured:hilog_shared" ] 61fa7767c5Sopenharmony_ci public_deps = [ "//third_party/bounds_checking_function:libsec_shared" ] 62fa7767c5Sopenharmony_ci } 63fa7767c5Sopenharmony_ci 64fa7767c5Sopenharmony_ci if (defined(config_ohos_histreamer_stack_size) && 65fa7767c5Sopenharmony_ci config_ohos_histreamer_stack_size > 0) { 66fa7767c5Sopenharmony_ci defines = [ "THREAD_STACK_SIZE=$config_ohos_histreamer_stack_size" ] 67fa7767c5Sopenharmony_ci } 68fa7767c5Sopenharmony_ci } 69fa7767c5Sopenharmony_ci} else { 70fa7767c5Sopenharmony_ci ohos_source_set("histreamer_foundation") { 71fa7767c5Sopenharmony_ci subsystem_name = "multimedia" 72fa7767c5Sopenharmony_ci part_name = "media_foundation" 73fa7767c5Sopenharmony_ci include_dirs = [ "$hiviewdfx_root_dir/hitrace/interfaces/native/innerkits/include/hitrace_meter" ] 74fa7767c5Sopenharmony_ci sources = [ 75fa7767c5Sopenharmony_ci "osal/filesystem/file_system.cpp", 76fa7767c5Sopenharmony_ci "osal/thread/condition_variable.cpp", 77fa7767c5Sopenharmony_ci "osal/thread/mutex.cpp", 78fa7767c5Sopenharmony_ci "osal/thread/scoped_lock.cpp", 79fa7767c5Sopenharmony_ci "osal/thread/task.cpp", 80fa7767c5Sopenharmony_ci "osal/thread/thread.cpp", 81fa7767c5Sopenharmony_ci "osal/utils/util.cpp", 82fa7767c5Sopenharmony_ci "utils/constants.cpp", 83fa7767c5Sopenharmony_ci "utils/dump_buffer.cpp", 84fa7767c5Sopenharmony_ci "utils/hitrace_utils.cpp", 85fa7767c5Sopenharmony_ci "utils/steady_clock.cpp", 86fa7767c5Sopenharmony_ci ] 87fa7767c5Sopenharmony_ci public_configs = [ 88fa7767c5Sopenharmony_ci ":histreamer_foundation_config", 89fa7767c5Sopenharmony_ci "$histreamer_root_dir:histreamer_presets", 90fa7767c5Sopenharmony_ci ] 91fa7767c5Sopenharmony_ci public_deps = [ "$histreamer_root_dir/plugin:histreamer_plugin_intf" ] 92fa7767c5Sopenharmony_ci deps = [ "//third_party/bounds_checking_function:libsec_shared" ] 93fa7767c5Sopenharmony_ci external_deps = [ 94fa7767c5Sopenharmony_ci "graphic_surface:surface", 95fa7767c5Sopenharmony_ci "hilog:libhilog", 96fa7767c5Sopenharmony_ci "hitrace:hitrace_meter", 97fa7767c5Sopenharmony_ci ] 98fa7767c5Sopenharmony_ci 99fa7767c5Sopenharmony_ci if (defined(config_ohos_histreamer_stack_size) && 100fa7767c5Sopenharmony_ci config_ohos_histreamer_stack_size > 0) { 101fa7767c5Sopenharmony_ci defines = [ "THREAD_STACK_SIZE=$config_ohos_histreamer_stack_size" ] 102fa7767c5Sopenharmony_ci } 103fa7767c5Sopenharmony_ci } 104fa7767c5Sopenharmony_ci} 105