+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>
* 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) {
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;
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;
* 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) {
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;
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;