[Spice-devel] volume can't be set
Hi all! I connected Spice server by windows spice client which is complied by mingw32, and set the volume. But the volume didn't change. the code form: https://gitorious.org/spice-gtk/spice-gtk-elmarco/source/f270119352604755a13fcc87783127c3d96c4f61:gtk/spice-gstaudio.c create pipe code: if (pipeline == NULL) pipeline = g_strdup_printf(appsrc is-live=1 do-timestamp=0 caps=\%s\ name=\appsrc\ ! queue ! audioconvert ! audioresample ! autoaudiosink name=\audiosink\, audio_caps); SPICE_DEBUG(audio pipeline: %s, pipeline); p-playback.pipe = gst_parse_launch(pipeline, error); if (p-playback.pipe == NULL) { g_warning(Failed to create pipeline: %s, error-message); goto lerr; } p-playback.src = gst_bin_get_by_name(GST_BIN(p-playback.pipe), appsrc); p-playback.sink = gst_bin_get_by_name(GST_BIN(p-playback.pipe), audiosink); set volume code: GstElement *e; if (GST_IS_BIN(p-playback.sink)) e = gst_bin_get_by_interface(GST_BIN(p-playback.sink), GST_TYPE_STREAM_VOLUME); else e = g_object_ref(p-playback.sink); I have debuged the code. when the volume was set, the e returned NULL. Is it a bug? Thanks! ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel
Re: [Spice-devel] [PATCH spice-gtk] RFC: populate all clipboards
Hey, On Thu, Feb 20, 2014 at 04:15:51PM +0100, Marc-André Lureau wrote: Some users want all the clipboards to be populated when doing copy. I wonder if there isn't a better solution than to have this hack in spice-gtk, in particular, if a small X daemon/tools could do that automatically? That would be a cleaner and more future-proof approach imho. Nevertheless, this is a proof of concept, when setting SPICE_CLIPBOARD_FILL_ALL=1, all implemented clipboards will be populated by spice-gtk. Has this been requested when using linux clients with linux guests? If it's only useful for Windows clients/linux guests, shouldn't we set both selection and clipboard in the linux guest when filling the windows clipboard, and just keep the regular behaviour in all other cases? Christophe pgpQDdvnaI1WU.pgp Description: PGP signature ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel
Re: [Spice-devel] [PATCH spice-gtk] pulse: sync volume and mute upon stream creation
On Thu, Feb 20, 2014 at 05:39:48PM +0100, Marc-André Lureau wrote: Whenever a stream is created, it should have current guest volume. Otherwise, a 100% volume guest will have current client volume, and when changing guest volume slightly, the volume will jump abruptly. https://bugzilla.redhat.com/show_bug.cgi?id=1012868#c10 --- gtk/spice-pulse.c | 253 +- 1 file changed, 155 insertions(+), 98 deletions(-) The actual bug fix is mixed with all the code movement/refactoring, can you split this in 2 patches, one introducing the new methods you need and making use of them in existing code, and the 2nd patch fixing the bug? Thanks, Christophe pgpMRfx0df5Nx.pgp Description: PGP signature ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel
[Spice-devel] [vdagent-linux] Fix gdm autostart path
gdm 3.1.90 (June 2011) changed the path where .desktop files which should be autostarted with gdm needs to be located. This used to be $(datadir)/gdm/autostart/LoginWindow and is now $(datadir)/gdm/greeter/autostart. This means that when running gdm in a VM in a recent distribution, arbitrary resizing the VM window will not cause the resolution to be adjusted. This used to be working in eg RHEL6. This patch installs the .desktop file to both paths in order to work both with older and newer gdms. --- Makefile.am | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 74cc313..7fae742 100644 --- a/Makefile.am +++ b/Makefile.am @@ -42,9 +42,12 @@ noinst_HEADERS = src/glib-compat.h \ xdgautostartdir = $(sysconfdir)/xdg/autostart xdgautostart_DATA = $(top_srcdir)/data/spice-vdagent.desktop -gdmautostartdir = $(datadir)/gdm/autostart/LoginWindow +gdmautostartdir = $(datadir)/gdm/greeter/autostart gdmautostart_DATA = $(top_srcdir)/data/spice-vdagent.desktop +gdmautostart2dir = $(datadir)/gdm/autostart/LoginWindow +gdmautostart2_DATA = $(top_srcdir)/data/spice-vdagent.desktop + install-data-local: $(mkdir_p) $(DESTDIR)$(localstatedir)/run/spice-vdagentd -- 1.8.5.3 ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel
Re: [Spice-devel] [PATCH linux vdagent] Don't abort if XRRSetCrtcConfig fails
On Thu, Dec 19, 2013 at 02:32:30PM -0500, Jonathon Jongsma wrote: No, the cause is not identified yet. Still debugging that. This patch just makes the vdagent more robust in the meantime. With http://cgit.freedesktop.org/spice/linux/vd_agent/commit/?id=9ae51f3702b1fc0d2747e44474c87a818d1e8ec3 fixing the root cause of the crash, I've now pushed this patch as well. Christophe pgpl27QMWD5TL.pgp Description: PGP signature ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel
Re: [Spice-devel] [PATCH] randr: set physical screen size to keep a constant 96 dpi
[git config format.subjectprefix vdagent-linux in your vdagent local clone would be nice] On Fri, Feb 21, 2014 at 04:17:06PM +0100, Marc-André Lureau wrote: Some applications compute DPI based on physcial screen size. Currently, the width is reported to be 270mm, regardless of the resolution. This patch instead compute a physical screen size to have a constant DPI of 96. Of course, there are possible improvements to this approach (see fixme), however, since that code is no longer executed with DRM driver, This depends on having DRM driver running on the guest and a QEMU which knows about client_monitors_config. I don't think we should invest more effort here (I guess DRM driver relied on xrandr / gnome-settings-daemon to do the right thing, so relied or relies ? The latter I assume? physical screen is updated) https://bugzilla.redhat.com/show_bug.cgi?id=1066094 --- src/vdagent-x11-randr.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/vdagent-x11-randr.c b/src/vdagent-x11-randr.c index 5223f88..9bde7b9 100644 --- a/src/vdagent-x11-randr.c +++ b/src/vdagent-x11-randr.c @@ -767,13 +767,16 @@ void vdagent_x11_set_monitor_config(struct vdagent_x11 *x11, } if (primary_w != x11-width[0] || primary_h != x11-height[0]) { +const int dpi = 96; /* FIXME: read settings from desktop or get from client dpi? */ Iirc xorg hardcodes this to 96 as this is hard to get an accurate/correct value for this. +int fb_width_mm = (25.4 * primary_w) / dpi; +int fb_height_mm = (25.4 * primary_h) / dpi; Maybe add a 1 inch = 25.4mm comment/a MM_PER_INCHES constant to make this look less magical? Looks good, ACK. Christophe pgphEELvYFtsO.pgp Description: PGP signature ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel
Re: [Spice-devel] [vdagent-linux] Fix gdm autostart path
- Original Message - gdm 3.1.90 (June 2011) changed the path where .desktop files which should be autostarted with gdm needs to be located. This used to be $(datadir)/gdm/autostart/LoginWindow and is now $(datadir)/gdm/greeter/autostart. ah! :) This means that when running gdm in a VM in a recent distribution, arbitrary resizing the VM window will not cause the resolution to be adjusted. This used to be working in eg RHEL6. This patch installs the .desktop file to both paths in order to work both with older and newer gdms. ack --- Makefile.am | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 74cc313..7fae742 100644 --- a/Makefile.am +++ b/Makefile.am @@ -42,9 +42,12 @@ noinst_HEADERS = src/glib-compat.h \ xdgautostartdir = $(sysconfdir)/xdg/autostart xdgautostart_DATA = $(top_srcdir)/data/spice-vdagent.desktop -gdmautostartdir = $(datadir)/gdm/autostart/LoginWindow +gdmautostartdir = $(datadir)/gdm/greeter/autostart gdmautostart_DATA = $(top_srcdir)/data/spice-vdagent.desktop +gdmautostart2dir = $(datadir)/gdm/autostart/LoginWindow +gdmautostart2_DATA = $(top_srcdir)/data/spice-vdagent.desktop + install-data-local: $(mkdir_p) $(DESTDIR)$(localstatedir)/run/spice-vdagentd -- 1.8.5.3 ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel
Re: [Spice-devel] [PATCH spice-gtk] RFC: populate all clipboards
- Original Message - Hey, On Thu, Feb 20, 2014 at 04:15:51PM +0100, Marc-André Lureau wrote: Some users want all the clipboards to be populated when doing copy. I wonder if there isn't a better solution than to have this hack in spice-gtk, in particular, if a small X daemon/tools could do that automatically? That would be a cleaner and more future-proof approach imho. Nevertheless, this is a proof of concept, when setting SPICE_CLIPBOARD_FILL_ALL=1, all implemented clipboards will be populated by spice-gtk. Has this been requested when using linux clients with linux guests? If it's only useful for Windows clients/linux guests, shouldn't we set both selection and clipboard in the linux guest when filling the windows clipboard, and just keep the regular behaviour in all other cases? The proposal is to implement SPICE_CLIPBOARD_FILL_ALL=1 that will sync all clipboards: keep it simple. I don't fancy more having special cases OS / direction. But tbh, I think this would be better solved by a clipboard manager on Linux/X. Any idea how to do that? ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel
Re: [Spice-devel] [vdagent-linux] Fix gdm autostart path
On Mon, Feb 24, 2014 at 06:26:45AM -0500, Marc-André Lureau wrote: - Original Message - gdm 3.1.90 (June 2011) changed the path where .desktop files which should be autostarted with gdm needs to be located. This used to be $(datadir)/gdm/autostart/LoginWindow and is now $(datadir)/gdm/greeter/autostart. ah! :) This means that when running gdm in a VM in a recent distribution, arbitrary resizing the VM window will not cause the resolution to be adjusted. This used to be working in eg RHEL6. This patch installs the .desktop file to both paths in order to work both with older and newer gdms. ack Oh, forgot to mention in the log that while vdagent is now running in gdm with this patch, arbitrary resizing is still not working (nothing happens when resizing the window). This is still probably a step in the right direction ;) Christophe pgp6dOzZAGBhT.pgp Description: PGP signature ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel
Re: [Spice-devel] volume can't be set
- Original Message - Hi all! I connected Spice server by windows spice client which is complied by mingw32, and set the volume. But the volume didn't change. the code form: https://gitorious.org/spice-gtk/spice-gtk-elmarco/source/f270119352604755a13fcc87783127c3d96c4f61:gtk/spice-gstaudio.c create pipe code: if (pipeline == NULL) pipeline = g_strdup_printf(appsrc is-live=1 do-timestamp=0 caps=\%s\ name=\appsrc\ ! queue ! audioconvert ! audioresample ! autoaudiosink name=\audiosink\, audio_caps); SPICE_DEBUG(audio pipeline: %s, pipeline); p-playback.pipe = gst_parse_launch(pipeline, error); if (p-playback.pipe == NULL) { g_warning(Failed to create pipeline: %s, error-message); goto lerr; } p-playback.src = gst_bin_get_by_name(GST_BIN(p-playback.pipe), appsrc); p-playback.sink = gst_bin_get_by_name(GST_BIN(p-playback.pipe), audiosink); set volume code: GstElement *e; if (GST_IS_BIN(p-playback.sink)) e = gst_bin_get_by_interface(GST_BIN(p-playback.sink), GST_TYPE_STREAM_VOLUME); else e = g_object_ref(p-playback.sink); I have debuged the code. when the volume was set, the e returned NULL. Is it a bug? If you don't have a sink, it means you are missing gstreamer plugins. On Windows, you need the directsoundsink element (from gst-plugins-good). It implements the volume property. cheers ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel
[Spice-devel] [PATCH spice-gtk] Add a SPICE_GTK_CHECK_VERSION macro
--- configure.ac | 10 ++ doc/reference/spice-gtk-sections.txt | 4 +++ gtk/Makefile.am | 4 +++ gtk/spice-client.h | 1 + gtk/spice-version.h.in | 70 5 files changed, 89 insertions(+) create mode 100644 gtk/spice-version.h.in diff --git a/configure.ac b/configure.ac index 6e4b29a..192d748 100644 --- a/configure.ac +++ b/configure.ac @@ -75,6 +75,15 @@ AC_CONFIG_SUBDIRS([spice-common]) COMMON_CFLAGS='-I ${top_srcdir}/spice-common/ -I ${top_srcdir}/spice-common/spice-protocol/' AC_SUBST(COMMON_CFLAGS) +SPICE_GTK_MAJOR_VERSION=`echo $PACKAGE_VERSION | cut -d. -f1` +SPICE_GTK_MINOR_VERSION=`echo $PACKAGE_VERSION | cut -d. -f2` +SPICE_GTK_MICRO_VERSION=`echo $PACKAGE_VERSION | cut -d. -f3 | cut -d- -f1` +[ x$SPICE_GTK_MICRO_VERSION = x ] SPICE_GTK_MICRO_VERSION = 0 + +AC_SUBST(SPICE_GTK_MAJOR_VERSION) +AC_SUBST(SPICE_GTK_MINOR_VERSION) +AC_SUBST(SPICE_GTK_MICRO_VERSION) + dnl = dnl Chek optional features @@ -709,6 +718,7 @@ data/spicy.desktop.in data/spicy.nsis po/Makefile.in gtk/Makefile +gtk/spice-version.h gtk/controller/Makefile doc/Makefile doc/reference/Makefile diff --git a/doc/reference/spice-gtk-sections.txt b/doc/reference/spice-gtk-sections.txt index 08b1b4e..9232a23 100644 --- a/doc/reference/spice-gtk-sections.txt +++ b/doc/reference/spice-gtk-sections.txt @@ -402,6 +402,10 @@ SpiceGtkBoxClass FILEspice-util/FILE spice_util_set_debug spice_util_get_version_string +SPICE_GTK_CHECK_VERSION +SPICE_GTK_MAJOR_VERSION +SPICE_GTK_MICRO_VERSION +SPICE_GTK_MINOR_VERSION SUBSECTION Private SPICE_DEBUG spice_util_get_debug diff --git a/gtk/Makefile.am b/gtk/Makefile.am index 61ed88e..8a16120 100644 --- a/gtk/Makefile.am +++ b/gtk/Makefile.am @@ -41,8 +41,11 @@ EXTRA_DIST = \ spice-client-gtk-manual.defs\ spice-client-gtk.override \ spice-marshal.txt \ + spice-version.h.in \ $(NULL) +DISTCLEANFILES = spice-version.h + bin_PROGRAMS = spicy spicy-stats spicy-screenshot if WITH_POLKIT acldir = $(ACL_HELPER_DIR) @@ -290,6 +293,7 @@ libspice_client_glibinclude_HEADERS = \ spice-channel.h \ spice-util.h\ spice-option.h \ + spice-version.h \ channel-cursor.h\ channel-display.h \ channel-inputs.h\ diff --git a/gtk/spice-client.h b/gtk/spice-client.h index 975259a..98aaffe 100644 --- a/gtk/spice-client.h +++ b/gtk/spice-client.h @@ -32,6 +32,7 @@ #include spice-channel.h #include spice-option.h #include spice-uri.h +#include spice-version.h #include channel-main.h #include channel-display.h diff --git a/gtk/spice-version.h.in b/gtk/spice-version.h.in new file mode 100644 index 000..8856914 --- /dev/null +++ b/gtk/spice-version.h.in @@ -0,0 +1,70 @@ +/* -*- Mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ +/* + Copyright (C) 2014 Red Hat, Inc. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, see http://www.gnu.org/licenses/. +*/ +#ifndef __SPICE_VERSION_H__ +#define __SPICE_VERSION_H__ + +/** + * SECTION:spice-version + * @short_description: Spice-Gtk version checking + * + * Spice-Gtk provides macros to check the version of the library + * at compile-time + */ + +/** + * SPICE_GTK_MAJOR_VERSION: + * + * Spice-Gtk major version component (e.g. 1 if version is 1.2.3) + * Since: 0.24 + */ +#define SPICE_GTK_MAJOR_VERSION (@SPICE_GTK_MAJOR_VERSION@) + +/** + * SPICE_GTK_MINOR_VERSION: + * + * Spice-Gtk minor version component (e.g. 2 if version is 1.2.3) + * Since: 0.24 + */ +#define SPICE_GTK_MINOR_VERSION (@SPICE_GTK_MINOR_VERSION@) + +/** + * SPICE_GTK_MICRO_VERSION: + * + * Spice-Gtk micro version component (e.g. 3 if version is 1.2.3) + * Since: 0.24 + */ +#define SPICE_GTK_MICRO_VERSION (@SPICE_GTK_MICRO_VERSION@) + +/** + * SPICE_GTK_CHECK_VERSION: + * @major: required major version + * @minor: required minor version + * @micro: required micro version + * + * Compile-time version checking. Evaluates to %TRUE if the version + * of Spice-Gtk is greater than
Re: [Spice-devel] [PATCH spice-gtk] Add a SPICE_GTK_CHECK_VERSION macro
On Mon, Feb 24, 2014 at 03:03:56PM +0100, Marc-André Lureau wrote: --- configure.ac | 10 ++ doc/reference/spice-gtk-sections.txt | 4 +++ gtk/Makefile.am | 4 +++ gtk/spice-client.h | 1 + gtk/spice-version.h.in | 70 5 files changed, 89 insertions(+) create mode 100644 gtk/spice-version.h.in diff --git a/configure.ac b/configure.ac index 6e4b29a..192d748 100644 --- a/configure.ac +++ b/configure.ac @@ -75,6 +75,15 @@ AC_CONFIG_SUBDIRS([spice-common]) COMMON_CFLAGS='-I ${top_srcdir}/spice-common/ -I ${top_srcdir}/spice-common/spice-protocol/' AC_SUBST(COMMON_CFLAGS) +SPICE_GTK_MAJOR_VERSION=`echo $PACKAGE_VERSION | cut -d. -f1` +SPICE_GTK_MINOR_VERSION=`echo $PACKAGE_VERSION | cut -d. -f2` +SPICE_GTK_MICRO_VERSION=`echo $PACKAGE_VERSION | cut -d. -f3 | cut -d- -f1` +[ x$SPICE_GTK_MICRO_VERSION = x ] SPICE_GTK_MICRO_VERSION = 0 + +AC_SUBST(SPICE_GTK_MAJOR_VERSION) +AC_SUBST(SPICE_GTK_MINOR_VERSION) +AC_SUBST(SPICE_GTK_MICRO_VERSION) + dnl = dnl Chek optional features @@ -709,6 +718,7 @@ data/spicy.desktop.in data/spicy.nsis po/Makefile.in gtk/Makefile +gtk/spice-version.h gtk/controller/Makefile doc/Makefile doc/reference/Makefile diff --git a/doc/reference/spice-gtk-sections.txt b/doc/reference/spice-gtk-sections.txt index 08b1b4e..9232a23 100644 --- a/doc/reference/spice-gtk-sections.txt +++ b/doc/reference/spice-gtk-sections.txt @@ -402,6 +402,10 @@ SpiceGtkBoxClass FILEspice-util/FILE spice_util_set_debug spice_util_get_version_string +SPICE_GTK_CHECK_VERSION +SPICE_GTK_MAJOR_VERSION +SPICE_GTK_MICRO_VERSION +SPICE_GTK_MINOR_VERSION SUBSECTION Private SPICE_DEBUG spice_util_get_debug diff --git a/gtk/Makefile.am b/gtk/Makefile.am index 61ed88e..8a16120 100644 --- a/gtk/Makefile.am +++ b/gtk/Makefile.am @@ -41,8 +41,11 @@ EXTRA_DIST = \ spice-client-gtk-manual.defs\ spice-client-gtk.override \ spice-marshal.txt \ + spice-version.h.in \ $(NULL) +DISTCLEANFILES = spice-version.h + bin_PROGRAMS = spicy spicy-stats spicy-screenshot if WITH_POLKIT acldir = $(ACL_HELPER_DIR) @@ -290,6 +293,7 @@ libspice_client_glibinclude_HEADERS = \ spice-channel.h \ spice-util.h\ spice-option.h \ + spice-version.h \ channel-cursor.h\ channel-display.h \ channel-inputs.h\ diff --git a/gtk/spice-client.h b/gtk/spice-client.h index 975259a..98aaffe 100644 --- a/gtk/spice-client.h +++ b/gtk/spice-client.h @@ -32,6 +32,7 @@ #include spice-channel.h #include spice-option.h #include spice-uri.h +#include spice-version.h #include channel-main.h #include channel-display.h diff --git a/gtk/spice-version.h.in b/gtk/spice-version.h.in new file mode 100644 index 000..8856914 --- /dev/null +++ b/gtk/spice-version.h.in @@ -0,0 +1,70 @@ +/* -*- Mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ +/* + Copyright (C) 2014 Red Hat, Inc. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, see http://www.gnu.org/licenses/. +*/ +#ifndef __SPICE_VERSION_H__ +#define __SPICE_VERSION_H__ + +/** + * SECTION:spice-version + * @short_description: Spice-Gtk version checking + * + * Spice-Gtk provides macros to check the version of the library + * at compile-time + */ + +/** + * SPICE_GTK_MAJOR_VERSION: + * + * Spice-Gtk major version component (e.g. 1 if version is 1.2.3) + * Since: 0.24 + */ +#define SPICE_GTK_MAJOR_VERSION (@SPICE_GTK_MAJOR_VERSION@) + +/** + * SPICE_GTK_MINOR_VERSION: + * + * Spice-Gtk minor version component (e.g. 2 if version is 1.2.3) + * Since: 0.24 + */ +#define SPICE_GTK_MINOR_VERSION (@SPICE_GTK_MINOR_VERSION@) + +/** + * SPICE_GTK_MICRO_VERSION: + * + * Spice-Gtk micro version component (e.g. 3 if version is 1.2.3) + * Since: 0.24 + */ +#define SPICE_GTK_MICRO_VERSION (@SPICE_GTK_MICRO_VERSION@) + +/** + * SPICE_GTK_CHECK_VERSION: + *
Re: [Spice-devel] Building Spice in an IDE
On 02/01/2014 12:54 AM, Wade Johnson wrote: Hi, I am trying to build Spice in Eclipse and make a test environment, but I am having some issues mostly with some dependencies not being resolved, and some constant definitions not being found. Are there any pointers or build guides to getting Spice set up in Eclipse that you guys have? I haven't tried doing that. If you are building spice-server you need to do git submodule init; git submodule update and you need to install some dependencies - pixman mainly, opus. In summary, if you post a specific error message it would help. The wiki has the development instructions here: http://www.spice-space.org/page/Building_Instructions (pointed to from main page via http://www.spice-space.org/page/DeveloperStartPage) Thanks, Wade Johnson ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel
Re: [Spice-devel] when will commit for proxy support be released as rpm?
Hey, On Tue, Jan 21, 2014 at 07:10:49AM -0500, Marc-André Lureau wrote: - Original Message - WRT to this commit: http://cgit.freedesktop.org/spice/spice-xpi/commit/?id=e518db3700ed23d3ccc7026b922b236158e501cc When might that be available in a downstream RPM or downloadable XPI? I It should be available since rhel 6.5, version spice-xpi-2.7-24.el6 And the needed support is also in the upstream 2.8.90 release. Christophe pgpoD3xpDIV7x.pgp Description: PGP signature ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel
[Spice-devel] [PATCH] migration: Don't assert() if MIGRATE_DATA comes before attaching the agent
During seamless migration, after switching host, if a client was connected during the migration, it will have data to send back to the new qemu/spice-server instance. This is handled through MIGRATE_DATA messages. SPICE char devices use such MIGRATE_DATA messages to restore their state. However, the MIGRATE_DATA message can arrive any time after the new qemu instance has started, this can happen before or after the SPICE char devices have been created. In order to handle this, if the migrate data arrives early, it's stored in reds-agent_state.mig_data, and attach_to_red_agent() will restore the agent state as appropriate. Unfortunately this does not work as expected as expected. If attach_to_red_agent() is called before the MIGRATE_DATA message reaches the server, all goes well, but if MIGRATE_DATA reaches the server before attach_to_red_agent() gets called, then some assert() get triggered in spice_char_device_state_restore(): ((null):32507): Spice-ERROR **: char_device.c:937:spice_char_device_state_restore: assertion `dev-num_clients == 1 dev-wait_for_migrate_data' failed Thread 3 (Thread 0x7f406b543700 (LWP 32543)): Thread 2 (Thread 0x7f40697ff700 (LWP 32586)): Thread 1 (Thread 0x7f4079b45a40 (LWP 32507)): What happens is that dev-wait_for_migrate_data is unconditionally cleared when completing handling of the MIGRATE_DATA message, so it's FALSE when spice_char_device_state_restore() is called. Moreover, dev-num_clients is also 0 as this is only increased by spice_char_device_start() which spice_server_char_device_add_interface() calls after attach_to_red_agent()/spice_char_device_state_restore() have been called. This commit changes the logic in spice_server_char_device_add_interface(), and when there is migrate data pending in reds-agent_state.mig_data, we only attempt to restore it after successfully initializing/starting the needed char device. This fixes https://bugzilla.redhat.com/show_bug.cgi?id=1035184 --- server/reds.c | 26 +++--- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/server/reds.c b/server/reds.c index 1f02553..217c74e 100644 --- a/server/reds.c +++ b/server/reds.c @@ -2856,16 +2856,7 @@ static SpiceCharDeviceState *attach_to_red_agent(SpiceCharDeviceInstance *sin) state-read_filter.discard_all = FALSE; reds-agent_state.plug_generation++; -if (reds-agent_state.mig_data) { -spice_assert(reds-agent_state.plug_generation == 1); -reds_agent_state_restore(reds-agent_state.mig_data); -free(reds-agent_state.mig_data); -reds-agent_state.mig_data = NULL; -} else if (!red_channel_waits_for_migrate_data(reds-main_channel-base)) { -/* we will assoicate the client with the char device, upon reds_on_main_agent_start, - * in response to MSGC_AGENT_START */ -main_channel_push_agent_connected(reds-main_channel); -} else { +if (red_channel_waits_for_migrate_data(reds-main_channel-base) || reds-agent_state.mig_data) { spice_debug(waiting for migration data); if (!spice_char_device_client_exists(reds-agent_state.base, reds_get_client())) { int client_added; @@ -2882,9 +2873,13 @@ static SpiceCharDeviceState *attach_to_red_agent(SpiceCharDeviceInstance *sin) spice_warning(failed to add client to agent); reds_disconnect(); } - } +} else { +/* we will associate the client with the char device, upon reds_on_main_agent_start, + * in response to MSGC_AGENT_START */ +main_channel_push_agent_connected(reds-main_channel); } + return state-base; } @@ -2990,6 +2985,15 @@ static int spice_server_char_device_add_interface(SpiceServer *s, spice_warning(failed to create device state for %s, char_device-subtype); return -1; } + +if (strcmp(char_device-subtype, SUBTYPE_VDAGENT) == 0) { +if (reds-agent_state.mig_data) { + spice_assert(reds-agent_state.plug_generation == 1); + reds_agent_state_restore(reds-agent_state.mig_data); + free(reds-agent_state.mig_data); + reds-agent_state.mig_data = NULL; +} +} return 0; } -- 1.8.5.3 ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel
Re: [Spice-devel] [PATCH] migration: Don't assert() if MIGRATE_DATA comes before attaching the agent
On Mon, Feb 24, 2014 at 6:44 PM, Christophe Fergeau cferg...@redhat.com wrote: During seamless migration, after switching host, if a client was connected during the migration, it will have data to send back to the new qemu/spice-server instance. This is handled through MIGRATE_DATA messages. SPICE char devices use such MIGRATE_DATA messages to restore their state. However, the MIGRATE_DATA message can arrive any time after the new qemu instance has started, this can happen before or after the SPICE char devices have been created. In order to handle this, if the migrate data arrives early, it's stored in reds-agent_state.mig_data, and attach_to_red_agent() will restore the agent state as appropriate. Unfortunately this does not work as expected as expected. If attach_to_red_agent() is called before the MIGRATE_DATA message reaches the server, all goes well, but if MIGRATE_DATA reaches the server before attach_to_red_agent() gets called, then some assert() get triggered in spice_char_device_state_restore(): ((null):32507): Spice-ERROR **: char_device.c:937:spice_char_device_state_restore: assertion `dev-num_clients == 1 dev-wait_for_migrate_data' failed Thread 3 (Thread 0x7f406b543700 (LWP 32543)): Thread 2 (Thread 0x7f40697ff700 (LWP 32586)): Thread 1 (Thread 0x7f4079b45a40 (LWP 32507)): What happens is that dev-wait_for_migrate_data is unconditionally cleared when completing handling of the MIGRATE_DATA message, so it's FALSE when Isn't it going to be still FALSE after this patch? spice_char_device_state_restore() is called. Moreover, dev-num_clients is also 0 as this is only increased by spice_char_device_start() which spice_server_char_device_add_interface() calls after attach_to_red_agent()/spice_char_device_state_restore() have been called. I don't see how this could have changed either. This commit changes the logic in spice_server_char_device_add_interface(), and when there is migrate data pending in reds-agent_state.mig_data, we only attempt to restore it after successfully initializing/starting the needed char device. Sorry, I must be tired reading the server code, but I don't see how this could change the race you described above. I am surely missing something :) This fixes https://bugzilla.redhat.com/show_bug.cgi?id=1035184 --- server/reds.c | 26 +++--- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/server/reds.c b/server/reds.c index 1f02553..217c74e 100644 --- a/server/reds.c +++ b/server/reds.c @@ -2856,16 +2856,7 @@ static SpiceCharDeviceState *attach_to_red_agent(SpiceCharDeviceInstance *sin) state-read_filter.discard_all = FALSE; reds-agent_state.plug_generation++; -if (reds-agent_state.mig_data) { -spice_assert(reds-agent_state.plug_generation == 1); -reds_agent_state_restore(reds-agent_state.mig_data); -free(reds-agent_state.mig_data); -reds-agent_state.mig_data = NULL; -} else if (!red_channel_waits_for_migrate_data(reds-main_channel-base)) { -/* we will assoicate the client with the char device, upon reds_on_main_agent_start, - * in response to MSGC_AGENT_START */ -main_channel_push_agent_connected(reds-main_channel); -} else { +if (red_channel_waits_for_migrate_data(reds-main_channel-base) || reds-agent_state.mig_data) { spice_debug(waiting for migration data); if (!spice_char_device_client_exists(reds-agent_state.base, reds_get_client())) { int client_added; @@ -2882,9 +2873,13 @@ static SpiceCharDeviceState *attach_to_red_agent(SpiceCharDeviceInstance *sin) spice_warning(failed to add client to agent); reds_disconnect(); } - } +} else { +/* we will associate the client with the char device, upon reds_on_main_agent_start, + * in response to MSGC_AGENT_START */ +main_channel_push_agent_connected(reds-main_channel); } + return state-base; } @@ -2990,6 +2985,15 @@ static int spice_server_char_device_add_interface(SpiceServer *s, spice_warning(failed to create device state for %s, char_device-subtype); return -1; } + +if (strcmp(char_device-subtype, SUBTYPE_VDAGENT) == 0) { +if (reds-agent_state.mig_data) { + spice_assert(reds-agent_state.plug_generation == 1); + reds_agent_state_restore(reds-agent_state.mig_data); + free(reds-agent_state.mig_data); + reds-agent_state.mig_data = NULL; +} +} return 0; } -- 1.8.5.3 ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel -- Marc-André Lureau ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org
[Spice-devel] How to drag a folder from client to guest?
Probably the function of copying has three defects: i)For some languages,there is a mis-encoding of file name I have solved by myself...(under some circumstance) ii)Can't drag multi-files I'm glad to see the following in source code: /* At the moment, the copy() method is limited to a single file, support for copying multi-files will be implemented later. */ g_return_if_fail(sources[1] == NULL); iii)But, it doesn't support for drag folder Is there TODO I don't find? Or any ideas about solution? Thx in advance :) ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel
Re: [Spice-devel] How to drag a folder from client to guest?
Hi - Original Message - Probably the function of copying has three defects: i)For some languages,there is a mis-encoding of file name I have solved by myself...(under some circumstance) Yeah, I remember your patch, but you didn't follow up, right? Are you still working on this? ii)Can't drag multi-files I'm glad to see the following in source code: /* At the moment, the copy() method is limited to a single file, support for copying multi-files will be implemented later. */ g_return_if_fail(sources[1] == NULL); iii)But, it doesn't support for drag folder Is there TODO I don't find? Or any ideas about solution? Imho, dragging files/folder shouldn't be done via a Spice copy protocol. Instead, Spice should learn to implement drag and drop. Afaik this should be doable, but nobody worked on it. Otoh, you might be interested in the sharing folder functionality. It allows you to have a folder on the client mounted/visible directly in the guest. From there copy will work like a regular guest operation, with guest UI etc. This function is mostly ready, and I will submit a new patch this week (I'll add you in CC). ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel
Re: [Spice-devel] volume can't be set
Thanks for your respone! It's strange that client can play audio, but can't set volume. I have renamed the \lib\gstreamer-0.10\libgstdirectsoundsink.dll, the result is no audio can play. I have no idea what the problem is. May I verifiy the directsoundsink element have been included? Thanks! 2014-02-24 20:06 GMT+08:00 Marc-André Lureau mlur...@redhat.com: - Original Message - Hi all! I connected Spice server by windows spice client which is complied by mingw32, and set the volume. But the volume didn't change. the code form: https://gitorious.org/spice-gtk/spice-gtk-elmarco/source/f270119352604755a13fcc87783127c3d96c4f61:gtk/spice-gstaudio.c create pipe code: if (pipeline == NULL) pipeline = g_strdup_printf(appsrc is-live=1 do-timestamp=0 caps=\%s\ name=\appsrc\ ! queue ! audioconvert ! audioresample ! autoaudiosink name=\audiosink\, audio_caps); SPICE_DEBUG(audio pipeline: %s, pipeline); p-playback.pipe = gst_parse_launch(pipeline, error); if (p-playback.pipe == NULL) { g_warning(Failed to create pipeline: %s, error-message); goto lerr; } p-playback.src = gst_bin_get_by_name(GST_BIN(p-playback.pipe), appsrc); p-playback.sink = gst_bin_get_by_name(GST_BIN(p-playback.pipe), audiosink); set volume code: GstElement *e; if (GST_IS_BIN(p-playback.sink)) e = gst_bin_get_by_interface(GST_BIN(p-playback.sink), GST_TYPE_STREAM_VOLUME); else e = g_object_ref(p-playback.sink); I have debuged the code. when the volume was set, the e returned NULL. Is it a bug? If you don't have a sink, it means you are missing gstreamer plugins. On Windows, you need the directsoundsink element (from gst-plugins-good). It implements the volume property. cheers ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel
Re: [Spice-devel] How to drag a folder from client to guest?
On Tue, Feb 25, 2014 at 6:03 AM, Marc-André Lureau mlur...@redhat.com wrote: Hi - Original Message - Probably the function of copying has three defects: i)For some languages,there is a mis-encoding of file name I have solved by myself...(under some circumstance) Yeah, I remember your patch, but you didn't follow up, right? Are you still working on this? Aha:) I have followed your advices, but the effect is the same with I have patched I don't have good environment to do more test...So I still need to read source code deeply! ii)Can't drag multi-files I'm glad to see the following in source code: /* At the moment, the copy() method is limited to a single file, support for copying multi-files will be implemented later. */ g_return_if_fail(sources[1] == NULL); iii)But, it doesn't support for drag folder Is there TODO I don't find? Or any ideas about solution? Imho, dragging files/folder shouldn't be done via a Spice copy protocol. Instead, Spice should learn to implement drag and drop. Afaik this should be doable, but nobody worked on it. Actually, I'm always curious if copying muti-files/folder can be done by compressing to a zip/... before transfering ..of course, it's not a cool solution... Otoh, you might be interested in the sharing folder functionality. It allows you to have a folder on the client mounted/visible directly in the guest. From there copy will work like a regular guest operation, with guest UI etc. Here's a particular requirement that files can ONLY be draged from local to guest.. This function is mostly ready, and I will submit a new patch this week (I'll add you in CC). I'm really appreciate to hear that, thx a lot:) ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel