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