[Spice-commits] 3 commits - src/channel-smartcard.c src/spice-audio.c src/spice-gstaudio.c src/spicy.c
Christophe Fergau
teuf at kemper.freedesktop.org
Wed Dec 9 08:57:11 PST 2015
src/channel-smartcard.c | 4 ++++
src/spice-audio.c | 4 ++--
src/spice-gstaudio.c | 12 +++++++-----
src/spicy.c | 4 ++++
4 files changed, 17 insertions(+), 7 deletions(-)
New commits:
commit 34c839bf0376aa76627f4ca8d3d836a5e60fe451
Author: Christophe Fergeau <cfergeau at redhat.com>
Date: Wed Dec 9 12:11:41 2015 +0100
gst: Fix typo in preprocessor symbol
When the GStreamer backend is used, HAVE_GSTAUDIO is defined, not
HAVE_GST_AUDIO.
diff --git a/src/spice-audio.c b/src/spice-audio.c
index 550d02a..64d9bca 100644
--- a/src/spice-audio.c
+++ b/src/spice-audio.c
@@ -45,7 +45,7 @@
#ifdef HAVE_PULSE
#include "spice-pulse.h"
#endif
-#ifdef HAVE_GST_AUDIO
+#ifdef HAVE_GSTAUDIO
#include "spice-gstaudio.h"
#endif
@@ -264,7 +264,7 @@ SpiceAudio *spice_audio_new(SpiceSession *session, GMainContext *context,
#ifdef HAVE_PULSE
self = SPICE_AUDIO(spice_pulse_new(session, context, name));
#endif
-#ifdef HAVE_GST_AUDIO
+#ifdef HAVE_GSTAUDIO
if (!self)
self = SPICE_AUDIO(spice_gstaudio_new(session, context, name));
#endif
commit afe52e263c1241c38815618a2aabd008a5ecbfad
Author: Christophe Fergeau <cfergeau at redhat.com>
Date: Wed Dec 9 12:05:06 2015 +0100
smartcard: Fix compilation with older libcacard
e0c2182937 dropped some #include from channel-smartcard.c and spicy.c as
they were redundant with the headers already included from
spice-common/common/messages.h. While this is true for the newer
libcacard.h header, we need to include more headers to support older
libcacard, or compilation breaks.
diff --git a/src/channel-smartcard.c b/src/channel-smartcard.c
index 7403431..b5535e6 100644
--- a/src/channel-smartcard.c
+++ b/src/channel-smartcard.c
@@ -17,6 +17,10 @@
*/
#include "config.h"
+#ifdef USE_SMARTCARD_012
+#include <vreader.h>
+#endif
+
#include "spice-client.h"
#include "spice-common.h"
diff --git a/src/spicy.c b/src/spicy.c
index 38ef159..12ae653 100644
--- a/src/spicy.c
+++ b/src/spicy.c
@@ -24,6 +24,10 @@
#include <termios.h>
#endif
+#ifdef USE_SMARTCARD_012
+#include <vreader.h>
+#endif
+
#include "glib-compat.h"
#include "spice-widget.h"
#include "spice-gtk-session.h"
commit e8fde7c546eda396181c8809f9b91fb1091cd195
Author: Francois Gouget <fgouget at codeweavers.com>
Date: Tue Dec 8 19:24:44 2015 +0100
spice-gtk: Recover from GStreamer audio initialization errors
gst_init() will terminate the program in case of a failure so it's
better to use gst_init_check() so we can recover from errors.
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
diff --git a/src/spice-gstaudio.c b/src/spice-gstaudio.c
index 1623421..096fea4 100644
--- a/src/spice-gstaudio.c
+++ b/src/spice-gstaudio.c
@@ -551,15 +551,17 @@ static gboolean connect_channel(SpiceAudio *audio, SpiceChannel *channel)
SpiceGstaudio *spice_gstaudio_new(SpiceSession *session, GMainContext *context,
const char *name)
{
- SpiceGstaudio *gstaudio;
-
- gst_init(NULL, NULL);
- gstaudio = g_object_new(SPICE_TYPE_GSTAUDIO,
+ GError *err = NULL;
+ if (gst_init_check(NULL, NULL, &err)) {
+ return g_object_new(SPICE_TYPE_GSTAUDIO,
"session", session,
"main-context", context,
NULL);
+ }
- return gstaudio;
+ g_warning("Disabling GStreamer audio support: %s", err->message);
+ g_clear_error(&err);
+ return NULL;
}
static void spice_gstaudio_get_playback_volume_info_async(SpiceAudio *audio,
More information about the Spice-commits
mailing list