gst: add option to disable device provider

This commit is contained in:
Wim Taymans 2020-10-13 12:40:48 +02:00
parent 10bc423819
commit 4b7b2a9a10
5 changed files with 18 additions and 1 deletions

View file

@ -468,3 +468,5 @@
#mesondefine PA_ALSA_PATHS_DIR #mesondefine PA_ALSA_PATHS_DIR
#mesondefine PA_ALSA_PROFILE_SETS_DIR #mesondefine PA_ALSA_PROFILE_SETS_DIR
#mesondefine HAVE_GSTREAMER_DEVICE_PROVIDER

View file

@ -296,6 +296,12 @@ if get_option('bluez5')
endif endif
endif endif
if get_option('gstreamer')
if get_option('gstreamer-device-provider')
cdata.set('HAVE_GSTREAMER_DEVICE_PROVIDER', 1)
endif
endif
configure_file(input : 'config.h.meson', configure_file(input : 'config.h.meson',
output : 'config.h', output : 'config.h',
configuration : cdata) configuration : cdata)

View file

@ -22,6 +22,10 @@ option('gstreamer',
description: 'Build GStreamer plugins', description: 'Build GStreamer plugins',
type: 'boolean', type: 'boolean',
value: true) value: true)
option('gstreamer-device-provider',
description: 'Build GStreamer device provider plugin',
type: 'boolean',
value: true)
option('systemd', option('systemd',
description: 'Enable systemd integration', description: 'Enable systemd integration',
type: 'boolean', type: 'boolean',

View file

@ -53,9 +53,11 @@ plugin_init (GstPlugin *plugin)
gst_element_register (plugin, "pipewiresink", GST_RANK_NONE, gst_element_register (plugin, "pipewiresink", GST_RANK_NONE,
GST_TYPE_PIPEWIRE_SINK); GST_TYPE_PIPEWIRE_SINK);
#if HAVE_GSTREAMER_DEVICE_PROVIDER
if (!gst_device_provider_register (plugin, "pipewiredeviceprovider", if (!gst_device_provider_register (plugin, "pipewiredeviceprovider",
GST_RANK_PRIMARY + 1, GST_TYPE_PIPEWIRE_DEVICE_PROVIDER)) GST_RANK_PRIMARY + 1, GST_TYPE_PIPEWIRE_DEVICE_PROVIDER))
return FALSE; return FALSE;
#endif
GST_DEBUG_CATEGORY_INIT (pipewire_debug, "pipewire", 0, "PipeWire elements"); GST_DEBUG_CATEGORY_INIT (pipewire_debug, "pipewire", 0, "PipeWire elements");

View file

@ -2,13 +2,16 @@ pipewire_gst_sources = [
'gstpipewire.c', 'gstpipewire.c',
'gstpipewirecore.c', 'gstpipewirecore.c',
'gstpipewireclock.c', 'gstpipewireclock.c',
'gstpipewiredeviceprovider.c',
'gstpipewireformat.c', 'gstpipewireformat.c',
'gstpipewirepool.c', 'gstpipewirepool.c',
'gstpipewiresink.c', 'gstpipewiresink.c',
'gstpipewiresrc.c', 'gstpipewiresrc.c',
] ]
if get_option('gstreamer-device-provider')
pipewire_gst_sources += [ 'gstpipewiredeviceprovider.c' ]
endif
pipewire_gst_headers = [ pipewire_gst_headers = [
'gstpipewireclock.h', 'gstpipewireclock.h',
'gstpipewirecore.h', 'gstpipewirecore.h',