ext/alsa/gstalsa.*: debugging output fixes

Original commit message from CVS:
* ext/alsa/gstalsa.c: (gst_alsa_open_audio),
(gst_alsa_probe_hw_params):
* ext/alsa/gstalsa.h:
debugging output fixes
This commit is contained in:
Benjamin Otte 2004-03-24 18:48:55 +00:00
parent a120776798
commit cb6dd8dbed
3 changed files with 17 additions and 4 deletions

View file

@ -1,3 +1,10 @@
2004-03-24 Benjamin Otte <otte@gnome.org>
* ext/alsa/gstalsa.c: (gst_alsa_open_audio),
(gst_alsa_probe_hw_params):
* ext/alsa/gstalsa.h:
debugging output fixes
2004-03-24 Benjamin Otte <otte@gnome.org>
* ext/gnomevfs/gstgnomevfssrc.c: (gst_gnomevfssrc_set_property):

View file

@ -1114,7 +1114,7 @@ gst_alsa_open_audio (GstAlsa * this)
if (!gst_element_get_pad_list (GST_ELEMENT (this)))
return TRUE;
GST_INFO ("Opening alsa device \"%s\"...\n", this->device);
GST_INFO ("Opening alsa device \"%s\"...", this->device);
#if 0
/* enable this to get better debugging */
@ -1151,7 +1151,7 @@ gst_alsa_probe_hw_params (GstAlsa * this, GstAlsaFormat * format)
g_return_val_if_fail (this != NULL, FALSE);
g_return_val_if_fail (format != NULL, FALSE);
GST_INFO ("Probing format: %s %dHz, %d channels\n",
GST_INFO ("Probing format: %s %dHz, %d channels",
snd_pcm_format_name (format->format), format->rate, format->channels);
snd_pcm_hw_params_alloca (&hw_params);
@ -1159,8 +1159,10 @@ gst_alsa_probe_hw_params (GstAlsa * this, GstAlsaFormat * format)
SIMPLE_ERROR_CHECK (snd_pcm_hw_params_set_periods_integer (this->handle,
hw_params));
#if 0
/* enable this for soundcard specific debugging */
/* snd_pcm_hw_params_dump (hw_params, this->out); */
snd_pcm_hw_params_dump (hw_params, this->out);
#endif
mask = alloca (snd_pcm_access_mask_sizeof ());
snd_pcm_access_mask_none (mask);

View file

@ -37,7 +37,11 @@ GST_DEBUG_CATEGORY_EXTERN (alsa_debug);
/* 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; } \
int err = (value); \
if (err < 0) { \
GST_WARNING_OBJECT (this, "\"" #value "\": %s", snd_strerror (err)); \
return FALSE; \
} \
}G_STMT_END