1# Copyright (C) 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("//build/ohos.gni") 15import("//foundation/multimedia/player_framework/config.gni") 16 17config("media_engine_gst_common_config") { 18 visibility = [ ":*" ] 19 20 cflags = [ 21 "-std=c++17", 22 "-fno-rtti", 23 "-fno-exceptions", 24 "-Wall", 25 "-fno-common", 26 "-fstack-protector-strong", 27 "-FPIC", 28 "-FS", 29 "-O2", 30 "-D_FORTIFY_SOURCE=2", 31 "-fvisibility=hidden", 32 "-Wformat=2", 33 "-Wfloat-equal", 34 "-Wdate-time", 35 "-Wno-deprecated-declarations", 36 "-DOHOS_EXT_FUNC", 37 "-DOHOS_OPT_COMPAT", 38 "-Werror", 39 "-Wextra", 40 "-Wimplicit-fallthrough", 41 "-Wsign-compare", 42 "-Wunused-parameter", 43 ] 44 45 include_dirs = [ 46 "//base/hiviewdfx/hisysevent/interfaces/native/innerkits/hisysevent/include", 47 "//commonlibrary/c_utils/base/include", 48 "//third_party/glib/glib", 49 "//third_party/glib", 50 "//third_party/gstreamer/gstreamer", 51 "//third_party/gstreamer/gstreamer/libs", 52 "//third_party/gstreamer/gstplugins_base", 53 "//third_party/gstreamer/gstplugins_base/gst-libs", 54 "//third_party/gstreamer/gstplugins_bad/gst-libs", 55 "//foundation/multimedia/player_framework/services/engine/gstreamer/common/loader", 56 "//foundation/multimedia/player_framework/services/engine/gstreamer/common/message", 57 "//foundation/multimedia/player_framework/services/engine/gstreamer/common/metadata", 58 "//foundation/multimedia/player_framework/services/engine/gstreamer/common/playbin_adapter", 59 "//foundation/multimedia/player_framework/services/engine/gstreamer/common/state_machine", 60 "//foundation/multimedia/player_framework/services/engine/gstreamer/common/utils", 61 "../player", 62 "./appsrc_engine", 63 "../plugins/common", 64 "//foundation/multimedia/player_framework/services/utils/include", 65 "//foundation/multimedia/player_framework/interfaces/inner_api/native", 66 "//foundation/multimedia/player_framework/services/services/engine_intf", 67 ] 68} 69 70ohos_static_library("media_engine_gst_common") { 71 sources = [ 72 "../player/player_track_parse.cpp", 73 "appsrc_engine/appsrc_memory.cpp", 74 "appsrc_engine/gst_appsrc_engine.cpp", 75 "message/gst_msg_converter.cpp", 76 "message/gst_msg_processor.cpp", 77 "metadata/gst_meta_parser.cpp", 78 "playbin_adapter/playbin2_ctrler.cpp", 79 "playbin_adapter/playbin_ctrler_base.cpp", 80 "playbin_adapter/playbin_state.cpp", 81 "state_machine/state_machine.cpp", 82 ] 83 84 configs = [ 85 ":media_engine_gst_common_config", 86 "//foundation/multimedia/player_framework/services/dfx:media_service_log_dfx_public_config", 87 ] 88 89 deps = [ 90 ":media_gst_dfx", 91 "../plugins/common:gst_media_common", 92 "//foundation/multimedia/player_framework/services/dfx:media_service_log_dfx", 93 "//foundation/multimedia/player_framework/services/utils:media_service_utils", 94 "//third_party/glib:glib", 95 "//third_party/glib:gobject", 96 "//third_party/gstreamer/gstplugins_base:gstapp_plugin", 97 "//third_party/gstreamer/gstplugins_base:gsttag", 98 "//third_party/gstreamer/gstreamer:gstreamer", 99 ] 100 101 external_deps = [ 102 "c_utils:utils", 103 "graphic_surface:surface", 104 "hilog:libhilog", 105 "init:libbegetutil", 106 "ipc:ipc_single", 107 "media_foundation:media_foundation", 108 "qos_manager:qos", 109 ] 110 111 defines = [] 112 if (multimedia_player_framework_support_drm) { 113 external_deps += [ "drm_framework:drm_framework" ] 114 defines += [ "SUPPORT_DRM" ] 115 } 116 117 subsystem_name = "multimedia" 118 part_name = "player_framework" 119} 120 121config("media_gst_dfx_config") { 122 visibility = [ ":*" ] 123 124 cflags = [ 125 "-std=c++17", 126 "-fno-rtti", 127 "-fno-exceptions", 128 "-Wall", 129 "-fno-common", 130 "-fstack-protector-strong", 131 "-FPIC", 132 "-FS", 133 "-O2", 134 "-D_FORTIFY_SOURCE=2", 135 "-fvisibility=hidden", 136 "-Wformat=2", 137 "-Wfloat-equal", 138 "-Wdate-time", 139 "-DOHOS_EXT_FUNC", 140 "-Werror", 141 "-Wextra", 142 "-Wimplicit-fallthrough", 143 "-Wsign-compare", 144 "-Wunused-parameter", 145 ] 146 147 include_dirs = [ 148 "//commonlibrary/c_utils/base/include", 149 "//third_party/glib/glib", 150 "//third_party/glib", 151 "//third_party/gstreamer/gstreamer", 152 "//third_party/gstreamer/gstreamer/libs", 153 "//third_party/gstreamer/gstplugins_base", 154 "//third_party/gstreamer/gstplugins_base/gst-libs", 155 "//third_party/gstreamer/gstplugins_bad/gst-libs", 156 "//foundation/multimedia/player_framework/services/engine/gstreamer/common/utils", 157 "//foundation/multimedia/player_framework/services/utils/include", 158 "//foundation/multimedia/player_framework/interfaces/inner_api/native", 159 ] 160} 161 162ohos_static_library("media_gst_dfx") { 163 sources = [ 164 "utils/dumper.cpp", 165 "utils/gst_utils.cpp", 166 ] 167 168 configs = [ 169 ":media_gst_dfx_config", 170 "//foundation/multimedia/player_framework/services/dfx:media_service_log_dfx_public_config", 171 ] 172 173 deps = [ 174 "//foundation/multimedia/player_framework/services/dfx:media_service_log_dfx", 175 "//third_party/glib:glib", 176 "//third_party/glib:gobject", 177 "//third_party/gstreamer/gstreamer:gstreamer", 178 ] 179 180 external_deps = [ 181 "c_utils:utils", 182 "hilog:libhilog", 183 "init:libbegetutil", 184 "media_foundation:media_foundation", 185 "qos_manager:qos", 186 ] 187 188 subsystem_name = "multimedia" 189 part_name = "player_framework" 190} 191