[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] libxl: Spice streaming video setting support for upstream qemu



Usage:
spice_streaming_video=[filter|all|off]

Specifies what streaming video setting is to be used by spice (if given),
otherwise the qemu default will be used.

Signed-off-by: Fabio Fantoni <fabio.fantoni@xxxxxxx>
---
 docs/man/xl.cfg.pod.5       |    5 +++++
 tools/libxl/libxl.h         |   11 +++++++++++
 tools/libxl/libxl_dm.c      |    3 +++
 tools/libxl/libxl_types.idl |    1 +
 tools/libxl/xl_cmdimpl.c    |    2 ++
 5 files changed, 22 insertions(+)

diff --git a/docs/man/xl.cfg.pod.5 b/docs/man/xl.cfg.pod.5
index a12fbe4..f71ee6f 100644
--- a/docs/man/xl.cfg.pod.5
+++ b/docs/man/xl.cfg.pod.5
@@ -1394,6 +1394,11 @@ This feature is actually supported only by hvm domUs.
 Specifies what image compression is to be used by spice (if given), otherwise
 the qemu default will be used.
 
+=item B<spice_streaming_video=[filter|all|off]>
+
+Specifies what streaming video setting is to be used by spice (if given),
+otherwise the qemu default will be used.
+
 =back
 
 =head2 Keymaps
diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h
index ba64c3f..906200b 100644
--- a/tools/libxl/libxl.h
+++ b/tools/libxl/libxl.h
@@ -418,6 +418,17 @@
 #define LIBXL_HAVE_SPICE_IMAGECOMPRESSION 1
 
 /*
+ * LIBXL_HAVE_SPICE_STREAMINGVIDEO
+ *
+ * If defined, then the libxl_spice_info structure will contain a string type
+ * field: streaming_video. This value defines what Spice streaming video 
setting
+ * is used.
+ *
+ * If this is not defined, the Spice streaming video setting support is 
ignored.
+ */
+#define LIBXL_HAVE_SPICE_STREAMINGVIDEO 1
+
+/*
  * LIBXL_HAVE_DOMAIN_CREATE_RESTORE_PARAMS 1
  *
  * If this is defined, libxl_domain_create_restore()'s API has changed to
diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
index 12d1a32..ac60311 100644
--- a/tools/libxl/libxl_dm.c
+++ b/tools/libxl/libxl_dm.c
@@ -380,6 +380,9 @@ static char *dm_spice_options(libxl__gc *gc,
     if (spice->image_compression)
         opt = libxl__sprintf(gc, "%s,image-compression=%s", opt, 
spice->image_compression);
 
+    if (spice->image_compression)
+        opt = libxl__sprintf(gc, "%s,streaming-video=%s", opt, 
spice->streaming_video);
+
     return opt;
 }
 
diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl
index 3a48b2b..599b0b9 100644
--- a/tools/libxl/libxl_types.idl
+++ b/tools/libxl/libxl_types.idl
@@ -204,6 +204,7 @@ libxl_spice_info = Struct("spice_info", [
     ("clipboard_sharing", libxl_defbool),
     ("usbredirection", integer),
     ("image_compression", string),
+    ("streaming_video", string),
     ])
 
 libxl_sdl_info = Struct("sdl_info", [
diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
index 343fd47..c55812f 100644
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -1697,6 +1697,8 @@ skip_vfb:
         b_info->spice.usbredirection = l;
     xlu_cfg_replace_string (config, "spice_image_compression",
                             &b_info->spice.image_compression, 0);
+    xlu_cfg_replace_string (config, "spice_streaming_video",
+                            &b_info->spice.streaming_video, 0);
 
     if (c_info->type == LIBXL_DOMAIN_TYPE_HVM) {
         if (!xlu_cfg_get_string (config, "vga", &buf, 0)) {
-- 
1.7.9.5


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.