[Bug 692953] alsasink does not work at all with default value "sync=true"

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Thu Sep 12 10:40:00 PDT 2013


https://bugzilla.gnome.org/show_bug.cgi?id=692953
  GStreamer | gst-plugins-base | 1.0.9

--- Comment #149 from Thomas DEBESSE <thomas.debesse at rcf.fr> 2013-09-12 17:39:43 UTC ---
I have compiled the 1.0.10 gstreamer alsaink module with your modification, it
change nothing.

I gradually get noise with log like that:
0:05:34.719307833  7707  0x8339cf0 WARN           audiobasesink
gstaudiobasesink.c:1273:gst_audio_base_sink_skew_slaving:<alsasink0> correct
clock skew 20002484 > 20000000

until 5min, then we have that:
0:05:34.719353943  7707  0x8339cf0 WARN           audiobasesink
gstaudiobasesink.c:1579:gst_audio_base_sink_get_alignment:<alsasink0>
Unexpected discontinuity in audio timestamps of +0:00:00.021312500, resyncing

then the sound is ok.

Its like Comment #75 and Comment #78:

We get many "correct clock skew" with noise, then one "resyncing", then the
sound is ok, then many "correct clock skew", we never have other resyncing,
then the noise become silence with many "correct clock skew", definitively.

For your information, alsasrc have similar behavior: no log printed, then many
"correct clock skew", then one "resyncing" wich stops "correct clock skew"
printg, then new "correct clock skew", then new "resyncing", then new "correct
clock skew", then new "resyncing", endlessly, but the sound is always ok !

alsasink have only one "resyncing" then the sound become silent.

You can listen a recording from Comment #78 (only one channel, both are
identical):

http://dl.illwieckz.net/u/thomas-debesse/bug-report/gstreamer/bug-692953/20130830.gstreamer-drift-problem-full-mono-logsync.flac

You can see this picture from comment #78 (waveform):
http://dl.illwieckz.net/u/thomas-debesse/bug-report/gstreamer/bug-692953/20130830.gstreamer-drift-problem-full-8.34-0-comment.png

Time can differ.


I'm running this pipeline:

http://dl.illwieckz.net/u/thomas-debesse/bug-report/gstreamer/bug-692953/20130830.gstreamer-drift-problem-full-8.34-0-comment.png

with the modification to gstalsasink.c from Comment #147:

---8<-------------------------------------------------------
  GST_ALSA_SINK_LOCK (asink);
  while (cptr > 0) {
    /* start by doing a blocking wait for free space. Set the timeout
     * to 4 times the period time */
    err = snd_pcm_wait (alsa->handle, (4 * alsa->period_time / 1000));
    if (err == -EPIPE) {
      GST_DEBUG_OBJECT (asink, "wait error, %d", err);
      if (xrun_recovery (alsa, alsa->handle, err) < 0) {
        goto write_error;
      }
    }

    GST_DELAY_SINK_LOCK (asink);
    err = snd_pcm_writei (alsa->handle, ptr, cptr);
    GST_DELAY_SINK_UNLOCK (asink);

    GST_DEBUG_OBJECT (asink, "written %d frames out of %d", err, cptr);
    if (err < 0) {
      GST_DEBUG_OBJECT (asink, "Write error: %s", snd_strerror (err));
      if (err == -EAGAIN) {
        continue;
      } else if (err == -ENODEV) {
        goto device_disappeared;
      } else if (xrun_recovery (alsa, alsa->handle, err) < 0) {
        goto write_error;
      }
      continue;
    }
---8<-------------------------------------------------------

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list