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/media_foundation/config.gni") 15config("histreamer_presets") { 16 include_dirs = [ 17 "//foundation/multimedia/media_foundation/engine", 18 "//base/hiviewdfx/hitrace/interfaces/native/innerkits/include/hitrace_meter", 19 ] 20 defines = [ 21 "HST_ANY_WITH_NO_RTTI", 22 "MEDIA_OHOS", 23 ] 24 cflags = [ 25 "-O2", 26 "-fPIC", 27 "-Wall", 28 "-fexceptions", 29 "-fno-rtti", 30 "-Wno-unused-but-set-variable", 31 "-Wno-format", 32 ] 33 cflags_cc = cflags 34 if (media_foundation_enable_recorder) { 35 defines += [ "RECORDER_SUPPORT" ] 36 } 37 if (media_foundation_enable_video) { 38 defines += [ "VIDEO_SUPPORT" ] 39 } 40 if (media_foundation_enable_avs3da) { 41 defines += [ "AVS3DA_SUPPORT" ] 42 } 43 if (hst_is_lite_sys) { 44 defines += [ "OHOS_LITE" ] 45 } 46} 47 48if (!hst_is_mini_sys) { 49 # L1 & std shared and seprated 50 51 # media_engine_histreamer lib for L1 & std 52 if (hst_is_lite_sys) { 53 group("histreamer") { 54 deps = [ 55 ":media_engine_histreamer", 56 "engine/plugin/plugins:histreamer_plugin_store", 57 ] 58 } 59 import("//build/lite/config/component/lite_component.gni") 60 lite_library("media_engine_histreamer") { 61 target_type = "shared_library" 62 include_dirs = [ "//foundation/multimedia/media_foundation/interface" ] 63 sources = [] 64 deps = [ "engine/scene/player:histreamer_player" ] 65 if (media_foundation_enable_recorder) { 66 deps += [ "engine/scene/recorder:histreamer_recorder" ] 67 } 68 public_deps = [ "//foundation/multimedia/media_utils_lite:media_common" ] 69 output_name = "media_foundation" 70 } 71 group("media_foundation") { 72 } 73 } else { 74 group("histreamer") { 75 deps = [ "engine/plugin/plugins:histreamer_plugin_store" ] 76 } 77 group("media_foundation") { 78 deps = [ 79 "src:media_foundation", 80 "src/capi:capi_packages", 81 ] 82 } 83 } 84} else { 85 # L0 compile as a whole static lib 86 import("//build/lite/config/component/lite_component.gni") 87 lite_library("histreamer") { 88 target_type = "static_library" 89 complete_static_lib = true 90 sources = [] 91 include_dirs = [ "//foundation/multimedia/media_foundation/interface" ] 92 deps = [ 93 "engine/plugin/plugins:histreamer_plugin_store", 94 "engine/scene/player:histreamer_player", 95 ] 96 if (media_foundation_enable_recorder) { 97 deps += [ "engine/scene/recorder:histreamer_recorder" ] 98 } 99 public_deps = [ "//foundation/multimedia/media_utils_lite:media_common" ] 100 } 101} 102