2003-12-27 Benjamin Otte <in7y118@public.uni-hamburg.de>
+ * ext/alsa/gstalsa.c: (gst_alsa_open_audio):
+ Don't send ALSA debugging to stderr.
+ * ext/alsa/gstalsa.h:
+ Use GST_WARNING instead of g_warning when ALSA functions fail.
+
+2003-12-27 Benjamin Otte <in7y118@public.uni-hamburg.de>
+
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_get_xv_support):
Free XVAdapterInfo correctly.
GST_INFO ( "Opening alsa device \"%s\"...\n", this->device);
+#if 0
+ /* enable this to get better debugging */
ERROR_CHECK (snd_output_stdio_attach (&this->out, stderr, 0),
"error opening log output: %s");
+#endif
/* we use non-blocking i/o */
ERROR_CHECK (snd_pcm_open (&this->handle, this->device,
GST_ALSA_GET_CLASS (this)->stream, SND_PCM_NONBLOCK),
/* error checking for standard alsa functions */
+/* NOTE: these functions require a GObject *this and can only be used in
+ functions that return TRUE on success and FALSE on error */
#define SIMPLE_ERROR_CHECK(value) G_STMT_START{ \
int err = (value); if (err < 0) { return FALSE; } \
}G_STMT_END
#define ERROR_CHECK(value, ...) G_STMT_START{ \
int err = (value); \
if (err < 0) { \
- g_warning ( __VA_ARGS__, snd_strerror (err)); \
+ GST_WARNING_OBJECT (this, __VA_ARGS__, snd_strerror (err)); \
return FALSE; \
} \
}G_STMT_END
#define ERROR_CHECK(value, args...) G_STMT_START{ \
int err = (value); \
if (err < 0) { \
- g_warning ( ## args, snd_strerror (err)); \
+ GST_WARNING_OBJECT (this, ## args, snd_strerror (err)); \
return FALSE; \
} \
}G_STMT_END
#define ERROR_CHECK(value, args...) G_STMT_START{ \
int err = (value); \
if (err < 0) { \
- g_warning (snd_strerror (err)); \
+ GST_WARNING_OBJECT (this, snd_strerror (err)); \
return FALSE; \
} \
}G_STMT_END