1# Copyright (C) 2023 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") 15import("//foundation/multimedia/player_framework/config.gni") 16 17config("media_engine_histreamer_factory_config") { 18 visibility = [ ":*" ] 19 20 cflags = [ 21 "-O2", 22 "-fPIC", 23 "-Wall", 24 "-fexceptions", 25 "-fno-rtti", 26 "-Wno-unused-but-set-variable", 27 "-Wno-format", 28 ] 29 cflags_cc = cflags 30 31 include_dirs = [ 32 "$MEDIA_PLAYER_ROOT_DIR/services/include", 33 "$MEDIA_PLAYER_ROOT_DIR/services/services/engine_intf", 34 "$MEDIA_PLAYER_ROOT_DIR/services/engine/histreamer/player", 35 "$MEDIA_PLAYER_ROOT_DIR/services/engine/histreamer/recorder", 36 "$MEDIA_PLAYER_ROOT_DIR/services/engine/histreamer/avmetadatahelper", 37 "$MEDIA_PLAYER_ROOT_DIR/services/engine/histreamer/transcoder", 38 "$MEDIA_PLAYER_ROOT_DIR/services/engine/histreamer/lpp/lpp_audio_streamer", 39 "$MEDIA_PLAYER_ROOT_DIR/services/engine/histreamer/lpp/lpp_video_streamer", 40 "$MEDIA_PLAYER_ROOT_DIR/services/engine/histreamer/lpp/lpp_sync_manager", 41 "$MEDIA_PLAYER_ROOT_DIR/services/engine/histreamer/lpp/lpp_engine_manager", 42 "$MEDIA_PLAYER_ROOT_DIR/services/utils/include", 43 "$MEDIA_PLAYER_ROOT_DIR/interfaces/inner_api/native", 44 ] 45 defines = [ 46 "HST_ANY_WITH_NO_RTTI", 47 "MEDIA_OHOS", 48 ] 49 defines += player_framework_defines 50} 51 52ohos_static_library("media_engine_histreamer_factory") { 53 stack_protector_ret = true 54 sanitize = { 55 integer_overflow = true 56 ubsan = true 57 boundary_sanitize = true 58 cfi = true 59 cfi_cross_dso = true 60 debug = false 61 } 62 sources = [ "hst_engine_factory.cpp" ] 63 64 configs = [ 65 ":media_engine_histreamer_factory_config", 66 "$MEDIA_PLAYER_ROOT_DIR/services/dfx:media_service_log_dfx_public_config", 67 ] 68 69 deps = [ 70 "$MEDIA_PLAYER_ROOT_DIR/services/dfx:media_service_log_dfx", 71 "$MEDIA_PLAYER_ROOT_DIR/services/engine/histreamer/player:media_engine_histreamer_player", 72 ] 73 74 external_deps = [ 75 "audio_framework:audio_client", 76 "av_codec:av_codec_client", 77 "av_codec:av_codec_media_engine_filters", 78 "c_utils:utils", 79 "graphic_surface:surface", 80 "graphic_surface:sync_fence", 81 "hilog:libhilog", 82 "image_framework:image_native", 83 "ipc:ipc_single", 84 "media_foundation:media_foundation", 85 "safwk:system_ability_fwk", 86 ] 87 88 if (player_framework_support_lowpower_av_sink) { 89 external_deps += [ 90 "drivers_interface_lpplayer:liblow_power_player_proxy_1.0", 91 "hdf_core:libhdi", 92 ] 93 } 94 95 if (player_framework_support_drm) { 96 external_deps += [ "drm_framework:drm_framework" ] 97 } 98 99 subsystem_name = "multimedia" 100 part_name = "player_framework" 101} 102