<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 13, 2015 at 10:30 PM, Jeremy White <span dir="ltr"><<a href="mailto:jwhite@codeweavers.com" target="_blank">jwhite@codeweavers.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Signed-off-by: Jeremy White <<a href="mailto:jwhite@codeweavers.com">jwhite@codeweavers.com</a>><br>
---<br>
 qemu-options.hx |  8 ++++++++<br>
 ui/spice-core.c | 17 +++++++++++++++++<br>
 2 files changed, 25 insertions(+)<br>
<br>
diff --git a/qemu-options.hx b/qemu-options.hx<br>
index ec356f6..acd78a7 100644<br>
--- a/qemu-options.hx<br>
+++ b/qemu-options.hx<br>
@@ -984,6 +984,7 @@ DEF("spice", HAS_ARG, QEMU_OPTION_spice,<br>
     "       [,jpeg-wan-compression=[auto|never|always]]\n"<br>
     "       [,zlib-glz-wan-compression=[auto|never|always]]\n"<br>
     "       [,streaming-video=[off|all|filter]][,disable-copy-paste]\n"<br>
+    "       [,video-codecs=<encoder1>:<codec1>[;<encoder2>:<codec2>]]\n",<br>
     "       [,disable-agent-file-xfer][,agent-mouse=[on|off]]\n"<br>
     "       [,playback-compression=[on|off]][,seamless-migration=[on|off]]\n"<br>
     "   enable spice\n"<br>
@@ -1068,6 +1069,13 @@ Default is auto.<br>
 @item streaming-video=[off|all|filter]<br>
 Configure video stream detection.  Default is filter.<br>
<br>
+@item video-codecs=encoder:codec[;encoder2:codec2]<br>
+Configure what video codecs to use.  It is a semi colon separated<br>
+list of encoder/codec pairs to try, in preference order.<br>
+An encoder tyep of 'spice' selects built in codecs.  An encoder<br>
+of 'gstreamer' indicates gstreamer.  The codec is the type<br>
+of encoder; e.g. mjpeg, vp8, etc.  Default is spice:mjpeg.<br></blockquote><div><br></div><div>How do you specify "any"? (this would be useful to avoid changing qemu configuration for various setups)<br> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+<br>
 @item agent-mouse=[on|off]<br>
 Enable/disable passing mouse events via vdagent.  Default is on.<br>
<br>
diff --git a/ui/spice-core.c b/ui/spice-core.c<br>
index f00e074..06e40e3 100644<br>
--- a/ui/spice-core.c<br>
+++ b/ui/spice-core.c<br>
@@ -484,6 +484,9 @@ static QemuOptsList qemu_spice_opts = {<br>
             .name = "streaming-video",<br>
             .type = QEMU_OPT_STRING,<br>
         },{<br>
+            .name = "video-codecs",<br>
+            .type = QEMU_OPT_STRING,<br>
+        },{<br>
             .name = "agent-mouse",<br>
             .type = QEMU_OPT_BOOL,<br>
         },{<br>
@@ -777,6 +780,20 @@ void qemu_spice_init(void)<br>
         spice_server_set_streaming_video(spice_server, SPICE_STREAM_VIDEO_OFF);<br>
     }<br>
<br>
+    str = qemu_opt_get(opts, "video-codecs");<br>
+    if (str) {<br>
+#if SPICE_SERVER_VERSION >= 0x000c06<br>
+        if (spice_server_set_video_codecs(spice_server, str)) {<br>
+            error_report("Invalid video codecs.");<br>
+            exit(1);<br>
+        }<br>
+#else<br>
+        error_report("this qemu build does not support the "<br>
+                     "\"video-codecs\" option");<br>
+        exit(1);<br>
+#endif<br>
+    }<br>
+<br>
     spice_server_set_agent_mouse<br>
         (spice_server, qemu_opt_get_bool(opts, "agent-mouse", 1));<br>
     spice_server_set_playback_compression<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.1.4<br>
<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></div>