[Spice-devel] [PATCH v2] gstreamer: Allows to add output format to options

Frediano Ziglio fziglio at redhat.com
Wed Aug 3 11:47:07 UTC 2016


This allow option string to contain separator so you could set as
"field=value ! format".
This is useful as some encoders use the output format to specify
compression types (for instance with some H264 encoders you can
specify the profile to use).

Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
 server/gstreamer-encoder.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Changes since v1:
- split the long line, was really long.

diff --git a/server/gstreamer-encoder.c b/server/gstreamer-encoder.c
index e364ea3..e6790af 100644
--- a/server/gstreamer-encoder.c
+++ b/server/gstreamer-encoder.c
@@ -939,7 +939,9 @@ static gboolean create_pipeline(SpiceGstEncoder *encoder)
     }
 
     GError *err = NULL;
-    gchar *desc = g_strdup_printf("appsrc is-live=true format=time do-timestamp=true name=src ! %s ! %s %s name=encoder ! appsink name=sink", converter, gstenc_name, gstenc_opts);
+    gchar *desc = g_strdup_printf("appsrc is-live=true format=time do-timestamp=true name=src !"
+                                  " %s ! %s name=encoder %s ! appsink name=sink",
+                                  converter, gstenc_name, gstenc_opts);
     spice_debug("GStreamer pipeline: %s", desc);
     encoder->pipeline = gst_parse_launch_full(desc, NULL, GST_PARSE_FLAG_FATAL_ERRORS, &err);
     g_free(gstenc_opts);
-- 
2.7.4



More information about the Spice-devel mailing list