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("//foundation/multimedia/histreamer/config.gni") 15if (!hst_is_lite_sys) { 16 ohos_kernel_type = "" 17} 18config("histreamer_presets") { 19 include_dirs = [ "//foundation/multimedia/histreamer/engine" ] 20 defines = [ "MEDIA_OHOS" ] 21 cflags = [ 22 "-O2", 23 "-fPIC", 24 "-Wall", 25 "-frtti", 26 "-fexceptions", 27 ] 28 cflags_cc = cflags 29 if (multimedia_histreamer_enable_recorder) { 30 defines += [ "RECORDER_SUPPORT" ] 31 } 32 if (multimedia_histreamer_enable_video) { 33 defines += [ "VIDEO_SUPPORT" ] 34 } 35 if (multimedia_histreamer_enable_avs3da) { 36 defines += [ "AVS3DA_SUPPORT" ] 37 } 38 if (hst_is_lite_sys) { 39 defines += [ "OHOS_LITE" ] 40 } 41} 42if (hst_is_lite_sys) { 43 config("hiplayer_external_library_config") { 44 include_dirs = [ "//foundation/multimedia/histreamer/interface" ] 45 } 46} 47if (ohos_kernel_type != "liteos_m") { 48 # L1 & std shared and seprated 49 group("histreamer") { 50 deps = [ 51 ":media_engine_histreamer", 52 "engine/plugin/plugins:histreamer_plugin_store", 53 ] 54 } 55 56 # media_engine_histreamer lib for L1 & std 57 if (hst_is_lite_sys) { 58 import("//build/lite/config/component/lite_component.gni") 59 lite_library("media_engine_histreamer") { 60 target_type = "shared_library" 61 sources = [] 62 deps = [ "engine/scene/player:histreamer_player" ] 63 if (multimedia_histreamer_enable_recorder) { 64 deps += [ "engine/scene/recorder:histreamer_recorder" ] 65 } 66 public_deps = [ "//foundation/multimedia/utils/lite:media_common" ] 67 public_configs = [ ":hiplayer_external_library_config" ] 68 output_name = "histreamer" 69 } 70 } else { 71 import("//build/ohos.gni") 72 ohos_shared_library("media_engine_histreamer") { 73 sanitize = { 74 cfi = true 75 debug = false 76 } 77 sources = [] 78 deps = [ "engine/scene:std_engine_factory" ] 79 external_deps = [ "hitrace_native:hitrace_meter" ] 80 relative_install_dir = "media" 81 subsystem_name = "multimedia" 82 part_name = "multimedia_histreamer" 83 } 84 } 85} else { 86 # L0 compile as a whole static lib 87 import("//build/lite/config/component/lite_component.gni") 88 lite_library("histreamer") { 89 target_type = "static_library" 90 complete_static_lib = true 91 sources = [] 92 deps = [ 93 "engine/plugin/plugins:histreamer_plugin_store", 94 "engine/scene/player:histreamer_player", 95 ] 96 if (multimedia_histreamer_enable_recorder) { 97 deps += [ "engine/scene/recorder:histreamer_recorder" ] 98 } 99 public_deps = [ "//foundation/multimedia/utils/lite:media_common" ] 100 public_configs = [ ":hiplayer_external_library_config" ] 101 } 102} 103