summaryrefslogtreecommitdiff
path: root/recipes/gst-plugins-base-1.0.recipe
blob: a2aa2778b5079f0f5cf9036eef441b8e5e9ca25e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python


class Recipe(custom.GStreamer):
    name = 'gst-plugins-base-1.0'
    btype = BuildType.MESON
    tarball_checksum = '292424e82dea170528c42b456f62a89532bcabc0508f192e34672fb86f68e5b8'
    meson_options = {# enabled plugins
                     'gl': 'enabled',
                     'gl-graphene': 'enabled',
                     'gl-png': 'enabled',
                     'gl-jpeg': 'enabled',
                     'ogg': 'enabled',
                     'opus': 'enabled',
                     'pango': 'enabled',
                     'theora': 'enabled',
                     'vorbis': 'enabled',
                     # disabled plugins
                     'tremor': 'disabled'}
    deps = ['glib', 'gstreamer-1.0', 'libogg', 'pango', 'libtheora',
            'libvorbis', 'zlib', 'orc', 'opus', 'graphene',
            'libjpeg-turbo', 'libpng']
    platform_deps = {Platform.ANDROID: [ 'tremor' ], Platform.IOS: [ 'tremor' ] }
    use_system_libs = True

    files_bins = ['gst-discoverer-1.0', 'gst-play-1.0', 'gst-device-monitor-1.0']

    files_libs = ['libgstallocators-1.0',
                 'libgstapp-1.0', 'libgstaudio-1.0',
                 'libgstfft-1.0', 'libgstpbutils-1.0', 'libgstriff-1.0', 'libgstrtp-1.0',
                 'libgstrtsp-1.0', 'libgstsdp-1.0', 'libgsttag-1.0',
                 'libgstvideo-1.0', 'libgstgl-1.0']

    files_plugins_core = [
             'lib/gstreamer-1.0/libgstadder%(mext)s',
             'lib/gstreamer-1.0/libgstapp%(mext)s',
             'lib/gstreamer-1.0/libgstaudioconvert%(mext)s',
             'lib/gstreamer-1.0/libgstaudiomixer%(mext)s',
             'lib/gstreamer-1.0/libgstaudiorate%(mext)s',
             'lib/gstreamer-1.0/libgstaudioresample%(mext)s',
             'lib/gstreamer-1.0/libgstaudiotestsrc%(mext)s',
             'lib/gstreamer-1.0/libgstcompositor%(mext)s',
             'lib/gstreamer-1.0/libgstgio%(mext)s',
             'lib/gstreamer-1.0/libgstoverlaycomposition%(mext)s',
             'lib/gstreamer-1.0/libgstpango%(mext)s',
             'lib/gstreamer-1.0/libgstrawparse%(mext)s',
             'lib/gstreamer-1.0/libgsttypefindfunctions%(mext)s',
             'lib/gstreamer-1.0/libgstvideoconvertscale%(mext)s',
             'lib/gstreamer-1.0/libgstvideorate%(mext)s',
             'lib/gstreamer-1.0/libgstvideotestsrc%(mext)s',
             'lib/gstreamer-1.0/libgstvolume%(mext)s',
    ]

    files_plugins_core_devel = [
             'lib/gstreamer-1.0/libgstadder.a', 'lib/gstreamer-1.0/libgstadder.la',
             'lib/gstreamer-1.0/libgstapp.a', 'lib/gstreamer-1.0/libgstapp.la',
             'lib/gstreamer-1.0/libgstaudioconvert.a', 'lib/gstreamer-1.0/libgstaudioconvert.la',
             'lib/gstreamer-1.0/libgstaudiomixer.a', 'lib/gstreamer-1.0/libgstaudiomixer.la',
             'lib/gstreamer-1.0/libgstaudiorate.a', 'lib/gstreamer-1.0/libgstaudiorate.la',
             'lib/gstreamer-1.0/libgstaudioresample.a', 'lib/gstreamer-1.0/libgstaudioresample.la',
             'lib/gstreamer-1.0/libgstaudiotestsrc.a', 'lib/gstreamer-1.0/libgstaudiotestsrc.la',
             'lib/gstreamer-1.0/libgstcompositor.a', 'lib/gstreamer-1.0/libgstcompositor.la',
             'lib/gstreamer-1.0/libgstgio.a', 'lib/gstreamer-1.0/libgstgio.la',
             'lib/gstreamer-1.0/libgstoverlaycomposition.a', 'lib/gstreamer-1.0/libgstoverlaycomposition.la',
             'lib/gstreamer-1.0/libgstpango.a', 'lib/gstreamer-1.0/libgstpango.la',
             'lib/gstreamer-1.0/libgstrawparse.a', 'lib/gstreamer-1.0/libgstrawparse.la',
             'lib/gstreamer-1.0/libgsttypefindfunctions.a', 'lib/gstreamer-1.0/libgsttypefindfunctions.la',
             'lib/gstreamer-1.0/libgstvideoconvertscale.a', 'lib/gstreamer-1.0/libgstvideoconvertscale.la',
             'lib/gstreamer-1.0/libgstvideorate.a', 'lib/gstreamer-1.0/libgstvideorate.la',
             'lib/gstreamer-1.0/libgstvideotestsrc.a', 'lib/gstreamer-1.0/libgstvideotestsrc.la',
             'lib/gstreamer-1.0/libgstvolume.a', 'lib/gstreamer-1.0/libgstvolume.la',
    ]

    files_plugins_playback = [
             'lib/gstreamer-1.0/libgstplayback%(mext)s',
    ]

    files_plugins_playback_devel = [
             'lib/gstreamer-1.0/libgstplayback.a', 'lib/gstreamer-1.0/libgstplayback.la',
    ]

    # Not used currently
    files_plugins_encoding = [
             'lib/gstreamer-1.0/libgstencoding%(mext)s',
    ]

    files_plugins_encoding_devel = [
             'lib/gstreamer-1.0/libgstencoding.a', 'lib/gstreamer-1.0/libgstencoding.la',
    ]

    files_plugins_codecs = [
             'lib/gstreamer-1.0/libgstsubparse%(mext)s',
             'lib/gstreamer-1.0/libgstogg%(mext)s',
             'lib/gstreamer-1.0/libgsttheora%(mext)s',
             'lib/gstreamer-1.0/libgstvorbis%(mext)s',
             'lib/gstreamer-1.0/libgstopus%(mext)s',
    ]

    files_plugins_codecs_devel = [
             'lib/gstreamer-1.0/libgstsubparse.a', 'lib/gstreamer-1.0/libgstsubparse.la',
             'lib/gstreamer-1.0/libgstogg.a', 'lib/gstreamer-1.0/libgstogg.la',
             'lib/gstreamer-1.0/libgsttheora.a', 'lib/gstreamer-1.0/libgsttheora.la',
             'lib/gstreamer-1.0/libgstvorbis.a', 'lib/gstreamer-1.0/libgstvorbis.la',
             'lib/gstreamer-1.0/libgstopus.a', 'lib/gstreamer-1.0/libgstopus.la',
    ]

    files_plugins_devel = [
            'include/gstreamer-1.0/gst/allocators',
            'include/gstreamer-1.0/gst/app',
            'include/gstreamer-1.0/gst/audio',
            'include/gstreamer-1.0/gst/fft',
            'include/gstreamer-1.0/gst/gl',
            'lib/gstreamer-1.0/include/gst/gl',
            'include/gstreamer-1.0/gst/pbutils',
            'include/gstreamer-1.0/gst/riff',
            'include/gstreamer-1.0/gst/rtp',
            'include/gstreamer-1.0/gst/rtsp',
            'include/gstreamer-1.0/gst/sdp',
            'include/gstreamer-1.0/gst/tag',
            'include/gstreamer-1.0/gst/video',
            'lib/pkgconfig/gstreamer-allocators-1.0.pc',
            'lib/pkgconfig/gstreamer-app-1.0.pc',
            'lib/pkgconfig/gstreamer-audio-1.0.pc',
            'lib/pkgconfig/gstreamer-fft-1.0.pc',
            'lib/pkgconfig/gstreamer-gl-1.0.pc',
            'lib/pkgconfig/gstreamer-gl-prototypes-1.0.pc',
            'lib/pkgconfig/gstreamer-pbutils-1.0.pc',
            'lib/pkgconfig/gstreamer-riff-1.0.pc',
            'lib/pkgconfig/gstreamer-rtp-1.0.pc',
            'lib/pkgconfig/gstreamer-rtsp-1.0.pc',
            'lib/pkgconfig/gstreamer-sdp-1.0.pc',
            'lib/pkgconfig/gstreamer-tag-1.0.pc',
            'lib/pkgconfig/gstreamer-video-1.0.pc',
            'lib/pkgconfig/gstreamer-plugins-base-1.0.pc',
    ]

    files_plugins_net = [
            'lib/gstreamer-1.0/libgsttcp%(mext)s',
    ]

    files_plugins_net_devel = [
            'lib/gstreamer-1.0/libgsttcp.a', 'lib/gstreamer-1.0/libgsttcp.la',
    ]

    files_plugins_sys = [
            'lib/gstreamer-1.0/libgstopengl%(mext)s',
    ]

    files_plugins_sys_devel = [
             'lib/gstreamer-1.0/libgstopengl.a', 'lib/gstreamer-1.0/libgstopengl.la',
    ]

    platform_files_plugins_codecs = {
        Platform.ANDROID: [
             'lib/gstreamer-1.0/libgstivorbisdec%(mext)s',
            ],
        Platform.IOS: [
             'lib/gstreamer-1.0/libgstivorbisdec%(mext)s',
            ]
    }

    platform_files_plugins_codecs_devel = {
        Platform.ANDROID: [
             'lib/gstreamer-1.0/libgstivorbisdec.a', 'lib/gstreamer-1.0/libgstivorbisdec.la',
            ],
        Platform.IOS: [
             'lib/gstreamer-1.0/libgstivorbisdec.a', 'lib/gstreamer-1.0/libgstivorbisdec.la',
            ]
    }

    files_lang = ['gst-plugins-base-1.0']

    files_typelibs = [
        'GstAllocators-1.0',
        'GstApp-1.0',
        'GstGL-1.0',
        'GstPbutils-1.0',
#        'GstRiff-1.0',         Gir disabled due to incompatibilities
        'GstRtp-1.0',
        'GstRtsp-1.0',
        'GstSdp-1.0',
        'GstTag-1.0',
        'GstVideo-1.0',
        'GstAudio-1.0'
        ]

    def prepare(self):
        # Disable Cocoa NSApp integration since we enable the Cocoa MainLoop
        # integration in the GLib recipe
        if self.config.target_platform in (Platform.DARWIN, Platform.IOS):
            self.append_env('CFLAGS', '-DGSTREAMER_GLIB_COCOA_NSAPPLICATION=1')
            self.append_env('OBJCFLAGS', '-DGSTREAMER_GLIB_COCOA_NSAPPLICATION=1')

        self.enable_plugin('cdparanoia', 'sys', 'cdparanoia', dep='cdparanoia')
        self.enable_plugin('ximagesink', 'sys', 'x11', option='x11')
        self.enable_plugin('xvimagesink', 'sys', 'x11', option='xvideo')
        self.enable_plugin('alsa', 'sys', 'alsa')

        if self.config.target_platform in (Platform.ANDROID, Platform.IOS):
            self.meson_options['tremor'] = 'enabled'

        if self.using_uwp():
            # All these can be ported to Meson/UWP
            self.disable_plugin('ogg', 'codecs', dep='libogg')
            self.disable_plugin('pango', 'core', dep='pango')
            self.disable_plugin('theora', 'codecs', dep='libtheora')
            self.disable_plugin('vorbis', 'codecs', dep='libvorbis')
            if self.config.target_arch in (Architecture.ARM64, Architecture.X86_64, Architecture.X86):
                self.deps.append('angle-uwp')
                # To avoid complicating winrt vs win32 detection,
                # explicitly select api/platform/winsys
                self.meson_options['gl_api'] = 'gles2'
                self.meson_options['gl_platform'] = 'egl'
                self.meson_options['gl_winsys'] = 'winrt'
            else:
                self.disable_plugin('opengl', 'sys', 'gl', library_name='gl')
            self.meson_options['gl-graphene'] = 'disabled'
            self.meson_options['gl-png'] = 'disabled'
            self.meson_options['gl-jpeg'] = 'disabled'
            for dep in ('graphene', 'libpng', 'libjpeg-turbo'):
                self.deps.remove(dep)

        if self.config.variants.nodebug:
            self.append_env('CFLAGS', '-DGST_LEVEL_MAX=GST_LEVEL_FIXME')