GNOME Bugzilla – Bug 757033
scaletempo: Does not work properly with negative rates playback
Last modified: 2015-10-27 15:18:01 UTC
See the backwards playback GstPlayer test for example, it times out when using scaletempo and finishes soonish otherwise. https://github.com/sdroege/gst-player
Created attachment 313956 [details] [review] scaletempo: Fix processing of negative rates We just process them as positive rates and let the reversing of the buffers happen downstream in the sink. As such, applied rate stays positive and rate becomes -1.0.
This is actually not enough, it just makes it not deadlock. I think all samples need to be reversed to make the algorithm work smoothly.
Segment handling and other things are wrong, I'm on it
Created attachment 314019 [details] [review] scaletempo: Fix handling of rate < 0 We have to reverse all samples in a buffer before processing them to properly have continuous data from one buffer to another. As a result we will have a negative applied rate and a rate of 1.0. Also copy over the segment event's sequence number to the output segment while we're at it.
Created attachment 314026 [details] [review] scaletempo: Fix handling of rate < 0 We have to reverse all samples in a buffer before processing them to properly have continuous data from one buffer to another. As a result we will have a negative applied rate and a rate of 1.0. Also make sure that input buffers are correctly clipped to the segment, otherwise our calculations are going to go wrong. Also copy over the segment event's sequence number to the output segment while we're at it.
This depends on the patch from bug #756810
Attachment 314026 [details] pushed as ae3b903 - scaletempo: Fix handling of rate < 0
commit ae3b9030194abb6e51b9d26ce136a26088252196 Author: Sebastian Dröge <sebastian@centricular.com> Date: Sat Oct 24 17:14:07 2015 +0300 scaletempo: Fix handling of rate < 0 We have to reverse all samples in a buffer before processing them to properly have continuous data from one buffer to another. As a result we will have a negative applied rate and a rate of 1.0. Also make sure that input buffers are correctly clipped to the segment, otherwise our calculations are going to go wrong. Also copy over the segment event's sequence number to the output segment while we're at it. https://bugzilla.gnome.org/show_bug.cgi?id=757033