GNOME Bugzilla – Bug 737504
timeline: add API to get sources neighbouring a position.
Last modified: 2018-11-03 12:52:25 UTC
My use case was removing gaps in a timeline, the least complex algorithm I came up with was : find out if a clip overlaps with other clips, if not find the next source and ripple it towards you. These functions implement the second step correctly with a low complexity (not very theoretically versed but we use a sequence_search so I would guess a logarithmic complexity). The new API is generic enough (allows to filter by track types and search for either clips ending or starting before or after you), and can come in pretty handy for script writers (or plugin writers for pitivi). It is extensively tested and the tests obviously pass :) In the future we could reuse these functions to handle the snapping mechanism internally.
Created attachment 287265 [details] [review] Implements the proposed enhancement
Created attachment 287266 [details] [review] Implements the proposed enhancement Forgot to update ges-sections.txt
Created attachment 287267 [details] [review] Implements the proposed enhancement Better to return a reference. I'm done I promise
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-editing-services/issues/17.