mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-20 00:31:13 +00:00
ext/alsa/gstalsa.c: Don't send ALSA debugging to stderr.
Original commit message from CVS: 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.
This commit is contained in:
parent
227cfadb38
commit
977bb1105e
3 changed files with 15 additions and 3 deletions
|
@ -1,3 +1,10 @@
|
|||
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):
|
||||
|
|
|
@ -892,8 +892,11 @@ gst_alsa_open_audio (GstAlsa *this)
|
|||
|
||||
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),
|
||||
|
|
|
@ -34,6 +34,8 @@ GST_DEBUG_CATEGORY_EXTERN (alsa_debug);
|
|||
|
||||
|
||||
/* 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
|
||||
|
@ -43,7 +45,7 @@ GST_DEBUG_CATEGORY_EXTERN (alsa_debug);
|
|||
#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
|
||||
|
@ -52,7 +54,7 @@ GST_DEBUG_CATEGORY_EXTERN (alsa_debug);
|
|||
#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
|
||||
|
@ -61,7 +63,7 @@ GST_DEBUG_CATEGORY_EXTERN (alsa_debug);
|
|||
#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
|
||||
|
|
Loading…
Reference in a new issue