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_bad_packages") { 17 deps = [ 18 ":gstcurl", 19 ":gsthls", 20 ":gstmpegtsdemux", 21 ":gstvideoparsersbad", 22 ] 23} 24 25config("gst_player_config") { 26 visibility = [ ":*" ] 27 28 include_dirs = [ 29 ".", 30 "./gst-libs", 31 "//third_party/gstreamer/gstreamer", 32 "//third_party/gstreamer/gstreamer/libs", 33 "//third_party/gstreamer/gstplugins_base", 34 "//third_party/gstreamer/gstplugins_base/gst-libs", 35 "//third_party/glib/glib", 36 "//third_party/glib", 37 "//third_party/glib/gmodule", 38 ] 39 40 cflags = [ 41 "-Wall", 42 "-Werror", 43 "-DGST_DISABLE_DEPRECATED", 44 "-DHAVE_CONFIG_H", 45 "-DCOLORSPACE=\"videoconvert\"", 46 "-fno-strict-aliasing", 47 "-Wno-sign-compare", 48 "-Wno-builtin-requires-header", 49 "-Wno-implicit-function-declaration", 50 "-DOHOS_EXT_FUNC", 51 "-DOHOS_OPT_STABLE", 52 "-DOHOS_OPT_COMPAT", 53 "-DOHOS_OPT_CVE", 54 "-DG_LOG_DOMAIN=\"GStreamer\"", 55 ] 56} 57 58ohos_source_set("player_source") { 59 sources = [ 60 "gst-libs/gst/play/gstplay-media-info.c", 61 "gst-libs/gst/play/gstplay-signal-adapter.c", 62 "gst-libs/gst/play/gstplay-video-overlay-video-renderer.c", 63 "gst-libs/gst/play/gstplay-video-renderer.c", 64 "gst-libs/gst/play/gstplay-visualization.c", 65 "gst-libs/gst/play/gstplay.c", 66 "gst-libs/gst/player/gstplayer-g-main-context-signal-dispatcher.c", 67 "gst-libs/gst/player/gstplayer-media-info.c", 68 "gst-libs/gst/player/gstplayer-signal-dispatcher.c", 69 "gst-libs/gst/player/gstplayer-video-overlay-video-renderer.c", 70 "gst-libs/gst/player/gstplayer-video-renderer.c", 71 "gst-libs/gst/player/gstplayer-visualization.c", 72 "gst-libs/gst/player/gstplayer-wrapped-video-renderer.c", 73 "gst-libs/gst/player/gstplayer.c", 74 ] 75 76 configs = [ ":gst_player_config" ] 77} 78 79ohos_shared_library("gstplayer") { 80 deps = [ 81 ":player_source", 82 "//third_party/glib:glib", 83 "//third_party/glib:gobject", 84 "//third_party/gstreamer/gstplugins_base:gstpbutils", 85 "//third_party/gstreamer/gstplugins_base:gsttag", 86 "//third_party/gstreamer/gstplugins_base:gstvideo", 87 "//third_party/gstreamer/gstreamer:gstreamer", 88 ] 89 part_name = "multimedia_player_framework" 90 subsystem_name = "multimedia" 91} 92 93config("gst_plugins_config") { 94 visibility = [ ":*" ] 95 96 include_dirs = [ 97 ".", 98 "./gst-libs", 99 "//third_party/gstreamer/gstreamer", 100 "//third_party/gstreamer/gstreamer/libs", 101 "//third_party/gstreamer/gstplugins_base", 102 "//third_party/gstreamer/gstplugins_base/gst-libs", 103 "//third_party/glib/glib", 104 "//third_party/glib", 105 "//third_party/glib/gmodule", 106 ] 107 108 cflags = [ 109 "-Wall", 110 "-Werror", 111 "-DGST_DISABLE_DEPRECATED", 112 "-DHAVE_CONFIG_H", 113 "-DCOLORSPACE=\"videoconvert\"", 114 "-fno-strict-aliasing", 115 "-Wno-sign-compare", 116 "-Wno-builtin-requires-header", 117 "-Wno-implicit-function-declaration", 118 "-Wno-unused-function", 119 "-DOHOS_EXT_FUNC", 120 "-DOHOS_GLIB_COMPATIBLE", 121 "-DOHOS_OPT_COMPAT", 122 "-DOHOS_OPT_STABLE", 123 "-DGST_USE_UNSTABLE_API", 124 "-DG_LOG_DOMAIN=\"GStreamer\"", 125 ] 126} 127 128ohos_source_set("hls_source") { 129 sources = [ 130 "ext/hls/gsthlsdemux-util.c", 131 "ext/hls/gsthlsdemux.c", 132 "ext/hls/gsthlselement.c", 133 "ext/hls/gsthlsplugin.c", 134 "ext/hls/gstm3u8playlist.c", 135 "ext/hls/m3u8.c", 136 ] 137 138 configs = [ ":gst_plugins_config" ] 139} 140 141ohos_shared_library("gsthls") { 142 deps = [ 143 ":hls_source", 144 "//third_party/glib:glib", 145 "//third_party/glib:gobject", 146 "//third_party/gstreamer/gstplugins_bad:gstadaptivedemux", 147 "//third_party/gstreamer/gstplugins_bad:gsturidownloader", 148 "//third_party/gstreamer/gstplugins_base:gsttag", 149 "//third_party/gstreamer/gstreamer:gstbase", 150 "//third_party/gstreamer/gstreamer:gstreamer", 151 ] 152 153 relative_install_dir = "media/plugins" 154 part_name = "multimedia_player_framework" 155 subsystem_name = "multimedia" 156} 157 158ohos_source_set("adaptivedemux_source") { 159 sources = [ "gst-libs/gst/adaptivedemux/gstadaptivedemux.c" ] 160 161 configs = [ ":gst_plugins_config" ] 162} 163 164ohos_shared_library("gstadaptivedemux") { 165 deps = [ 166 ":adaptivedemux_source", 167 "//third_party/glib:glib", 168 "//third_party/glib:gobject", 169 "//third_party/gstreamer/gstplugins_bad:gsturidownloader", 170 "//third_party/gstreamer/gstreamer:gstbase", 171 "//third_party/gstreamer/gstreamer:gstreamer", 172 ] 173 174 part_name = "multimedia_player_framework" 175 subsystem_name = "multimedia" 176} 177 178ohos_source_set("uridownloader_source") { 179 sources = [ 180 "gst-libs/gst/uridownloader/gstfragment.c", 181 "gst-libs/gst/uridownloader/gsturidownloader.c", 182 ] 183 184 configs = [ ":gst_plugins_config" ] 185} 186 187ohos_shared_library("gsturidownloader") { 188 deps = [ 189 ":uridownloader_source", 190 "//third_party/glib:glib", 191 "//third_party/glib:gobject", 192 "//third_party/gstreamer/gstreamer:gstbase", 193 "//third_party/gstreamer/gstreamer:gstreamer", 194 ] 195 196 part_name = "multimedia_player_framework" 197 subsystem_name = "multimedia" 198} 199 200ohos_source_set("mpegtsdemux_source") { 201 sources = [ 202 "gst/mpegtsdemux/gsttsdemux.c", 203 "gst/mpegtsdemux/mpegtsbase.c", 204 "gst/mpegtsdemux/mpegtspacketizer.c", 205 "gst/mpegtsdemux/mpegtsparse.c", 206 "gst/mpegtsdemux/pesparse.c", 207 "gst/mpegtsdemux/tsdemux.c", 208 ] 209 210 configs = [ ":gst_plugins_config" ] 211} 212 213ohos_shared_library("gstmpegtsdemux") { 214 deps = [ 215 ":mpegtsdemux_source", 216 "//third_party/glib:glib", 217 "//third_party/glib:gobject", 218 "//third_party/gstreamer/gstplugins_bad:gstcodecparsers", 219 "//third_party/gstreamer/gstplugins_bad:gstmpegts", 220 "//third_party/gstreamer/gstplugins_base:gstaudio", 221 "//third_party/gstreamer/gstplugins_base:gstpbutils", 222 "//third_party/gstreamer/gstplugins_base:gsttag", 223 "//third_party/gstreamer/gstreamer:gstbase", 224 "//third_party/gstreamer/gstreamer:gstreamer", 225 ] 226 227 relative_install_dir = "media/plugins" 228 part_name = "multimedia_player_framework" 229 subsystem_name = "multimedia" 230} 231 232ohos_source_set("mpegts_source") { 233 sources = [ 234 "gst-libs/gst/mpegts/gst-atsc-section.c", 235 "gst-libs/gst/mpegts/gst-dvb-descriptor.c", 236 "gst-libs/gst/mpegts/gst-dvb-section.c", 237 "gst-libs/gst/mpegts/gst-scte-section.c", 238 "gst-libs/gst/mpegts/gstmpegtsdescriptor.c", 239 "gst-libs/gst/mpegts/gstmpegtssection.c", 240 "gst-libs/gst/mpegts/mpegts.c", 241 ] 242 243 configs = [ ":gst_plugins_config" ] 244} 245 246ohos_shared_library("gstmpegts") { 247 deps = [ 248 ":mpegts_source", 249 "//third_party/glib:glib", 250 "//third_party/glib:gobject", 251 "//third_party/gstreamer/gstreamer:gstreamer", 252 ] 253 254 part_name = "multimedia_player_framework" 255 subsystem_name = "multimedia" 256} 257 258ohos_source_set("codecparsers_source") { 259 sources = [ 260 "gst-libs/gst/codecparsers/dboolhuff.c", 261 "gst-libs/gst/codecparsers/gsth264parser.c", 262 "gst-libs/gst/codecparsers/gstjpeg2000sampling.c", 263 "gst-libs/gst/codecparsers/gstjpegparser.c", 264 "gst-libs/gst/codecparsers/gstmpeg4parser.c", 265 "gst-libs/gst/codecparsers/gstmpegvideometa.c", 266 "gst-libs/gst/codecparsers/gstmpegvideoparser.c", 267 "gst-libs/gst/codecparsers/gstvc1parser.c", 268 "gst-libs/gst/codecparsers/gstvp8parser.c", 269 "gst-libs/gst/codecparsers/gstvp8rangedecoder.c", 270 "gst-libs/gst/codecparsers/gstvp9parser.c", 271 "gst-libs/gst/codecparsers/nalutils.c", 272 "gst-libs/gst/codecparsers/parserutils.c", 273 "gst-libs/gst/codecparsers/vp8utils.c", 274 "gst-libs/gst/codecparsers/vp9utils.c", 275 ] 276 277 configs = [ ":gst_plugins_config" ] 278} 279 280ohos_shared_library("gstcodecparsers") { 281 deps = [ 282 ":codecparsers_source", 283 "//third_party/glib:glib", 284 "//third_party/gstreamer/gstreamer:gstbase", 285 "//third_party/gstreamer/gstreamer:gstreamer", 286 ] 287 288 part_name = "multimedia_player_framework" 289 subsystem_name = "multimedia" 290} 291 292ohos_source_set("parse_source") { 293 visibility = [ ":*" ] 294 295 sources = [ 296 "gst/videoparsers/gsth264parse.c", 297 "gst/videoparsers/gstmpeg4videoparse.c", 298 "gst/videoparsers/gstvideoparserselement.c", 299 "gst/videoparsers/gstvideoparseutils.c", 300 "gst/videoparsers/plugin.c", 301 ] 302 303 include_dirs = [ 304 ".", 305 "./gst-libs", 306 "//third_party/gstreamer/gstreamer", 307 "//third_party/gstreamer/gstreamer/libs", 308 "//third_party/gstreamer/gstplugins_base", 309 "//third_party/gstreamer/gstplugins_base/gst-libs", 310 "//third_party/glib/glib", 311 "//third_party/glib", 312 "//third_party/glib/gmodule", 313 "//third_party/gstreamer/gstplugins_bad/gst/videoparsers", 314 "//third_party/zlibs", 315 "//third_party/gstreamer/gstplugins_bad/gst-libs/codecparsers", 316 ] 317 318 cflags = [ 319 "-Wall", 320 "-Werror", 321 "-Wno-sign-compare", 322 "-DGST_DISABLE_DEPRECATED", 323 "-DHAVE_CONFIG_H", 324 "-DOHOS_EXT_FUNC", 325 "-DOHOS_GLIB_COMPATIBLE", 326 "-DOHOS_OPT_COMPAT", 327 "-DGST_USE_UNSTABLE_API", 328 "-Wno-sign-compare", 329 "-DG_LOG_DOMAIN=\"GStreamer\"", 330 ] 331} 332 333ohos_shared_library("gstvideoparsersbad") { 334 deps = [ 335 ":parse_source", 336 "//third_party/glib:glib", 337 "//third_party/glib:gobject", 338 "//third_party/gstreamer/gstplugins_bad:gstcodecparsers", 339 "//third_party/gstreamer/gstplugins_base:gstpbutils", 340 "//third_party/gstreamer/gstplugins_base:gstvideo", 341 "//third_party/gstreamer/gstreamer:gstbase", 342 "//third_party/gstreamer/gstreamer:gstreamer", 343 ] 344 345 relative_install_dir = "media/plugins" 346 part_name = "multimedia_player_framework" 347 subsystem_name = "multimedia" 348} 349 350config("curlhttp_source_config") { 351 include_dirs = [ 352 ".", 353 "//third_party/curl/include", 354 ] 355} 356 357ohos_source_set("curlhttp_source") { 358 sources = [ 359 "ext/curl/gstcurl.c", 360 "ext/curl/gstcurlelement.c", 361 "ext/curl/gstcurlhttpsrc.c", 362 "ext/curl/gstcurlqueue.c", 363 ] 364 365 configs = [ 366 ":gst_plugins_config", 367 ":curlhttp_source_config", 368 ] 369} 370 371ohos_shared_library("gstcurl") { 372 deps = [ 373 ":curlhttp_source", 374 "//third_party/curl:curl_shared", 375 "//third_party/glib:glib", 376 "//third_party/glib:gobject", 377 "//third_party/gstreamer/gstreamer:gstbase", 378 "//third_party/gstreamer/gstreamer:gstreamer", 379 ] 380 381 relative_install_dir = "media/plugins" 382 part_name = "multimedia_player_framework" 383 subsystem_name = "multimedia" 384} 385