summaryrefslogtreecommitdiffstats
path: root/ext/esd/esdsink.c
diff options
context:
space:
mode:
authorThomas Vander Stichele <thomas@apestaart.org>2004-01-23 15:34:50 +0000
committerThomas Vander Stichele <thomas@apestaart.org>2004-01-23 15:34:50 +0000
commit88c22f75110e12b72a39611f1b3ef384e18e0710 (patch)
treee2120826f18b8d653213e383a19e566b4112f055 /ext/esd/esdsink.c
parentd2d07f68b2b205106714b3005c2cf986874ba1a6 (diff)
private debugging cat better error reporting
Original commit message from CVS: private debugging cat better error reporting
Diffstat (limited to 'ext/esd/esdsink.c')
-rw-r--r--ext/esd/esdsink.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/ext/esd/esdsink.c b/ext/esd/esdsink.c
index a66be1a8..b7f91458 100644
--- a/ext/esd/esdsink.c
+++ b/ext/esd/esdsink.c
@@ -28,6 +28,8 @@
#include <unistd.h>
#include <errno.h>
+GST_DEBUG_CATEGORY_EXTERN (esd_debug);
+
/* elementfactory information */
static GstElementDetails esdsink_details = {
"Esound audio sink",
@@ -428,14 +430,16 @@ gst_esdsink_open_audio (GstEsdsink *sink)
if (sink->depth == 16) esdformat |= ESD_BITS16;
else if (sink->depth == 8) esdformat |= ESD_BITS8;
else {
- GST_DEBUG ("esdsink: invalid bit depth (%d)", sink->depth);
+ gst_element_error (sink, STREAM, FORMAT, NULL,
+ ("invalid bit depth (%d)", sink->depth));
return FALSE;
}
if (sink->channels == 2) esdformat |= ESD_STEREO;
else if (sink->channels == 1) esdformat |= ESD_MONO;
else {
- GST_DEBUG ("esdsink: invalid number of channels (%d)", sink->channels);
+ gst_element_error (sink, STREAM, FORMAT, NULL,
+ ("invalid number of channels (%d)", sink->channels));
return FALSE;
}
@@ -446,7 +450,8 @@ gst_esdsink_open_audio (GstEsdsink *sink)
sink->fd = esd_play_stream(esdformat, sink->frequency, sink->host, connname);
}
if ( sink->fd < 0 ) {
- GST_DEBUG ("esdsink: can't open connection to esound server");
+ gst_element_error (sink, RESOURCE, OPEN_WRITE, NULL,
+ ("can't open connection to esound server"));
return FALSE;
}