Re: [PATCH spice-gtk v2 01/15] build-sys: drop gstaudio option, make GStreamer a requirement

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Wed, Jan 09, 2019 at 10:09:21AM +0000, Frediano Ziglio wrote:
> From: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>
> 
> GStreamer is being increasingly used by spice-gtk. Let's make it a
> core requirement.
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>
Acked-by: Victor Toso <victortoso@xxxxxxxxxx>
> ---
>  .gitlab-ci.yml    |  2 --
>  configure.ac      | 32 ++++++++++----------------------
>  meson.build       | 18 ++++--------------
>  meson_options.txt |  5 -----
>  src/Makefile.am   |  9 ++-------
>  src/meson.build   |  7 ++-----
>  src/spice-audio.c |  4 ----
>  tools/spicy.c     |  8 --------
>  8 files changed, 18 insertions(+), 67 deletions(-)
> 
> diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
> index fd999d15..78b339e7 100644
> --- a/.gitlab-ci.yml
> +++ b/.gitlab-ci.yml
> @@ -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)
> diff --git a/configure.ac b/configure.ac
> index 8c5c4d38..fdd9788f 100644
> --- a/configure.ac
> +++ b/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}
> diff --git a/meson.build b/meson.build
> index 37377680..4b49a24e 100644
> --- a/meson.build
> +++ b/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
> diff --git a/meson_options.txt b/meson_options.txt
> index 32468b7e..08efaceb 100644
> --- a/meson_options.txt
> +++ b/meson_options.txt
> @@ -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,
> diff --git a/src/Makefile.am b/src/Makefile.am
> index b876530c..f8335ca7 100644
> --- a/src/Makefile.am
> +++ b/src/Makefile.am
> @@ -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		\
> diff --git a/src/meson.build b/src/meson.build
> index 73ddcc0e..5754f1fc 100644
> --- a/src/meson.build
> +++ b/src/meson.build
> @@ -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
> diff --git a/src/spice-audio.c b/src/spice-audio.c
> index d2f0d92d..daf62dff 100644
> --- a/src/spice-audio.c
> +++ b/src/spice-audio.c
> @@ -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;
>  
> diff --git a/tools/spicy.c b/tools/spicy.c
> index 060bbdc0..06af15e1 100644
> --- a/tools/spicy.c
> +++ b/tools/spicy.c
> @@ -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;
>  }
> -- 
> 2.20.1
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/spice-devel

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]