[Spice-devel] [PATCH spice v2 1/3] Do not use gstreamer in default codecs if not available

Pavel Grunt pgrunt at redhat.com
Tue Nov 15 17:27:06 UTC 2016


Avoid the following warning when build with disabled gstreamer:
Spice-WARNING **: reds.c:3660:reds_set_video_codecs: spice: unsupported video encoder gstreamer
---
 server/reds.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/server/reds.c b/server/reds.c
index 1a58c9d..12a274c 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -3507,7 +3507,12 @@ err:
 }
 
 static const char default_renderer[] = "sw";
-static const char default_video_codecs[] = "spice:mjpeg;gstreamer:mjpeg;gstreamer:h264;gstreamer:vp8";
+#if defined(HAVE_GSTREAMER_1_0) || defined(HAVE_GSTREAMER_0_10)
+#define GSTREAMER_CODECS "gstreamer:mjpeg;gstreamer:h264;gstreamer:vp8;"
+#else
+#define GSTREAMER_CODECS ""
+#endif
+static const char default_video_codecs[] = "spice:mjpeg;" GSTREAMER_CODECS;
 
 /* new interface */
 SPICE_GNUC_VISIBLE SpiceServer *spice_server_new(void)
-- 
2.10.2



More information about the Spice-devel mailing list