Commit d3b4878b authored by Wim Taymans's avatar Wim Taymans
Browse files

ext/alsa/: Use DEBUG_OBJECT more.

Original commit message from CVS:
* ext/alsa/gstalsasink.c: (xrun_recovery), (gst_alsasink_write):
* ext/alsa/gstalsasrc.c: (xrun_recovery), (gst_alsasrc_read):
Use DEBUG_OBJECT more.
parent 280e2ca6
2006-09-15 Wim Taymans <wim@fluendo.com>
* ext/alsa/gstalsasink.c: (xrun_recovery), (gst_alsasink_write):
* ext/alsa/gstalsasrc.c: (xrun_recovery), (gst_alsasrc_read):
Use DEBUG_OBJECT more.
=== release 0.10.10 ===
 
2006-09-07 Thomas Vander Stichele <thomas at apestaart dot org>
......
......@@ -755,14 +755,15 @@ close_error:
* Underrun and suspend recovery
*/
static gint
xrun_recovery (snd_pcm_t * handle, gint err)
xrun_recovery (GstAlsaSink * alsa, snd_pcm_t * handle, gint err)
{
GST_DEBUG ("xrun recovery %d", err);
GST_DEBUG_OBJECT (alsa, "xrun recovery %d", err);
if (err == -EPIPE) { /* under-run */
err = snd_pcm_prepare (handle);
if (err < 0)
GST_WARNING ("Can't recovery from underrun, prepare failed: %s",
GST_WARNING_OBJECT (alsa,
"Can't recovery from underrun, prepare failed: %s",
snd_strerror (err));
return 0;
} else if (err == -ESTRPIPE) {
......@@ -772,7 +773,8 @@ xrun_recovery (snd_pcm_t * handle, gint err)
if (err < 0) {
err = snd_pcm_prepare (handle);
if (err < 0)
GST_WARNING ("Can't recovery from suspend, prepare failed: %s",
GST_WARNING_OBJECT (alsa,
"Can't recovery from suspend, prepare failed: %s",
snd_strerror (err));
}
return 0;
......@@ -802,7 +804,7 @@ gst_alsasink_write (GstAudioSink * asink, gpointer data, guint length)
GST_DEBUG_OBJECT (asink, "Write error: %s", snd_strerror (err));
if (err == -EAGAIN) {
continue;
} else if (xrun_recovery (alsa->handle, err) < 0) {
} else if (xrun_recovery (alsa, alsa->handle, err) < 0) {
goto write_error;
}
continue;
......
......@@ -733,14 +733,15 @@ gst_alsasrc_close (GstAudioSrc * asrc)
* Underrun and suspend recovery
*/
static gint
xrun_recovery (snd_pcm_t * handle, gint err)
xrun_recovery (GstAlsaSrc * alsa, snd_pcm_t * handle, gint err)
{
GST_DEBUG ("xrun recovery %d", err);
GST_DEBUG_OBJECT (alsa, "xrun recovery %d", err);
if (err == -EPIPE) { /* under-run */
err = snd_pcm_prepare (handle);
if (err < 0)
GST_WARNING ("Can't recovery from underrun, prepare failed: %s",
GST_WARNING_OBJECT (alsa,
"Can't recovery from underrun, prepare failed: %s",
snd_strerror (err));
return 0;
} else if (err == -ESTRPIPE) {
......@@ -750,7 +751,8 @@ xrun_recovery (snd_pcm_t * handle, gint err)
if (err < 0) {
err = snd_pcm_prepare (handle);
if (err < 0)
GST_WARNING ("Can't recovery from suspend, prepare failed: %s",
GST_WARNING_OBJECT (alsa,
"Can't recovery from suspend, prepare failed: %s",
snd_strerror (err));
}
return 0;
......@@ -776,7 +778,7 @@ gst_alsasrc_read (GstAudioSrc * asrc, gpointer data, guint length)
if (err == -EAGAIN) {
GST_DEBUG_OBJECT (asrc, "Read error: %s", snd_strerror (err));
continue;
} else if (xrun_recovery (alsa->handle, err) < 0) {
} else if (xrun_recovery (alsa, alsa->handle, err) < 0) {
goto read_error;
}
continue;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment