[Bug 773681] directsoundsink: High cpu usage on windows x86

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Mon May 1 22:36:59 UTC 2017


https://bugzilla.gnome.org/show_bug.cgi?id=773681

--- Comment #18 from Sebastian Dröge (slomo) <slomo at coaxion.net> ---
(In reply to Nicolas Dufresne (stormer) from comment #16)
> Instead of a dummy sleep, I think scheduling writes on the clock, base on
> the remaining time for data to be consumed would be better.

That's exactly what the sleep() there tries to do. Doing the same thing with a
GstClock is not magically solving the problem :)

(In reply to Dustin Spicuzza from comment #17)
> Is there a good example for how one would do that?

gst_clock_id_wait() on a gst_clock_new_single_shot_id() should do the job here.
Different than sleep() this also allows cancelling of the waiting from another
thread, which is generally a good thing to have.


I think what we have to understand here is why we often sleep 0ms, why the
calculations believe that immediately data should be available while in reality
some waiting has to happen first (but how much?).

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