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 461068 - Seeking not properly implemented by the pitch plugin
Seeking not properly implemented by the pitch plugin
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 0.10.6
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-07-27 20:32 UTC by Wouter Paesen
Modified: 2007-11-15 18:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Small apllication that implements a loop to demonstrate the defect in the plugin (3.62 KB, text/x-csrc)
2007-07-27 20:34 UTC, Wouter Paesen
  Details
patch to implement the behaviour (almost) correctly (4.78 KB, patch)
2007-07-27 20:36 UTC, Wouter Paesen
committed Details | Review

Description Wouter Paesen 2007-07-27 20:32:10 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.
Comment 1 Wouter Paesen 2007-07-27 20:34:29 UTC
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
Comment 2 Wouter Paesen 2007-07-27 20:36:31 UTC
Created attachment 92575 [details] [review]
patch to implement the behaviour (almost) correctly

This patch adds new_segment event handling to implement seeking.
Comment 3 Wouter Paesen 2007-07-27 21:18:30 UTC
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.
Comment 4 luisgarrido 2007-07-28 17:27:09 UTC
Bug confirmed. Patch seems to solve the issue with the limitations mentioned.
Comment 5 Frederik Elwert 2007-11-10 16:28:59 UTC
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.
Comment 6 Wim Taymans 2007-11-15 18:53:59 UTC
        Patch by: Wouter Paesen <wouter at blue-gate dot be>

        * ext/soundtouch/gstpitch.cc:
        Handle seeking correctly. Fixes #461068.