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