<div dir="ltr">looks fine<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 13, 2015 at 10:28 PM, Francois Gouget <span dir="ltr"><<a href="mailto:fgouget@codeweavers.com" target="_blank">fgouget@codeweavers.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">---<br>
 examples/spiceqxl.xorg.conf.example |  7 +++++++<br>
 src/qxl.h                           |  1 +<br>
 src/qxl_driver.c                    |  2 ++<br>
 src/spiceqxl_spice_server.c         | 16 ++++++++++++++++<br>
 4 files changed, 26 insertions(+)<br>
<br>
diff --git a/examples/spiceqxl.xorg.conf.example b/examples/spiceqxl.xorg.conf.example<br>
index d15f7f2..a82c2be 100644<br>
--- a/examples/spiceqxl.xorg.conf.example<br>
+++ b/examples/spiceqxl.xorg.conf.example<br>
@@ -51,6 +51,13 @@ Section "Device"<br>
     # defaults to filter.<br>
     #Option "SpiceStreamingVideo" ""<br>
<br>
+    # Set video codecs to use.  Provide a semicolon list of<br>
+    # codecs, in preference order.  Each codec requires an encoder<br>
+    # which can be one of spice or gstreamer, and then a codec type,<br>
+    # for instance mjpeg or vp8. The default is spice:mjpeg,<br>
+    # which uses the builtin mjpeg encoder.<br>
+    #Option "SpiceVideoCodecs" ""<br>
+<br>
     # Set zlib glz wan compression. Options are auto, never, always.<br>
     # defaults to auto.<br>
     #Option "SpiceZlibGlzWanCompression" ""<br>
diff --git a/src/qxl.h b/src/qxl.h<br>
index f46bc58..14449b8 100644<br>
--- a/src/qxl.h<br>
+++ b/src/qxl.h<br>
@@ -158,6 +158,7 @@ enum {<br>
     OPTION_SURFACE_BUFFER_SIZE,<br>
     OPTION_COMMAND_BUFFER_SIZE,<br>
     OPTION_SPICE_SMARTCARD_FILE,<br>
+    OPTION_SPICE_VIDEO_CODECS,<br>
 #endif<br>
     OPTION_COUNT,<br>
 };<br>
diff --git a/src/qxl_driver.c b/src/qxl_driver.c<br>
index 942067f..88b38db 100644<br>
--- a/src/qxl_driver.c<br>
+++ b/src/qxl_driver.c<br>
@@ -155,6 +155,8 @@ const OptionInfoRec DefaultOptions[] =<br>
       "CommandBufferSize",        OPTV_INTEGER,    {DEFAULT_COMMAND_BUFFER_SIZE}, FALSE},<br>
     { OPTION_SPICE_SMARTCARD_FILE,<br>
       "SpiceSmartcardFile",       OPTV_STRING,    {0}, FALSE},<br>
+    { OPTION_SPICE_VIDEO_CODECS,<br>
+      "SpiceVideoCodecs",         OPTV_STRING,    {0}, FALSE},<br>
 #endif<br>
<br>
     { -1, NULL, OPTV_NONE, {0}, FALSE }<br>
diff --git a/src/spiceqxl_spice_server.c b/src/spiceqxl_spice_server.c<br>
index 14ee752..d74b29d 100644<br>
--- a/src/spiceqxl_spice_server.c<br>
+++ b/src/spiceqxl_spice_server.c<br>
@@ -173,6 +173,9 @@ void xspice_set_spice_server_options(OptionInfoPtr options)<br>
     const char *streaming_video =<br>
         get_str_option(options, OPTION_SPICE_STREAMING_VIDEO,<br>
                        "XSPICE_STREAMING_VIDEO");<br>
+    const char *video_codecs =<br>
+        get_str_option(options, OPTION_SPICE_VIDEO_CODECS,<br>
+                       "XSPICE_VIDEO_CODECS");<br>
     int agent_mouse =<br>
         get_bool_option(options, OPTION_SPICE_AGENT_MOUSE,<br>
                         "XSPICE_AGENT_MOUSE");<br>
@@ -295,6 +298,19 @@ void xspice_set_spice_server_options(OptionInfoPtr options)<br>
         spice_server_set_streaming_video(spice_server, streaming_video_opt);<br>
     }<br>
<br>
+    if (video_codecs) {<br>
+#if SPICE_SERVER_VERSION >= 0x000c06 /* 0.12.6 */<br>
+        if (spice_server_set_video_codecs(spice_server, video_codecs))<br>
+        {<br>
+            fprintf(stderr, "spice: invalid video encoder %s\n", video_codecs);<br>
+            exit(1);<br>
+        }<br>
+#else<br>
+        fprintf(stderr, "spice: video_codecs are not available (spice >= 0.12.6 required)\n");<br>
+        exit(1);<br>
+#endif<br>
+    }<br>
+<br>
     spice_server_set_agent_mouse<br>
         (spice_server, agent_mouse);<br>
     spice_server_set_playback_compression<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.1.4<br>
_______________________________________________<br>
Spice-devel mailing list<br>
<a href="mailto:Spice-devel@lists.freedesktop.org">Spice-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/spice-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/spice-devel</a><br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">Marc-André Lureau</div>
</div>