mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice-gtk
synced 2025-12-26 05:26:12 +00:00
build-sys: drop gstaudio option, make GStreamer a requirement
GStreamer is being increasingly used by spice-gtk. Let's make it a core requirement. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Acked-by: Victor Toso <victortoso@redhat.com>
This commit is contained in:
parent
3b5fb006bc
commit
ac0e50f5e2
@ -32,7 +32,6 @@ makecheck_simple:
|
||||
script:
|
||||
- ./autogen.sh --enable-static
|
||||
--enable-lz4=no
|
||||
--enable-gstaudio=no
|
||||
--enable-gstvideo=no
|
||||
--enable-webdav=no
|
||||
--with-sasl=no
|
||||
@ -47,7 +46,6 @@ makecheck_simple:
|
||||
makecheck_simple-meson:
|
||||
script:
|
||||
- meson build -Dauto_features=disabled
|
||||
-Dgstaudio=false
|
||||
-Dgstvideo=false
|
||||
-Dusbredir=false
|
||||
-Ddbus=false || (cat build/meson-logs/meson-log.txt && exit 1)
|
||||
|
||||
32
configure.ac
32
configure.ac
@ -210,27 +210,16 @@ AS_IF([test "x$enable_pulse" != "xno"],
|
||||
])
|
||||
AM_CONDITIONAL([HAVE_PULSE], [test "x$enable_pulse" = "xyes"])
|
||||
|
||||
AC_ARG_ENABLE([gstaudio],
|
||||
AS_HELP_STRING([--enable-gstaudio=@<:@yes/auto/no@:>@], [Enable the GStreamer 1.0 audio backend @<:@default=auto@:>@]),
|
||||
[],
|
||||
[enable_gstaudio="auto"])
|
||||
AS_IF([test "x$enable_gstaudio" != "xno"],
|
||||
[SPICE_CHECK_GSTREAMER(GSTAUDIO, 1.0, [gstreamer-1.0 gstreamer-base-1.0 gstreamer-app-1.0 gstreamer-audio-1.0],
|
||||
[SPICE_CHECK_GSTREAMER_ELEMENTS($GST_INSPECT_1_0, [gst-plugins-base 1.0], [audioconvert audioresample appsink])
|
||||
SPICE_CHECK_GSTREAMER_ELEMENTS($GST_INSPECT_1_0, [gst-plugins-good 1.0], [autoaudiosrc])
|
||||
AS_IF([test x"$missing_gstreamer_elements" = "xyes"],
|
||||
SPICE_WARNING([The GStreamer 1.0 audio backend can be built but may not work.]))
|
||||
],
|
||||
[AS_IF([test "x$enable_gstaudio" = "xyes"],
|
||||
AC_MSG_ERROR([GStreamer 1.0 audio requested but not found]))
|
||||
])
|
||||
], [have_gstaudio="no"]
|
||||
)
|
||||
AM_CONDITIONAL([HAVE_GSTAUDIO], [test "x$have_gstaudio" = "xyes"])
|
||||
|
||||
AS_IF([test "x$enable_pulse$have_gstaudio" = "xnono"],
|
||||
[SPICE_WARNING([No PulseAudio or GStreamer 1.0 audio decoder, audio will not be streamed])
|
||||
])
|
||||
SPICE_CHECK_GSTREAMER(GSTAUDIO, 1.0,
|
||||
[gstreamer-1.0 gstreamer-base-1.0 gstreamer-app-1.0 gstreamer-audio-1.0],
|
||||
[SPICE_CHECK_GSTREAMER_ELEMENTS($GST_INSPECT_1_0,
|
||||
[gst-plugins-base 1.0], [audioconvert audioresample appsink])
|
||||
SPICE_CHECK_GSTREAMER_ELEMENTS($GST_INSPECT_1_0,
|
||||
[gst-plugins-good 1.0], [autoaudiosrc])
|
||||
AS_IF([test x"$missing_gstreamer_elements" = "xyes"],
|
||||
SPICE_WARNING([The GStreamer 1.0 audio backend can be built but may not work.]))
|
||||
],
|
||||
[AC_MSG_ERROR([Required GStreamer packages missing])])
|
||||
|
||||
AC_ARG_ENABLE([gstvideo],
|
||||
AS_HELP_STRING([--enable-gstvideo=@<:@auto/yes/no@:>@],
|
||||
@ -558,7 +547,6 @@ AC_MSG_NOTICE([
|
||||
Gtk: ${with_gtk}
|
||||
Coroutine: ${with_coroutine}
|
||||
PulseAudio: ${enable_pulse}
|
||||
GStreamer Audio: ${have_gstaudio}
|
||||
GStreamer Video: ${have_gstvideo}
|
||||
SASL support: ${have_sasl}
|
||||
Smartcard support: ${have_smartcard}
|
||||
|
||||
18
meson.build
18
meson.build
@ -160,25 +160,15 @@ if d.found()
|
||||
spice_gtk_has_pulse = true
|
||||
endif
|
||||
|
||||
# gstaudio
|
||||
gst_base_deps = ['gstreamer-1.0', 'gstreamer-base-1.0', 'gstreamer-app-1.0']
|
||||
spice_gtk_has_gstaudio = false
|
||||
if get_option('gstaudio')
|
||||
deps = gst_base_deps + ['gstreamer-audio-1.0']
|
||||
foreach dep : deps
|
||||
spice_glib_deps += dependency(dep)
|
||||
endforeach
|
||||
spice_gtk_config_data.set('HAVE_GSTAUDIO', '1')
|
||||
spice_gtk_has_gstaudio = true
|
||||
endif
|
||||
deps = ['gstreamer-1.0', 'gstreamer-base-1.0', 'gstreamer-app-1.0', 'gstreamer-audio-1.0']
|
||||
foreach dep : deps
|
||||
spice_glib_deps += dependency(dep)
|
||||
endforeach
|
||||
|
||||
# gstvideo
|
||||
spice_gtk_has_gstvideo = false
|
||||
if get_option('gstvideo')
|
||||
deps = ['gstreamer-video-1.0']
|
||||
if not spice_gtk_has_gstaudio
|
||||
deps += gst_base_deps
|
||||
endif
|
||||
foreach dep : deps
|
||||
spice_glib_deps += dependency(dep)
|
||||
endforeach
|
||||
|
||||
@ -10,11 +10,6 @@ option('pulse',
|
||||
type : 'feature',
|
||||
description: 'Enable the PulseAudio backend')
|
||||
|
||||
option('gstaudio',
|
||||
type : 'boolean',
|
||||
value : true,
|
||||
description : 'Enable the GStreamer 1.0 audio backend')
|
||||
|
||||
option('gstvideo',
|
||||
type : 'boolean',
|
||||
value : true,
|
||||
|
||||
@ -217,6 +217,8 @@ libspice_client_glib_impl_la_SOURCES = \
|
||||
bio-gio.h \
|
||||
spice-audio.c \
|
||||
spice-audio-priv.h \
|
||||
spice-gstaudio.c \
|
||||
spice-gstaudio.h \
|
||||
spice-common.h \
|
||||
spice-util.c \
|
||||
spice-util-priv.h \
|
||||
@ -318,13 +320,6 @@ libspice_client_glib_impl_la_SOURCES += \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
if HAVE_GSTAUDIO
|
||||
libspice_client_glib_impl_la_SOURCES += \
|
||||
spice-gstaudio.c \
|
||||
spice-gstaudio.h \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
if HAVE_BUILTIN_MJPEG
|
||||
libspice_client_glib_impl_la_SOURCES += \
|
||||
channel-display-mjpeg.c \
|
||||
|
||||
@ -110,6 +110,8 @@ spice_client_glib_sources = [
|
||||
'spice-file-transfer-task.c',
|
||||
'spice-file-transfer-task-priv.h',
|
||||
'spice-glib-main.c',
|
||||
'spice-gstaudio.c',
|
||||
'spice-gstaudio.h',
|
||||
'spice-option.h',
|
||||
'spice-session-priv.h',
|
||||
'spice-uri.c',
|
||||
@ -126,11 +128,6 @@ if spice_gtk_has_builtin_mjpeg
|
||||
spice_client_glib_sources += 'channel-display-mjpeg.c'
|
||||
endif
|
||||
|
||||
if spice_gtk_has_gstaudio
|
||||
spice_client_glib_sources += ['spice-gstaudio.c',
|
||||
'spice-gstaudio.h']
|
||||
endif
|
||||
|
||||
if spice_gtk_has_gstvideo
|
||||
spice_client_glib_sources += 'channel-display-gst.c'
|
||||
endif
|
||||
|
||||
@ -45,9 +45,7 @@
|
||||
#ifdef HAVE_PULSE
|
||||
#include "spice-pulse.h"
|
||||
#endif
|
||||
#ifdef HAVE_GSTAUDIO
|
||||
#include "spice-gstaudio.h"
|
||||
#endif
|
||||
|
||||
G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE(SpiceAudio, spice_audio, G_TYPE_OBJECT)
|
||||
|
||||
@ -241,10 +239,8 @@ SpiceAudio *spice_audio_new_priv(SpiceSession *session, GMainContext *context,
|
||||
#ifdef HAVE_PULSE
|
||||
self = SPICE_AUDIO(spice_pulse_new(session, context, name));
|
||||
#endif
|
||||
#ifdef HAVE_GSTAUDIO
|
||||
if (!self)
|
||||
self = SPICE_AUDIO(spice_gstaudio_new(session, context, name));
|
||||
#endif
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
|
||||
@ -33,9 +33,7 @@
|
||||
#include "usb-device-widget.h"
|
||||
|
||||
#include "spicy-connect.h"
|
||||
#if HAVE_GSTAUDIO || HAVE_GSTVIDEO
|
||||
#include <gst/gst.h>
|
||||
#endif
|
||||
|
||||
typedef struct spice_connection spice_connection;
|
||||
|
||||
@ -1997,9 +1995,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
/* parse opts */
|
||||
gtk_init(&argc, &argv);
|
||||
#if HAVE_GSTAUDIO || HAVE_GSTVIDEO
|
||||
gst_init(&argc, &argv);
|
||||
#endif
|
||||
context = g_option_context_new("- spice client test application");
|
||||
g_option_context_set_summary(context, "Gtk+ test client to connect to Spice servers.");
|
||||
g_option_context_set_description(context, "Report bugs to " PACKAGE_BUGREPORT ".");
|
||||
@ -2007,9 +2003,7 @@ int main(int argc, char *argv[])
|
||||
g_option_context_set_main_group(context, spice_cmdline_get_option_group());
|
||||
g_option_context_add_main_entries(context, cmd_entries, NULL);
|
||||
g_option_context_add_group(context, gtk_get_option_group(TRUE));
|
||||
#if HAVE_GSTAUDIO || HAVE_GSTVIDEO
|
||||
g_option_context_add_group(context, gst_init_get_option_group());
|
||||
#endif
|
||||
if (!g_option_context_parse (context, &argc, &argv, &error)) {
|
||||
g_print("option parsing failed: %s\n", error->message);
|
||||
exit(1);
|
||||
@ -2064,8 +2058,6 @@ int main(int argc, char *argv[])
|
||||
g_free(spicy_title);
|
||||
|
||||
setup_terminal(true);
|
||||
#if HAVE_GSTAUDIO || HAVE_GSTVIDEO
|
||||
gst_deinit();
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user