mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-12 02:15:31 +00:00
ext/alsa/gstalsa.*: try xrun recovery when wait failed. Make xrun recovery function return TRUE/FALSE to indicate suc...
Original commit message from CVS: 2004-02-14 Benjamin Otte <in7y118@public.uni-hamburg.de> * ext/alsa/gstalsa.c: (gst_alsa_pcm_wait), (gst_alsa_xrun_recovery): * ext/alsa/gstalsa.h: try xrun recovery when wait failed. Make xrun recovery function return TRUE/FALSE to indicate success. (might fix #134354)
This commit is contained in:
parent
9f2dbcdf15
commit
73a071b77a
3 changed files with 18 additions and 4 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2004-02-14 Benjamin Otte <in7y118@public.uni-hamburg.de>
|
||||||
|
|
||||||
|
* ext/alsa/gstalsa.c: (gst_alsa_pcm_wait),
|
||||||
|
(gst_alsa_xrun_recovery):
|
||||||
|
* ext/alsa/gstalsa.h:
|
||||||
|
try xrun recovery when wait failed. Make xrun recovery function
|
||||||
|
return TRUE/FALSE to indicate success. (might fix #134354)
|
||||||
|
|
||||||
2004-02-13 David Schleef <ds@schleef.org>
|
2004-02-13 David Schleef <ds@schleef.org>
|
||||||
|
|
||||||
* gst/sine/demo-dparams.c: (dynparm_log_value_changed),
|
* gst/sine/demo-dparams.c: (dynparm_log_value_changed),
|
||||||
|
|
|
@ -800,8 +800,10 @@ gst_alsa_pcm_wait (GstAlsa *this)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
GST_ERROR_OBJECT (this, "error waiting for alsa pcm: (%d: %s)", err, snd_strerror (err));
|
if (!gst_alsa_xrun_recovery (this)) {
|
||||||
return FALSE;
|
GST_ERROR_OBJECT (this, "error waiting for alsa pcm: (%d: %s)", err, snd_strerror (err));
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -843,7 +845,8 @@ gst_alsa_start (GstAlsa *this)
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
void
|
|
||||||
|
gboolean
|
||||||
gst_alsa_xrun_recovery (GstAlsa *this)
|
gst_alsa_xrun_recovery (GstAlsa *this)
|
||||||
{
|
{
|
||||||
snd_pcm_status_t *status;
|
snd_pcm_status_t *status;
|
||||||
|
@ -879,7 +882,10 @@ gst_alsa_xrun_recovery (GstAlsa *this)
|
||||||
if (!(gst_alsa_stop_audio (this) && gst_alsa_start_audio (this))) {
|
if (!(gst_alsa_stop_audio (this) && gst_alsa_start_audio (this))) {
|
||||||
GST_ELEMENT_ERROR (this, RESOURCE, FAILED, (NULL),
|
GST_ELEMENT_ERROR (this, RESOURCE, FAILED, (NULL),
|
||||||
("Error restarting audio after xrun"));
|
("Error restarting audio after xrun"));
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*** AUDIO SETUP / START / STOP ***********************************************/
|
/*** AUDIO SETUP / START / STOP ***********************************************/
|
||||||
|
|
|
@ -183,7 +183,7 @@ GstCaps * gst_alsa_caps (snd_pcm_format_t format,
|
||||||
inline snd_pcm_sframes_t gst_alsa_update_avail (GstAlsa * this);
|
inline snd_pcm_sframes_t gst_alsa_update_avail (GstAlsa * this);
|
||||||
inline gboolean gst_alsa_pcm_wait (GstAlsa * this);
|
inline gboolean gst_alsa_pcm_wait (GstAlsa * this);
|
||||||
inline gboolean gst_alsa_start (GstAlsa * this);
|
inline gboolean gst_alsa_start (GstAlsa * this);
|
||||||
void gst_alsa_xrun_recovery (GstAlsa * this);
|
gboolean gst_alsa_xrun_recovery (GstAlsa * this);
|
||||||
|
|
||||||
/* format conversions */
|
/* format conversions */
|
||||||
inline snd_pcm_uframes_t gst_alsa_timestamp_to_samples (GstAlsa * this,
|
inline snd_pcm_uframes_t gst_alsa_timestamp_to_samples (GstAlsa * this,
|
||||||
|
|
Loading…
Reference in a new issue