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