GNOME Bugzilla – Bug 708362
audiobasesink: new slave-method for custom clock slaving algorithms
Last modified: 2015-06-09 12:04:35 UTC
Created attachment 255295 [details] [review] Patch for custom clock slaving The current audio sink slave methods do not offer a way to use available features for clock slaving, like adjustable PLLs, or external asynchronous resamplers. This patch introduces a new slave method, GST_AUDIO_BASE_SINK_SLAVE_CUSTOM. It delivers adjusted external and internal timestamps and discontinuity information to a user-defined callback. The callback can then do whatever it wants with this information, like controlling the aforementioned PLLs. The difference between external and internal timestamps is the clock skew, which the custom method can use as input value for its internal control loop. The callback can also request the audiobasesink to skew the playout pointer by a defined number of nanoseconds. This is useful for large skews, which are difficult to overcome otherwise. For example, using asynchronous resampling only would require either drastic resampling, resulting in audible artifacts, or it would resample slightly, and it would take a long time for the skew to go away. Discontinuities are reported to give the control loop the chance to clear internal accumulators/integrators.
Created attachment 263829 [details] [review] audiobasesink: added custom clock slaving method
Created attachment 263831 [details] [review] audiobasesink: added custom clock slaving method Updated patch with some improvements (previous submission contained the wrong patch file)
Created attachment 263832 [details] [review] alsa: report recoverable device failures to base class
This is a ping to draw attention to this issue again. It would be great to have this included in GStreamer 1.4.
Hi Carlos, sorry for the long delay. I'm tempted to apply this as-is - it all seems clean enough, doesn't interfere with existing functions and clearly does what Carlos needs.
Merged to master and pushed. Thanks for your patience