1# Copyright (c) 2021-2022 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 16group("gstplugins_good_packages") { 17 deps = [ 18 ":gstaudiofx", 19 ":gstaudioparsers", 20 ":gstisomp4", 21 ":gstmatroska", 22 ":gstmultifile", 23 ":gstsoup", 24 ":gstwavparse", 25 ] 26} 27 28config("gst_plugins_config") { 29 visibility = [ ":*" ] 30 31 include_dirs = [ 32 ".", 33 "./gst-libs", 34 "./gst/isomp4", 35 "./gst/audiofx", 36 "//third_party/gstreamer/gstreamer", 37 "//third_party/gstreamer/gstreamer/libs", 38 "//third_party/gstreamer/gstplugins_base", 39 "//third_party/gstreamer/gstplugins_base/gst-libs", 40 "//third_party/glib/glib", 41 "//third_party/glib", 42 "//third_party/glib/gmodule", 43 "//third_party/zlib", 44 "//third_party/libsoup", 45 "//third_party/gettext/gettext-runtime/intl", 46 "//third_party/bzip2", 47 ] 48 49 cflags = [ 50 "-Wall", 51 "-Werror", 52 53 #"-DBUILDING_GST", 54 "-DGST_DISABLE_DEPRECATED", 55 "-DHAVE_CONFIG_H", 56 "-DCOLORSPACE=\"videoconvert\"", 57 "-fno-strict-aliasing", 58 "-Wno-sign-compare", 59 "-Wno-builtin-requires-header", 60 "-Wno-deprecated-declarations", 61 "-DOHOS_SUPPORT", 62 "-DOHOS_OPT_COMPAT", 63 "-DOHOS_OPT_CVE", 64 "-DOHOS_EXT_FUNC", 65 "-DOHOS_OPT_PERFORMANCE", 66 "-DG_LOG_DOMAIN=\"GStreamer\"", 67 ] 68} 69 70ohos_source_set("audioparsers_source") { 71 sources = [ 72 "gst/audioparsers/gstaacparse.c", 73 "gst/audioparsers/gstflacparse.c", 74 "gst/audioparsers/gstmpegaudioparse.c", 75 "gst/audioparsers/plugin.c", 76 ] 77 78 configs = [ ":gst_plugins_config" ] 79} 80 81ohos_shared_library("gstaudioparsers") { 82 deps = [ 83 ":audioparsers_source", 84 "//third_party/glib:glib", 85 "//third_party/glib:gobject", 86 "//third_party/gstreamer/gstplugins_base:gstpbutils", 87 "//third_party/gstreamer/gstplugins_base:gsttag", 88 "//third_party/gstreamer/gstreamer:gstbase", 89 "//third_party/gstreamer/gstreamer:gstreamer", 90 ] 91 92 relative_install_dir = "media/plugins" 93 part_name = "multimedia_player_framework" 94 subsystem_name = "multimedia" 95} 96 97ohos_source_set("autodetect_source") { 98 sources = [ 99 "gst/autodetect/gstautoaudiosink.c", 100 "gst/autodetect/gstautoaudiosrc.c", 101 "gst/autodetect/gstautodetect.c", 102 "gst/autodetect/gstautodetectelement.c", 103 "gst/autodetect/gstautodetectplugin.c", 104 "gst/autodetect/gstautovideosink.c", 105 "gst/autodetect/gstautovideosrc.c", 106 ] 107 108 configs = [ ":gst_plugins_config" ] 109} 110 111ohos_shared_library("gstautodetect") { 112 deps = [ 113 ":autodetect_source", 114 "//third_party/glib:glib", 115 "//third_party/glib:gobject", 116 "//third_party/gstreamer/gstplugins_base:gstpbutils", 117 "//third_party/gstreamer/gstreamer:gstbase", 118 "//third_party/gstreamer/gstreamer:gstreamer", 119 ] 120 121 relative_install_dir = "media/plugins" 122 part_name = "multimedia_player_framework" 123 subsystem_name = "multimedia" 124} 125 126ohos_source_set("id3demux_source") { 127 sources = [ "gst/id3demux/gstid3demux.c" ] 128 129 configs = [ ":gst_plugins_config" ] 130} 131 132ohos_shared_library("gstid3demux") { 133 deps = [ 134 ":id3demux_source", 135 "//third_party/glib:glib", 136 "//third_party/glib:gmodule", 137 "//third_party/glib:gobject", 138 "//third_party/gstreamer/gstplugins_base:gstaudio", 139 "//third_party/gstreamer/gstplugins_base:gstpbutils", 140 "//third_party/gstreamer/gstplugins_base:gsttag", 141 "//third_party/gstreamer/gstreamer:gstbase", 142 "//third_party/gstreamer/gstreamer:gstreamer", 143 ] 144 145 relative_install_dir = "media/plugins" 146 part_name = "multimedia_player_framework" 147 subsystem_name = "multimedia" 148} 149 150ohos_source_set("isomp4_source") { 151 sources = [ 152 "gst/isomp4/atoms.c", 153 "gst/isomp4/atomsrecovery.c", 154 "gst/isomp4/descriptors.c", 155 "gst/isomp4/gstisoff.c", 156 "gst/isomp4/gstisomp4element.c", 157 "gst/isomp4/gstqtmux.c", 158 "gst/isomp4/gstqtmuxmap.c", 159 "gst/isomp4/isomp4-plugin.c", 160 "gst/isomp4/properties.c", 161 "gst/isomp4/qtdemux-webvtt.c", 162 "gst/isomp4/qtdemux.c", 163 "gst/isomp4/qtdemux_dump.c", 164 "gst/isomp4/qtdemux_lang.c", 165 "gst/isomp4/qtdemux_tags.c", 166 "gst/isomp4/qtdemux_tree.c", 167 "gst/isomp4/qtdemux_types.c", 168 ] 169 170 configs = [ ":gst_plugins_config" ] 171} 172 173ohos_shared_library("gstisomp4") { 174 deps = [ 175 ":isomp4_source", 176 "//third_party/glib:glib", 177 "//third_party/glib:gobject", 178 "//third_party/gstreamer/gstplugins_base:gstaudio", 179 "//third_party/gstreamer/gstplugins_base:gstpbutils", 180 "//third_party/gstreamer/gstplugins_base:gstriff", 181 "//third_party/gstreamer/gstplugins_base:gsttag", 182 "//third_party/gstreamer/gstplugins_base:gstvideo", 183 "//third_party/gstreamer/gstreamer:gstbase", 184 "//third_party/gstreamer/gstreamer:gstreamer", 185 "//third_party/zlib:libz", 186 ] 187 188 relative_install_dir = "media/plugins" 189 part_name = "multimedia_player_framework" 190 subsystem_name = "multimedia" 191} 192 193ohos_source_set("wavparse_source") { 194 sources = [ "gst/wavparse/gstwavparse.c" ] 195 196 configs = [ ":gst_plugins_config" ] 197} 198 199ohos_shared_library("gstwavparse") { 200 deps = [ 201 ":wavparse_source", 202 "//third_party/glib:glib", 203 "//third_party/glib:gobject", 204 "//third_party/gstreamer/gstplugins_base:gstpbutils", 205 "//third_party/gstreamer/gstplugins_base:gstriff", 206 "//third_party/gstreamer/gstreamer:gstbase", 207 "//third_party/gstreamer/gstreamer:gstreamer", 208 ] 209 210 relative_install_dir = "media/plugins" 211 part_name = "multimedia_player_framework" 212 subsystem_name = "multimedia" 213} 214 215ohos_source_set("multifile_source") { 216 sources = [ 217 "gst/multifile/gstmultifile.c", 218 "gst/multifile/gstsplitmuxsink.c", 219 ] 220 221 configs = [ ":gst_plugins_config" ] 222} 223 224ohos_shared_library("gstmultifile") { 225 deps = [ 226 ":multifile_source", 227 "//third_party/glib:glib", 228 "//third_party/glib:gobject", 229 "//third_party/gstreamer/gstplugins_base:gstvideo", 230 "//third_party/gstreamer/gstreamer:gstbase", 231 "//third_party/gstreamer/gstreamer:gstreamer", 232 ] 233 234 relative_install_dir = "media/plugins" 235 part_name = "multimedia_player_framework" 236 subsystem_name = "multimedia" 237} 238 239ohos_source_set("audiofx_source") { 240 sources = [ 241 "gst/audiofx/audiofx.c", 242 "gst/audiofx/gstscaletempo.c", 243 ] 244 245 configs = [ ":gst_plugins_config" ] 246} 247 248ohos_shared_library("gstaudiofx") { 249 deps = [ 250 ":audiofx_source", 251 "//third_party/glib:glib", 252 "//third_party/glib:gobject", 253 "//third_party/gstreamer/gstplugins_base:gstaudio", 254 "//third_party/gstreamer/gstreamer:gstbase", 255 "//third_party/gstreamer/gstreamer:gstreamer", 256 ] 257 258 relative_install_dir = "media/plugins" 259 part_name = "multimedia_player_framework" 260 subsystem_name = "multimedia" 261} 262 263ohos_source_set("gstsoup_source") { 264 sources = [ 265 "ext/soup/gstsoup.c", 266 "ext/soup/gstsoupelement.c", 267 "ext/soup/gstsouphttpsrc.c", 268 "ext/soup/gstsouploader.c", 269 "ext/soup/gstsouputils.c", 270 ] 271 272 configs = [ ":gst_plugins_config" ] 273} 274 275ohos_shared_library("gstsoup") { 276 deps = [ 277 ":gstsoup_source", 278 "//third_party/glib:gio", 279 "//third_party/glib:glib", 280 "//third_party/glib:gmodule", 281 "//third_party/glib:gobject", 282 "//third_party/gstreamer/gstplugins_base:gsttag", 283 "//third_party/gstreamer/gstreamer:gstbase", 284 "//third_party/gstreamer/gstreamer:gstreamer", 285 ] 286 relative_install_dir = "media/plugins" 287 part_name = "multimedia_player_framework" 288 subsystem_name = "multimedia" 289} 290 291ohos_source_set("matroska_source") { 292 sources = [ 293 "gst/matroska/ebml-read.c", 294 "gst/matroska/gstmatroskaelement.c", 295 "gst/matroska/lzo.c", 296 "gst/matroska/matroska-demux.c", 297 "gst/matroska/matroska-ids.c", 298 "gst/matroska/matroska-parse.c", 299 "gst/matroska/matroska-read-common.c", 300 "gst/matroska/matroska.c", 301 ] 302 303 configs = [ ":gst_plugins_config" ] 304} 305 306ohos_shared_library("gstmatroska") { 307 deps = [ 308 ":matroska_source", 309 "//third_party/bzip2:libbz2", 310 "//third_party/glib:glib", 311 "//third_party/glib:gobject", 312 "//third_party/gstreamer/gstplugins_base:gstaudio", 313 "//third_party/gstreamer/gstplugins_base:gstpbutils", 314 "//third_party/gstreamer/gstplugins_base:gstriff", 315 "//third_party/gstreamer/gstplugins_base:gsttag", 316 "//third_party/gstreamer/gstplugins_base:gstvideo", 317 "//third_party/gstreamer/gstreamer:gstbase", 318 "//third_party/gstreamer/gstreamer:gstreamer", 319 ] 320 321 relative_install_dir = "media/plugins" 322 part_name = "multimedia_player_framework" 323 subsystem_name = "multimedia" 324} 325