[gstreamer-bugs] [Bug 360673] Stuttering with SunAudio Sink
GStreamer (bugzilla.gnome.org)
bugzilla-daemon at bugzilla.gnome.org
Wed Nov 8 08:52:11 PST 2006
Do not reply to this via email (we are currently unable to handle email
responses and they get discarded). You can add comments to this bug at
http://bugzilla.gnome.org/show_bug.cgi?id=360673
GStreamer | gst-plugins-base | Ver: HEAD CVS
------- Comment #15 from Brian Cameron 2006-11-08 16:51 UTC -------
Actually digging into this a bit more, I notice that if I add the thr_yield
function as follows in the audioringbuffer_thread_func ()
do {
written = writefunc (sink, readptr + written, left);
GST_LOG ("transfered %d bytes of %d from segment %d", written, left,
readseg);
if (written < 0 || written > left) {
GST_WARNING ("error writing data (reason: %s), skipping segment\n",
strerror (errno));
break;
}
left -= written;
} while (left > 0);
thr_yield ();
and also force the sunaudiosink to always open non-blocking by commenting out
the if test in the open function like this:
fd = open (sunaudiosink->device, O_WRONLY | O_NONBLOCK);
/*
if (fd >= 0) {
close (fd);
fd = open (sunaudiosink->device, O_WRONLY);
}
*/
That this does make the stuttering less bad. With these changes it seems that
the audio starts to play consistently, and then after a few seconds it starts
to stutter. As if this fixes the problem for a few seconds and then it gets
out of sync somehow.
So this thread yielding does seem to be related to the stuttering behavior, but
isn't a complete fix. But hopefully it points the way to the solution? Wim?
--
Configure bugmail: http://bugzilla.gnome.org/userprefs.cgi?tab=email
More information about the Gstreamer-bugs
mailing list