[Spice-commits] tools/Makefile.am tools/spicy.c

Victor Toso de Carvalho victortoso at kemper.freedesktop.org
Tue May 23 13:39:04 UTC 2017


 tools/Makefile.am |    4 ++++
 tools/spicy.c     |    9 +++++++++
 2 files changed, 13 insertions(+)

New commits:
commit a3dd27e0eff8c9a846712710e92ce7e30a42d358
Author: Victor Toso <me at victortoso.com>
Date:   Wed May 17 13:46:46 2017 +0200

    spicy: add gstreamer options to command line
    
    So we can see all available options with spicy --help-gst and set them
    as command line argument.
    
    Signed-off-by: Victor Toso <victortoso at redhat.com>
    Acked-by: Pavel Grunt <pgrunt at redhat.com>

diff --git a/tools/Makefile.am b/tools/Makefile.am
index c80d34a..1e3deed 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -29,11 +29,15 @@ spicy_LDADD =				\
 	$(top_builddir)/src/libspice-client-gtk-3.0.la	\
 	$(top_builddir)/src/libspice-client-glib-2.0.la	\
 	$(GTK_LIBS) \
+	$(GSTAUDIO_LIBS) \
+	$(GSTVIDEO_LIBS) \
 	$(NULL)
 
 # FIXME: GtkAction and lots of GtkUIManager APIs are deprecated
 spicy_CPPFLAGS =			\
 	$(TOOLS_CPPFLAGS)		\
+	$(GSTAUDIO_CFLAGS)		\
+	$(GSTVIDEO_CFLAGS)		\
 	-DSPICE_DISABLE_DEPRECATED	\
 	-Wno-deprecated-declarations	\
 	$(NULL)
diff --git a/tools/spicy.c b/tools/spicy.c
index eeb640d..40cd6b3 100644
--- a/tools/spicy.c
+++ b/tools/spicy.c
@@ -37,6 +37,9 @@
 #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;
 
@@ -1995,6 +1998,9 @@ 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 ".");
@@ -2002,6 +2008,9 @@ 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);


More information about the Spice-commits mailing list