mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
meson: build examples
This commit is contained in:
parent
01ae3c3a23
commit
fb9bddd81e
15 changed files with 169 additions and 2 deletions
|
@ -1,2 +1,3 @@
|
|||
option('audioresample_format', type : 'combo', choices : ['int', 'float', 'auto'], value : 'auto')
|
||||
option('disable_examples', type : 'boolean', value : false)
|
||||
option('use_orc', type : 'combo', choices : ['yes', 'no', 'auto'], value : 'auto')
|
||||
|
|
17
tests/examples/app/meson.build
Normal file
17
tests/examples/app/meson.build
Normal file
|
@ -0,0 +1,17 @@
|
|||
app_examples = [
|
||||
'appsrc_ex',
|
||||
'appsrc-stream',
|
||||
'appsrc-stream2',
|
||||
'appsrc-ra',
|
||||
'appsrc-seekable',
|
||||
'appsink-src',
|
||||
'appsink-src2',
|
||||
]
|
||||
|
||||
foreach app : app_examples
|
||||
executable(app, '@0@.c'.format(app),
|
||||
c_args : gst_plugins_base_args,
|
||||
include_directories: [configinc, libsinc],
|
||||
dependencies : [glib_deps, gst_dep, app_dep],
|
||||
install: false)
|
||||
endforeach
|
13
tests/examples/audio/meson.build
Normal file
13
tests/examples/audio/meson.build
Normal file
|
@ -0,0 +1,13 @@
|
|||
# autotools build also passes -D_GNU_SOURCE but not sure why it's needed
|
||||
if gtk_dep.found()
|
||||
executable('audiomix', 'audiomix.c',
|
||||
c_args : gst_plugins_base_args,
|
||||
include_directories: [configinc, libsinc],
|
||||
dependencies : [glib_deps, gst_dep, audio_dep, gtk_dep],
|
||||
install: false)
|
||||
executable('volume', 'volume.c',
|
||||
c_args : gst_plugins_base_args,
|
||||
include_directories: [configinc, libsinc],
|
||||
dependencies : [glib_deps, gst_dep, libm, audio_dep, gtk_dep],
|
||||
install: false)
|
||||
endif
|
7
tests/examples/decodebin_next/meson.build
Normal file
7
tests/examples/decodebin_next/meson.build
Normal file
|
@ -0,0 +1,7 @@
|
|||
foreach example : ['decodebin3', 'playbin-test']
|
||||
executable(example, '@0@.c'.format(example),
|
||||
c_args : gst_plugins_base_args,
|
||||
include_directories: [configinc, libsinc],
|
||||
dependencies : [glib_deps, gst_dep],
|
||||
install: false)
|
||||
endforeach
|
9
tests/examples/dynamic/meson.build
Normal file
9
tests/examples/dynamic/meson.build
Normal file
|
@ -0,0 +1,9 @@
|
|||
dynamic_examples = ['addstream', 'codec-select', 'sprinkle', 'sprinkle2', 'sprinkle3']
|
||||
|
||||
foreach example : dynamic_examples
|
||||
executable(example, '@0@.c'.format(example),
|
||||
c_args : gst_plugins_base_args,
|
||||
include_directories: [configinc, libsinc],
|
||||
dependencies : [glib_deps, gst_dep],
|
||||
install: false)
|
||||
endforeach
|
5
tests/examples/encoding/meson.build
Normal file
5
tests/examples/encoding/meson.build
Normal file
|
@ -0,0 +1,5 @@
|
|||
executable('encoding', 'encoding.c', 'gstcapslist.c',
|
||||
c_args : gst_plugins_base_args,
|
||||
include_directories: [configinc, libsinc],
|
||||
dependencies : [glib_deps, gst_dep, pbutils_dep, tag_dep, video_dep, audio_dep],
|
||||
install: false)
|
5
tests/examples/fft/meson.build
Normal file
5
tests/examples/fft/meson.build
Normal file
|
@ -0,0 +1,5 @@
|
|||
executable('fftrange', 'fftrange.c',
|
||||
c_args : gst_plugins_base_args,
|
||||
include_directories: [configinc, libsinc],
|
||||
dependencies : [glib_deps, gst_dep, fft_dep],
|
||||
install: false)
|
7
tests/examples/gio/meson.build
Normal file
7
tests/examples/gio/meson.build
Normal file
|
@ -0,0 +1,7 @@
|
|||
if gtk_dep.found()
|
||||
executable('giosrc-mounting', 'giosrc-mounting.c',
|
||||
c_args : gst_plugins_base_args,
|
||||
include_directories: [configinc, libsinc],
|
||||
dependencies : [glib_deps, gio_dep, gst_dep, gtk_dep],
|
||||
install: false)
|
||||
endif
|
17
tests/examples/meson.build
Normal file
17
tests/examples/meson.build
Normal file
|
@ -0,0 +1,17 @@
|
|||
# some of the examples want GTK+
|
||||
gtk_dep = dependency('gtk+-3.0', version : '>= 3.10', required : false)
|
||||
gtk_x11_dep = dependency('gtk+-x11-3.0', version : '>= 3.10', required : false)
|
||||
gtk_quartz_dep = dependency('gtk+-quartz-3.0', version : '>= 3.10', required : false)
|
||||
|
||||
subdir('app')
|
||||
subdir('audio')
|
||||
subdir('dynamic')
|
||||
subdir('decodebin_next')
|
||||
subdir('encoding')
|
||||
subdir('fft')
|
||||
subdir('gio')
|
||||
subdir('overlay')
|
||||
subdir('playback')
|
||||
subdir('playrec')
|
||||
subdir('seek')
|
||||
subdir('snapshot')
|
29
tests/examples/overlay/meson.build
Normal file
29
tests/examples/overlay/meson.build
Normal file
|
@ -0,0 +1,29 @@
|
|||
if x11_dep.found() # FIXME: originally if USE_X
|
||||
if gtk_x11_dep.found()
|
||||
executable('gtk-videooverlay', 'gtk-videooverlay.c',
|
||||
c_args : gst_plugins_base_args,
|
||||
include_directories: [configinc, libsinc],
|
||||
dependencies : [glib_deps, gst_dep, video_dep, libm, x11_dep, gtk_x11_dep],
|
||||
install: false)
|
||||
endif
|
||||
|
||||
if add_languages('cpp') # check for C++ support
|
||||
qt5_mod = import('qt5')
|
||||
qt5widgets_dep = dependency('qt5', modules : ['Gui', 'Widgets'])
|
||||
if qt5widgets_dep.found()
|
||||
executable('qt-videooverlay', 'qt-videooverlay.cpp',
|
||||
cpp_args : gst_plugins_base_args,
|
||||
include_directories: [configinc, libsinc],
|
||||
dependencies : [glib_deps, gst_dep, video_dep, libm, x11_dep, qt5widgets_dep],
|
||||
install: false)
|
||||
|
||||
# FIXME: this doesn't work properly yet, no moc_qtgv-videooverlay.cpp generated
|
||||
moc_files = qt5_mod.preprocess(moc_headers : 'qtgv-videooverlay.h')#moc_sources : 'qtgv-videooverlay.cpp')
|
||||
executable('qtgv-videooverlay', 'qtgv-videooverlay.cpp', moc_files,
|
||||
cpp_args : gst_plugins_base_args,
|
||||
include_directories: [configinc, libsinc],
|
||||
dependencies : [glib_deps, gst_dep, video_dep, libm, x11_dep, qt5widgets_dep],
|
||||
install: false)
|
||||
endif
|
||||
endif
|
||||
endif
|
13
tests/examples/playback/meson.build
Normal file
13
tests/examples/playback/meson.build
Normal file
|
@ -0,0 +1,13 @@
|
|||
if gtk_dep.found()
|
||||
if gtk_quartz_dep.found()
|
||||
quartz_cflags = ['-xobjective-c']
|
||||
else
|
||||
quartz_cflags = []
|
||||
endif
|
||||
|
||||
executable('playback-test', 'playback-test.c',
|
||||
c_args : gst_plugins_base_args + quartz_cflags,
|
||||
include_directories: [configinc, libsinc],
|
||||
dependencies : [glib_deps, gst_dep, video_dep, libm, gtk_dep],
|
||||
install: false)
|
||||
endif
|
5
tests/examples/playrec/meson.build
Normal file
5
tests/examples/playrec/meson.build
Normal file
|
@ -0,0 +1,5 @@
|
|||
executable('playrec', 'playrec.c',
|
||||
c_args : gst_plugins_base_args,
|
||||
include_directories: [configinc, libsinc],
|
||||
dependencies : [glib_deps, gst_dep],
|
||||
install: false)
|
30
tests/examples/seek/meson.build
Normal file
30
tests/examples/seek/meson.build
Normal file
|
@ -0,0 +1,30 @@
|
|||
if gtk_x11_dep.found()
|
||||
if cc.compiles('''
|
||||
#include <linux/input.h>
|
||||
#include <linux/joystick.h>
|
||||
struct js_event js;
|
||||
js.type = JS_EVENT_AXIS''', name : 'Linux joystick headers needed by jseek example')
|
||||
executable('jsseek', 'jsseek.c',
|
||||
c_args : gst_plugins_base_args,
|
||||
include_directories: [configinc, libsinc],
|
||||
dependencies : [glib_deps, gst_dep, video_dep, libm, gtk_dep],
|
||||
install: false)
|
||||
endif
|
||||
executable('scrubby', 'scrubby.c',
|
||||
c_args : gst_plugins_base_args,
|
||||
include_directories: [configinc, libsinc],
|
||||
dependencies : [glib_deps, gst_dep, video_dep, libm, gtk_dep],
|
||||
install: false)
|
||||
endif
|
||||
|
||||
executable('stepping', 'stepping.c',
|
||||
c_args : gst_plugins_base_args,
|
||||
include_directories: [configinc, libsinc],
|
||||
dependencies : [libm, glib_deps, gst_dep, video_dep],
|
||||
install: false)
|
||||
|
||||
executable('stepping2', 'stepping2.c',
|
||||
c_args : gst_plugins_base_args,
|
||||
include_directories: [configinc, libsinc],
|
||||
dependencies : [libm, glib_deps, gst_dep, video_dep],
|
||||
install: false)
|
7
tests/examples/snapshot/meson.build
Normal file
7
tests/examples/snapshot/meson.build
Normal file
|
@ -0,0 +1,7 @@
|
|||
if gtk_dep.found()
|
||||
executable('snapshot', 'snapshot.c',
|
||||
c_args : gst_plugins_base_args,
|
||||
include_directories: [configinc, libsinc],
|
||||
dependencies : [libm, glib_deps, gst_dep, video_dep, gtk_dep],
|
||||
install: false)
|
||||
endif
|
|
@ -2,6 +2,8 @@
|
|||
if host_machine.system() != 'windows'
|
||||
subdir('check')
|
||||
endif
|
||||
#subdir('examples')
|
||||
if not get_option('disable_examples')
|
||||
subdir('examples')
|
||||
endif
|
||||
#subdir('files')
|
||||
#subdir('icles')
|
||||
# FIXME: subdir('icles')
|
||||
|
|
Loading…
Reference in a new issue