GNOME Bugzilla – Bug 695262
Use an adaptive seek in the media files previewer (keyframe/fast seeks when dragging, accurate seek when releasing)
Last modified: 2015-10-20 13:10:44 UTC
I'm suspecting the seeking code in mediafilespreviewer.py (the module used for the file chooser dialog and the media library preview feature) is quite basic, in the sense that it always does accurate seeks. To speed things up, we should leverage the new seeking types in GStreamer 1.x to scrub more quickly/efficiently while dragging the slider and do the final seek (when the mouse button is released) with an accurate seek.
Also potentially related (or not): bug #432681
One suggestion, and it would have to be tested outside of pitivi first, would be to implement seek queuing instead of using our timeout base seeker. My idea would be to implement code that tracks the completion of a seek, and while a seek if being processed, the latest following seek is queued. The following seek is then sent when the previous seek is done (iirc we can watch for async_done message). Sending the seek could also be done in a seeker thread, which could synchronize on seek completion with gst_element_get_state(). It is simple and could reduce the risk UI freeze (won't fix streaming deadlock, but at least the user can save and kill PiTiVi).
Note that currently all seeks are converted to accurate in GNL. I feel this is slghtly wrong as from what I understand accurate seek should only be required when doing the transition between two clips, not during flushing seeks. Never the less, I'm mentionning, in case someone experiment and find that it makes no difference.
This bug has been migrated to https://phabricator.freedesktop.org/T3018. Please use the Phabricator interface to report further bugs by creating a task and associating it with Project: Pitivi. See http://wiki.pitivi.org/wiki/Bug_reporting for details.