GNOME Bugzilla – Bug 461068
Seeking not properly implemented by the pitch plugin
Last modified: 2007-11-15 18:53:59 UTC
Using the pitch plugin in a pipeline will prevent seeking from working correctly. This is due to the fact that when a new segment event travels through the plugin, it's internal stream state variables are not adjusted accordingly. Also, the segment is not adjusted to reflect the playback ratio with which the plugin is configured.
Created attachment 92574 [details] Small apllication that implements a loop to demonstrate the defect in the plugin Using the program with identity as it's first parameter will loop the sound correct. Using pitch will not
Created attachment 92575 [details] [review] patch to implement the behaviour (almost) correctly This patch adds new_segment event handling to implement seeking.
This will not yet work when the speed of the stream is changed during playback. I'm not really sure how to handle it. Should it send a new_segment event downstream with the update flag set to TRUE. Only the stop time of the segment should then be updated to new_stop_time = current_time + (stop_time - current_time) * stream_rate; This will make sure playback will continue as planned but the start-time is of course not 100% with regard to the original media.
Bug confirmed. Patch seems to solve the issue with the limitations mentioned.
I can also confirm the bug. Any information on if or when the patch will be accepted? This bug limits the use cases for the pitch plugin quite drastically. I'd love to see it working at least so far that a simple audio player with tempo control and seeking is possible.
Patch by: Wouter Paesen <wouter at blue-gate dot be> * ext/soundtouch/gstpitch.cc: Handle seeking correctly. Fixes #461068.