Hi,

One small nitpick, otherwise it looks good.

On 01/22/2012 09:12 AM, Yonit Halperin wrote:
This options will help us tune and find the optimal values.
---
  gtk/spice-option.c |   10 ++++++++++
  1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/gtk/spice-option.c b/gtk/spice-option.c
index 394a07d..d466f94 100644
--- a/gtk/spice-option.c
+++ b/gtk/spice-option.c
@@ -36,6 +36,8 @@ static char *usbredir_filter = NULL;
  static gboolean smartcard = FALSE;
  static gboolean disable_audio = FALSE;
  static gboolean disable_usbredir = FALSE;
+static gint cache_size = 0;
+static gint glz_window_size = 0;

  static void option_version(void)
  {
@@ -84,6 +86,10 @@ GOptionGroup* spice_get_option_group(void)
            N_("Enable Spice-GTK debugging"), NULL },
          { "spice-gtk-version", '\0', G_OPTION_FLAG_NO_ARG, 
G_OPTION_ARG_CALLBACK, option_version,
            N_("Display Spice-GTK version information"), NULL },
+        { "spice-cache-size", '\0', 0, G_OPTION_ARG_INT,&cache_size,
+          N_("Image cache size"), N_("<bytes>") },
+        { "spice-glz-window-size", '\0', 0, G_OPTION_ARG_INT,&glz_window_size,
+          N_("Glz compression history size"), N_("<bytes>") },
          { NULL, 0, 0, G_OPTION_ARG_NONE, NULL, NULL, NULL }
      };
      GOptionGroup *grp;

Please put these 2 options above the spice-debug option, the spice-debug and
spice-gtk-version options are meant to be the 2 last options.



@@ -146,4 +152,8 @@ void spice_set_session_option(SpiceSession *session)
          g_object_set(session, "enable-usbredir", FALSE, NULL);
      if (disable_audio)
          g_object_set(session, "enable-audio", FALSE, NULL);
+    if (cache_size)
+        g_object_set(session, "cache-size", cache_size, NULL);
+    if (glz_window_size)
+        g_object_set(session, "glz_window_size", glz_window_size, NULL);
  }


Regards,

Hans
_______________________________________________
Spice-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/spice-devel

Reply via email to