gst-plugins-base: alsasink: log API errors along with the error code and string

Vincent Penquerc'h vincent at kemper.freedesktop.org
Mon Jan 16 03:46:56 PST 2012


Module: gst-plugins-base
Branch: master
Commit: e60027c795512e6a716d616fa33bbe72f91b25d6
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=e60027c795512e6a716d616fa33bbe72f91b25d6

Author: Vincent Penquerc'h <vincent.penquerch at collabora.co.uk>
Date:   Mon Jan 16 11:40:16 2012 +0000

alsasink: log API errors along with the error code and string

---

 ext/alsa/gstalsasink.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/ext/alsa/gstalsasink.c b/ext/alsa/gstalsasink.c
index 24b1d8a..b15ed9a 100644
--- a/ext/alsa/gstalsasink.c
+++ b/ext/alsa/gstalsasink.c
@@ -290,9 +290,11 @@ gst_alsasink_init (GstAlsaSink * alsasink, GstAlsaSinkClass * g_class)
 }
 
 #define CHECK(call, error) \
-G_STMT_START {                  \
-if ((err = call) < 0)           \
-  goto error;                   \
+G_STMT_START {             \
+  if ((err = call) < 0) {  \
+    GST_WARNING_OBJECT (alsa, "Error %d (%s) calling " #call, err, snd_strerror (err)); \
+    goto error;            \
+  }                        \
 } G_STMT_END;
 
 static GstCaps *



More information about the gstreamer-commits mailing list