[Bug 737055] Setting URI on playbin at about-to-finish when playing AAC and using an alsasink is not working well

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Tue Sep 23 10:26:46 PDT 2014


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

--- Comment #8 from Thiago Sousa Santos <thiagossantos at gmail.com> 2014-09-23 17:26:36 UTC ---
Created an attachment (id=286905)
 View: https://bugzilla.gnome.org/attachment.cgi?id=286905
 Review: https://bugzilla.gnome.org/review?bug=737055&attachment=286905

audiosink: compensate for segment restart with clock's time_offset

When playing chained data the audio ringbuffer is released and
then acquired again. This makes it reset the segbase/segdone
variables, but the next sample will be scheduled to play in
the next position (right after the sample from the previous media)
and, as the segdone is at 0, the audiosink will wait the duration
of this previous media before it can write and play the new data.

What happens is this:
pointer at 0, write to 698-1564, diff 698, segtotal 20, segsize 1764, base 0

it will have to wait the length of 698 samples before being able to write.

In a regular sample playback it looks like:
pointer at 677, write to 696-1052, diff 19, segtotal 20, segsize 1764, base 0

In this case it will write to the next available position and it
doesn't need to wait or fill with silence.

This solution is borrowed from pulsesink that resets the clock to
start again from 0, which makes it reset the time_offset to the time
of the last played sample. This is used to correct the place of
writing in the ringbuffer to the new start (0 again)

-- 
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