After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 708362 - audiobasesink: new slave-method for custom clock slaving algorithms
audiobasesink: new slave-method for custom clock slaving algorithms
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal enhancement
: 1.5.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-09-19 11:51 UTC by Carlos Rafael Giani
Modified: 2015-06-09 12:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for custom clock slaving (14.03 KB, patch)
2013-09-19 11:51 UTC, Carlos Rafael Giani
none Details | Review
audiobasesink: added custom clock slaving method (5.70 KB, patch)
2013-12-09 18:06 UTC, Carlos Rafael Giani
none Details | Review
audiobasesink: added custom clock slaving method (16.27 KB, patch)
2013-12-09 18:07 UTC, Carlos Rafael Giani
none Details | Review
alsa: report recoverable device failures to base class (1.79 KB, patch)
2013-12-09 18:08 UTC, Carlos Rafael Giani
none Details | Review

Description Carlos Rafael Giani 2013-09-19 11:51:42 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.
Comment 1 Carlos Rafael Giani 2013-12-09 18:06:03 UTC
Created attachment 263829 [details] [review]
audiobasesink: added custom clock slaving method
Comment 2 Carlos Rafael Giani 2013-12-09 18:07:58 UTC
Created attachment 263831 [details] [review]
audiobasesink: added custom clock slaving method

Updated patch with some improvements
(previous submission contained the wrong patch file)
Comment 3 Carlos Rafael Giani 2013-12-09 18:08:49 UTC
Created attachment 263832 [details] [review]
alsa: report recoverable device failures to base class
Comment 4 Carlos Rafael Giani 2014-06-22 15:55:36 UTC
This is a ping to draw attention to this issue again. It would be great to have this included in GStreamer 1.4.
Comment 5 Jan Schmidt 2015-06-01 10:33:12 UTC
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.
Comment 6 Jan Schmidt 2015-06-09 11:56:50 UTC
Merged to master and pushed. Thanks for your patience