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_base_packages") { 17 deps = [ 18 ":gstapp", 19 ":gstaudioconvert", 20 ":gstaudioresample", 21 ":gstplayback", 22 ":gstriff", 23 ":gsttypefindfunctions", 24 ":gstvideoconvert", 25 ":gstvideoscale", 26 ] 27} 28 29config("gst_plugins_config") { 30 visibility = [ ":*" ] 31 32 include_dirs = [ 33 ".", 34 "./gst-libs", 35 "../gst_dfx/", 36 "//third_party/gstreamer/gstreamer", 37 "//third_party/gstreamer/gstreamer/libs", 38 "//third_party/glib/glib", 39 "//third_party/glib", 40 "//third_party/glib/gmodule", 41 "//third_party/zlib/", 42 ] 43 44 cflags = [ 45 "-Wall", 46 "-Werror", 47 48 #"-DBUILDING_GST", 49 "-DGST_DISABLE_DEPRECATED", 50 "-DHAVE_CONFIG_H", 51 "-DCOLORSPACE=\"videoconvert\"", 52 "-DLICENSE_TRANSLATIONS_PATH=\"./gst-libs/gst/tag/license-translations.dict\"", 53 "-fno-strict-aliasing", 54 "-Wno-sign-compare", 55 "-Wno-builtin-requires-header", 56 "-DOHOS_EXT_FUNC", 57 "-DOHOS_OPT_COMPAT", 58 "-DOHOS_OPT_CVE", 59 "-DOHOS_OPT_PERFORMANCE", 60 "-DOHOS_OPT_MEMLEAK", 61 "-DOHOS_GLIB_COMPATIBLE", 62 "-Wno-implicit-fallthrough", 63 "-DG_LOG_DOMAIN=\"GStreamer\"", 64 ] 65} 66 67ohos_source_set("gstplayback_source") { 68 sources = [ 69 "gst/playback/gstdecodebin2.c", 70 "gst/playback/gstplay-enum.c", 71 "gst/playback/gstplaybackelement.c", 72 "gst/playback/gstplaybackplugin.c", 73 "gst/playback/gstplaybackutils.c", 74 "gst/playback/gstplaybin2.c", 75 "gst/playback/gstplaysink.c", 76 "gst/playback/gstplaysinkaudioconvert.c", 77 "gst/playback/gstplaysinkconvertbin.c", 78 "gst/playback/gstplaysinkvideoconvert.c", 79 "gst/playback/gststreamsynchronizer.c", 80 "gst/playback/gstsubtitleoverlay.c", 81 "gst/playback/gsturidecodebin.c", 82 ] 83 84 configs = [ ":gst_plugins_config" ] 85} 86 87ohos_shared_library("gstplayback") { 88 deps = [ 89 ":gstaudio", 90 ":gstpbutils", 91 ":gstplayback_source", 92 ":gstvideo", 93 "//third_party/glib:glib", 94 "//third_party/glib:gobject", 95 "//third_party/gstreamer/gstreamer:gstreamer", 96 ] 97 98 relative_install_dir = "media/plugins" 99 part_name = "gstreamer" 100 subsystem_name = "thirdparty" 101} 102 103ohos_source_set("gstpbutils_source") { 104 sources = [ 105 "gst-libs/gst/pbutils/codec-utils.c", 106 "gst-libs/gst/pbutils/descriptions.c", 107 "gst-libs/gst/pbutils/encoding-profile.c", 108 "gst-libs/gst/pbutils/encoding-target.c", 109 "gst-libs/gst/pbutils/gstaudiovisualizer.c", 110 "gst-libs/gst/pbutils/gstdiscoverer-types.c", 111 "gst-libs/gst/pbutils/gstdiscoverer.c", 112 "gst-libs/gst/pbutils/gstpluginsbaseversion.c", 113 "gst-libs/gst/pbutils/install-plugins.c", 114 "gst-libs/gst/pbutils/missing-plugins.c", 115 "gst-libs/gst/pbutils/pbutils-enumtypes.c", 116 "gst-libs/gst/pbutils/pbutils.c", 117 ] 118 119 configs = [ ":gst_plugins_config" ] 120} 121 122ohos_shared_library("gstpbutils") { 123 deps = [ 124 ":gstaudio", 125 ":gstpbutils_source", 126 ":gsttag", 127 ":gstvideo", 128 "//third_party/glib:glib", 129 "//third_party/glib:gobject", 130 "//third_party/gstreamer/gstreamer:gstbase", 131 "//third_party/gstreamer/gstreamer:gstreamer", 132 ] 133 part_name = "gstreamer" 134 subsystem_name = "thirdparty" 135} 136 137ohos_source_set("gsttag_source") { 138 sources = [ 139 "gst-libs/gst/tag/gstid3tag.c", 140 "gst-libs/gst/tag/gsttageditingprivate.c", 141 "gst-libs/gst/tag/gstvorbistag.c", 142 "gst-libs/gst/tag/gstxmptag.c", 143 "gst-libs/gst/tag/id3v2.c", 144 "gst-libs/gst/tag/id3v2frames.c", 145 "gst-libs/gst/tag/lang.c", 146 "gst-libs/gst/tag/licenses.c", 147 "gst-libs/gst/tag/tag-enumtypes.c", 148 "gst-libs/gst/tag/tags.c", 149 "gst-libs/gst/tag/xmpwriter.c", 150 ] 151 152 configs = [ ":gst_plugins_config" ] 153} 154 155ohos_shared_library("gsttag") { 156 deps = [ 157 ":gsttag_source", 158 "//third_party/glib:glib", 159 "//third_party/glib:gobject", 160 "//third_party/gstreamer/gstreamer:gstbase", 161 "//third_party/gstreamer/gstreamer:gstreamer", 162 "//third_party/zlib:libz", 163 ] 164 part_name = "gstreamer" 165 subsystem_name = "thirdparty" 166} 167 168ohos_source_set("gstfft_source") { 169 sources = [ 170 "gst-libs/gst/fft/gstfft.c", 171 "gst-libs/gst/fft/gstfftf32.c", 172 "gst-libs/gst/fft/gstfftf64.c", 173 "gst-libs/gst/fft/gstffts16.c", 174 "gst-libs/gst/fft/gstffts32.c", 175 "gst-libs/gst/fft/kiss_fft_f32.c", 176 "gst-libs/gst/fft/kiss_fft_f64.c", 177 "gst-libs/gst/fft/kiss_fft_s16.c", 178 "gst-libs/gst/fft/kiss_fft_s32.c", 179 "gst-libs/gst/fft/kiss_fftr_f32.c", 180 "gst-libs/gst/fft/kiss_fftr_f64.c", 181 "gst-libs/gst/fft/kiss_fftr_s16.c", 182 "gst-libs/gst/fft/kiss_fftr_s32.c", 183 ] 184 185 configs = [ ":gst_plugins_config" ] 186} 187 188ohos_shared_library("gstfft") { 189 deps = [ 190 ":gstfft_source", 191 "//third_party/glib:glib", 192 ] 193 part_name = "gstreamer" 194 subsystem_name = "thirdparty" 195} 196 197ohos_source_set("gstvideo_source") { 198 sources = [ 199 "gst-libs/gst/video/colorbalance.c", 200 "gst-libs/gst/video/colorbalancechannel.c", 201 "gst-libs/gst/video/convertframe.c", 202 "gst-libs/gst/video/gstvideocodecalphameta.c", 203 "gst-libs/gst/video/gstvideodecoder.c", 204 "gst-libs/gst/video/gstvideoencoder.c", 205 "gst-libs/gst/video/gstvideofilter.c", 206 "gst-libs/gst/video/gstvideometa.c", 207 "gst-libs/gst/video/gstvideopool.c", 208 "gst-libs/gst/video/gstvideotimecode.c", 209 "gst-libs/gst/video/gstvideoutils.c", 210 "gst-libs/gst/video/gstvideoutilsprivate.c", 211 "gst-libs/gst/video/navigation.c", 212 "gst-libs/gst/video/video-anc.c", 213 "gst-libs/gst/video/video-chroma.c", 214 "gst-libs/gst/video/video-color.c", 215 "gst-libs/gst/video/video-converter.c", 216 "gst-libs/gst/video/video-dither.c", 217 "gst-libs/gst/video/video-enumtypes.c", 218 "gst-libs/gst/video/video-event.c", 219 "gst-libs/gst/video/video-format.c", 220 "gst-libs/gst/video/video-frame.c", 221 "gst-libs/gst/video/video-hdr.c", 222 "gst-libs/gst/video/video-info.c", 223 "gst-libs/gst/video/video-multiview.c", 224 "gst-libs/gst/video/video-orc-dist.c", 225 "gst-libs/gst/video/video-resampler.c", 226 "gst-libs/gst/video/video-scaler.c", 227 "gst-libs/gst/video/video-tile.c", 228 "gst-libs/gst/video/video.c", 229 "gst-libs/gst/video/videooverlay.c", 230 ] 231 232 configs = [ ":gst_plugins_config" ] 233} 234 235ohos_shared_library("gstvideo") { 236 deps = [ 237 ":gstvideo_source", 238 "../gst_dfx:gst_trace", 239 "//third_party/glib:glib", 240 "//third_party/glib:gobject", 241 "//third_party/gstreamer/gstreamer:gstbase", 242 "//third_party/gstreamer/gstreamer:gstreamer", 243 ] 244 part_name = "gstreamer" 245 subsystem_name = "thirdparty" 246} 247 248ohos_source_set("gstaudio_source") { 249 sources = [ 250 "gst-libs/gst/audio/audio-buffer.c", 251 "gst-libs/gst/audio/audio-channel-mixer.c", 252 "gst-libs/gst/audio/audio-channels.c", 253 "gst-libs/gst/audio/audio-converter.c", 254 "gst-libs/gst/audio/audio-enumtypes.c", 255 "gst-libs/gst/audio/audio-format.c", 256 "gst-libs/gst/audio/audio-info.c", 257 "gst-libs/gst/audio/audio-quantize.c", 258 "gst-libs/gst/audio/audio-resampler.c", 259 "gst-libs/gst/audio/audio.c", 260 "gst-libs/gst/audio/gstaudioaggregator.c", 261 "gst-libs/gst/audio/gstaudiodecoder.c", 262 "gst-libs/gst/audio/gstaudioencoder.c", 263 "gst-libs/gst/audio/gstaudiofilter.c", 264 "gst-libs/gst/audio/gstaudiometa.c", 265 "gst-libs/gst/audio/gstaudiopack-dist.c", 266 "gst-libs/gst/audio/gstaudioutilsprivate.c", 267 "gst-libs/gst/audio/streamvolume.c", 268 ] 269 270 configs = [ ":gst_plugins_config" ] 271} 272 273ohos_shared_library("gstaudio") { 274 deps = [ 275 ":gstaudio_source", 276 "//third_party/glib:glib", 277 "//third_party/glib:gobject", 278 "//third_party/gstreamer/gstreamer:gstbase", 279 "//third_party/gstreamer/gstreamer:gstreamer", 280 ] 281 part_name = "gstreamer" 282 subsystem_name = "thirdparty" 283} 284 285ohos_source_set("audioconvert_source") { 286 sources = [ 287 "gst/audioconvert/gstaudioconvert.c", 288 "gst/audioconvert/plugin.c", 289 ] 290 291 configs = [ ":gst_plugins_config" ] 292} 293 294ohos_shared_library("gstaudioconvert") { 295 deps = [ 296 ":audioconvert_source", 297 ":gstaudio", 298 "//third_party/glib:glib", 299 "//third_party/glib:gobject", 300 "//third_party/gstreamer/gstreamer:gstbase", 301 "//third_party/gstreamer/gstreamer:gstreamer", 302 ] 303 304 relative_install_dir = "media/plugins" 305 part_name = "gstreamer" 306 subsystem_name = "thirdparty" 307} 308 309ohos_source_set("typefind_source") { 310 sources = [ 311 "gst/typefind/gsttypefindfunctions.c", 312 "gst/typefind/gsttypefindfunctionsdata.c", 313 "gst/typefind/gsttypefindfunctionsplugin.c", 314 "gst/typefind/gsttypefindfunctionsriff.c", 315 "gst/typefind/gsttypefindfunctionsstartwith.c", 316 ] 317 318 configs = [ ":gst_plugins_config" ] 319} 320 321ohos_shared_library("gsttypefindfunctions") { 322 deps = [ 323 ":typefind_source", 324 "//third_party/glib:glib", 325 "//third_party/gstreamer/gstreamer:gstreamer", 326 ] 327 328 relative_install_dir = "media/plugins" 329 part_name = "gstreamer" 330 subsystem_name = "thirdparty" 331} 332 333ohos_source_set("subparse_source") { 334 sources = [ 335 "gst/subparse/gstssaparse.c", 336 "gst/subparse/gstsubparse.c", 337 "gst/subparse/gstsubparseelement.c", 338 "gst/subparse/gstsubparseplugin.c", 339 "gst/subparse/mpl2parse.c", 340 "gst/subparse/qttextparse.c", 341 "gst/subparse/samiparse.c", 342 "gst/subparse/tmplayerparse.c", 343 ] 344 345 configs = [ ":gst_plugins_config" ] 346} 347 348ohos_shared_library("gstsubparse") { 349 deps = [ 350 ":subparse_source", 351 "//third_party/glib:glib", 352 "//third_party/glib:gobject", 353 "//third_party/gstreamer/gstreamer:gstbase", 354 "//third_party/gstreamer/gstreamer:gstreamer", 355 ] 356 357 relative_install_dir = "media/plugins" 358 part_name = "gstreamer" 359 subsystem_name = "thirdparty" 360} 361 362ohos_source_set("audioresample_source") { 363 sources = [ "gst/audioresample/gstaudioresample.c" ] 364 365 configs = [ ":gst_plugins_config" ] 366} 367 368ohos_shared_library("gstaudioresample") { 369 deps = [ 370 ":audioresample_source", 371 ":gstaudio", 372 "//third_party/glib:glib", 373 "//third_party/glib:gobject", 374 "//third_party/gstreamer/gstreamer:gstbase", 375 "//third_party/gstreamer/gstreamer:gstreamer", 376 ] 377 378 relative_install_dir = "media/plugins" 379 part_name = "gstreamer" 380 subsystem_name = "thirdparty" 381} 382 383ohos_source_set("audiorate_source") { 384 sources = [ "gst/audiorate/gstaudiorate.c" ] 385 386 configs = [ ":gst_plugins_config" ] 387} 388 389ohos_shared_library("gstaudiorate") { 390 deps = [ 391 ":audiorate_source", 392 ":gstaudio", 393 "//third_party/glib:glib", 394 "//third_party/glib:gobject", 395 "//third_party/gstreamer/gstreamer:gstreamer", 396 ] 397 398 relative_install_dir = "media/plugins" 399 part_name = "gstreamer" 400 subsystem_name = "thirdparty" 401} 402 403ohos_source_set("audiomixer_source") { 404 sources = [ 405 "gst/audiomixer/gstaudiointerleave.c", 406 "gst/audiomixer/gstaudiomixer.c", 407 "gst/audiomixer/gstaudiomixerelement.c", 408 "gst/audiomixer/gstaudiomixerorc-dist.c", 409 ] 410 411 configs = [ ":gst_plugins_config" ] 412} 413 414ohos_shared_library("gstaudiomixer") { 415 deps = [ 416 ":audiomixer_source", 417 ":gstaudio", 418 "//third_party/glib:glib", 419 "//third_party/glib:gobject", 420 "//third_party/gstreamer/gstreamer:gstbase", 421 "//third_party/gstreamer/gstreamer:gstreamer", 422 ] 423 424 relative_install_dir = "media/plugins" 425 part_name = "gstreamer" 426 subsystem_name = "thirdparty" 427} 428 429ohos_source_set("rawparse_source") { 430 sources = [ 431 "gst/rawparse/gstrawaudioparse.c", 432 "gst/rawparse/gstrawbaseparse.c", 433 "gst/rawparse/gstrawvideoparse.c", 434 "gst/rawparse/gstunalignedaudioparse.c", 435 "gst/rawparse/gstunalignedvideoparse.c", 436 "gst/rawparse/plugin.c", 437 ] 438 439 configs = [ ":gst_plugins_config" ] 440} 441 442ohos_shared_library("gstrawparse") { 443 deps = [ 444 ":gstaudio", 445 ":gstvideo", 446 ":rawparse_source", 447 "//third_party/glib:glib", 448 "//third_party/glib:gobject", 449 "//third_party/gstreamer/gstreamer:gstbase", 450 "//third_party/gstreamer/gstreamer:gstreamer", 451 ] 452 453 relative_install_dir = "media/plugins" 454 part_name = "gstreamer" 455 subsystem_name = "thirdparty" 456} 457 458ohos_source_set("riff_source") { 459 sources = [ 460 "gst-libs/gst/riff/riff-media.c", 461 "gst-libs/gst/riff/riff-read.c", 462 "gst-libs/gst/riff/riff.c", 463 ] 464 465 configs = [ ":gst_plugins_config" ] 466} 467 468ohos_shared_library("gstriff") { 469 deps = [ 470 ":gstaudio", 471 ":riff_source", 472 "//third_party/glib:glib", 473 "//third_party/glib:gobject", 474 "//third_party/gstreamer/gstplugins_base:gsttag", 475 "//third_party/gstreamer/gstreamer:gstreamer", 476 ] 477 part_name = "gstreamer" 478 subsystem_name = "thirdparty" 479} 480 481ohos_source_set("rtp_source") { 482 sources = [ 483 "gst-libs/gst/rtp/gstrtcpbuffer.c", 484 "gst-libs/gst/rtp/gstrtp-enumtypes.c", 485 "gst-libs/gst/rtp/gstrtpbaseaudiopayload.c", 486 "gst-libs/gst/rtp/gstrtpbasedepayload.c", 487 "gst-libs/gst/rtp/gstrtpbasepayload.c", 488 "gst-libs/gst/rtp/gstrtpbuffer.c", 489 "gst-libs/gst/rtp/gstrtphdrext.c", 490 "gst-libs/gst/rtp/gstrtpmeta.c", 491 "gst-libs/gst/rtp/gstrtppayloads.c", 492 ] 493 494 configs = [ ":gst_plugins_config" ] 495} 496 497ohos_shared_library("gstrtp") { 498 deps = [ 499 ":rtp_source", 500 "//third_party/glib:glib", 501 "//third_party/glib:gobject", 502 "//third_party/gstreamer/gstreamer:gstbase", 503 "//third_party/gstreamer/gstreamer:gstreamer", 504 ] 505 part_name = "gstreamer" 506 subsystem_name = "thirdparty" 507} 508 509ohos_source_set("videoconvert_source") { 510 sources = [ "gst/videoconvert/gstvideoconvert.c" ] 511 512 configs = [ ":gst_plugins_config" ] 513} 514 515ohos_shared_library("gstvideoconvert") { 516 deps = [ 517 ":gstvideo", 518 ":videoconvert_source", 519 "//third_party/glib:glib", 520 "//third_party/glib:gobject", 521 "//third_party/gstreamer/gstreamer:gstbase", 522 "//third_party/gstreamer/gstreamer:gstreamer", 523 ] 524 525 relative_install_dir = "media/plugins" 526 part_name = "gstreamer" 527 subsystem_name = "thirdparty" 528} 529 530ohos_source_set("videoscale_source") { 531 sources = [ "gst/videoscale/gstvideoscale.c" ] 532 533 configs = [ ":gst_plugins_config" ] 534} 535 536ohos_shared_library("gstvideoscale") { 537 deps = [ 538 ":gstvideo", 539 ":videoscale_source", 540 "//third_party/glib:glib", 541 "//third_party/glib:gobject", 542 "//third_party/gstreamer/gstreamer:gstbase", 543 "//third_party/gstreamer/gstreamer:gstreamer", 544 ] 545 546 relative_install_dir = "media/plugins" 547 part_name = "gstreamer" 548 subsystem_name = "thirdparty" 549} 550 551ohos_source_set("app_source") { 552 sources = [ 553 "gst/app/gstapp.c", 554 "gst/app/gstappsink.c", 555 "gst/app/gstappsrc.c", 556 ] 557 558 configs = [ ":gst_plugins_config" ] 559} 560 561ohos_shared_library("gstapp") { 562 deps = [ 563 ":app_source", 564 ":gstapp_plugin", 565 "//third_party/glib:glib", 566 "//third_party/glib:gobject", 567 "//third_party/gstreamer/gstreamer:gstbase", 568 "//third_party/gstreamer/gstreamer:gstreamer", 569 ] 570 571 relative_install_dir = "media/plugins" 572 part_name = "gstreamer" 573 subsystem_name = "thirdparty" 574} 575 576ohos_source_set("app_source_plugin") { 577 sources = [ 578 "gst-libs/gst/app/app-enumtypes.c", 579 "gst-libs/gst/app/gstappsink.c", 580 "gst-libs/gst/app/gstappsrc.c", 581 ] 582 583 configs = [ ":gst_plugins_config" ] 584} 585 586ohos_shared_library("gstapp_plugin") { 587 deps = [ 588 ":app_source_plugin", 589 "//third_party/glib:glib", 590 "//third_party/glib:gobject", 591 "//third_party/gstreamer/gstreamer:gstbase", 592 "//third_party/gstreamer/gstreamer:gstreamer", 593 ] 594 595 part_name = "gstreamer" 596 subsystem_name = "thirdparty" 597} 598