gstreamer/ges
Henry Wilkes 39097f5574 timeline-tree: simplify and fix editing
Editing has been simplified by breaking down each edit into a
combination of three basic single-element edits: MOVE, TRIM_START, and
TRIM_END.

Each edit follows these steps:
+ Determine which elements are to be edited and under which basic mode
+ Determine which track elements will move as a result
+ Snap the edit position to one of the edges of the main edited element,
  (or the edge of one of its descendants, in the case of MOVE), avoiding
  moving elements.
  NOTE: in particular, we can *not* snap to the edge of a neighbouring
  element in a roll edit. This was previously possible, even though the
  neighbour was moving!
+ Determine the edit positions for clips (or track elements with no
  parent) using the snapped value. In addition, we replace any edits of
  a group with an edit of its descendant clips. If any value would be
  out of bounds (e.g. negative start) we do not edit.
  NOTE: this is now done *after* checking the snapping. This allows the
  edit to succeed if snapping would cause it to go from being invalid to
  valid!
+ Determine whether the collection of edits would result in a valid
  timeline-configuration which does not break the rules for sources
  overlapping.
+ If all this succeeds, we emit snapping-started on the timeline.
+ We then perform all the edits. At this point they should all succeed.

The simplification/unification should make it easier to make other
changes.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/issues/97
Fixes https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/issues/98

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/169>
2020-05-07 09:37:15 +01:00
..
python ges: Output otio formatter loading issues in debug logs 2020-05-06 16:11:58 +00:00
ges-asset.c ges: Fix reloading UriClipAsset synchronously 2020-04-08 14:35:28 +01:00
ges-asset.h ges: Use #pragma once everywhere 2020-03-19 21:09:18 +00:00
ges-audio-source.c ges: Use assets to instantiate track elements/group 2020-03-27 17:17:23 -03:00
ges-audio-source.h ges: Use #pragma once everywhere 2020-03-19 21:09:18 +00:00
ges-audio-test-source.c ges: Use assets to instantiate track elements/group 2020-03-27 17:17:23 -03:00
ges-audio-test-source.h ges: Update documentation 2020-04-09 10:10:09 -04:00
ges-audio-track.c docs: update GESAudioTrack and GESVideoTrack 2020-03-05 17:04:51 -03:00
ges-audio-track.h ges: Use #pragma once everywhere 2020-03-19 21:09:18 +00:00
ges-audio-transition.c ges: Use assets to instantiate track elements/group 2020-03-27 17:17:23 -03:00
ges-audio-transition.h ges: Use assets to instantiate track elements/group 2020-03-27 17:17:23 -03:00
ges-audio-uri-source.c track-element: Create nleobject on GESExtractable::set_asset 2020-03-27 17:17:23 -03:00
ges-audio-uri-source.h ges: Update documentation 2020-04-09 10:10:09 -04:00
ges-auto-transition.c auto-transition: fix setting of SET_SIMPLE flag 2020-03-11 17:35:07 +00:00
ges-auto-transition.h ges: Use #pragma once everywhere 2020-03-19 21:09:18 +00:00
ges-base-effect-clip.c clip: only allow core elements as children 2020-03-16 14:19:51 +00:00
ges-base-effect-clip.h ges: Use #pragma once everywhere 2020-03-19 21:09:18 +00:00
ges-base-effect.c WIP: ges: fix API export/import and 'inconsistent linkage' on MSVC 2018-12-15 00:14:51 +00:00
ges-base-effect.h ges: Use #pragma once everywhere 2020-03-19 21:09:18 +00:00
ges-base-transition-clip.c WIP: ges: fix API export/import and 'inconsistent linkage' on MSVC 2018-12-15 00:14:51 +00:00
ges-base-transition-clip.h ges: Use #pragma once everywhere 2020-03-19 21:09:18 +00:00
ges-base-xml-formatter.c ges: Always check return value of ges_container_add 2020-04-10 11:12:12 -04:00
ges-base-xml-formatter.h ges: Use #pragma once everywhere 2020-03-19 21:09:18 +00:00
ges-clip-asset.c timeline: Fix wrong usage of scale_int 2020-04-16 12:56:10 -04:00
ges-clip-asset.h ges: Add APIs to have a sens of frame numbers 2020-03-25 11:26:29 -03:00
ges-clip.c timeline-tree: simplify and fix editing 2020-05-07 09:37:15 +01:00
ges-clip.h clip: add the duration-limit property 2020-05-07 09:37:15 +01:00
ges-command-line-formatter.c ges: support test clips assets natural size/framerate 2020-03-25 11:26:29 -03:00
ges-command-line-formatter.h ges: Use #pragma once everywhere 2020-03-19 21:09:18 +00:00
ges-container.c container: keep start and duration up to date 2020-05-07 09:37:15 +01:00
ges-container.h ges: Use #pragma once everywhere 2020-03-19 21:09:18 +00:00
ges-effect-asset.c ges: Update documentation 2020-04-09 10:10:09 -04:00
ges-effect-asset.h ges: Use #pragma once everywhere 2020-03-19 21:09:18 +00:00
ges-effect-clip.c ges: Use assets to instantiate track elements/group 2020-03-27 17:17:23 -03:00
ges-effect-clip.h ges: Use #pragma once everywhere 2020-03-19 21:09:18 +00:00
ges-effect.c nleobject: stop using media-duration-factor 2020-04-29 12:32:52 +00:00
ges-effect.h ges: Use #pragma once everywhere 2020-03-19 21:09:18 +00:00
ges-enums.c timeline-tree: simplify and fix editing 2020-05-07 09:37:15 +01:00
ges-enums.h timeline-tree: simplify and fix editing 2020-05-07 09:37:15 +01:00
ges-extractable.c ges: support test clips assets natural size/framerate 2020-03-25 11:26:29 -03:00
ges-extractable.h ges: support test clips assets natural size/framerate 2020-03-25 11:26:29 -03:00
ges-formatter.c ges: Output otio formatter loading issues in debug logs 2020-05-06 16:11:58 +00:00
ges-formatter.h ges: Use #pragma once everywhere 2020-03-19 21:09:18 +00:00
ges-gerror.h ges: Add APIs to have a sens of frame numbers 2020-03-25 11:26:29 -03:00
ges-group.c timeline-tree: simplify and fix editing 2020-05-07 09:37:15 +01:00
ges-group.h ges: Use #pragma once everywhere 2020-03-19 21:09:18 +00:00
ges-image-source.c ges: Place imagefreeze at right place 2020-04-13 11:56:46 +00:00
ges-image-source.h ges: Use #pragma once everywhere 2020-03-19 21:09:18 +00:00
ges-internal.h timeline-tree: simplify and fix editing 2020-05-07 09:37:15 +01:00
ges-layer.c clip: secure adding clip to layer 2020-04-08 14:35:28 +01:00
ges-layer.h formatter: Serialize source properties 2020-03-25 15:40:25 -03:00
ges-marker-list.c Don't pass default GLib marshallers for signals 2019-10-24 15:19:09 +02:00
ges-marker-list.h ges: Use #pragma once everywhere 2020-03-19 21:09:18 +00:00
ges-meta-container.c docs: update GESMetaContainer 2020-03-05 17:04:51 -03:00
ges-meta-container.h ges: Use #pragma once everywhere 2020-03-19 21:09:18 +00:00
ges-multi-file-source.c ges: Deprecate GESImageSource and GESMultiFileSource 2020-03-30 06:54:22 -03:00
ges-multi-file-source.h ges: Use #pragma once everywhere 2020-03-19 21:09:18 +00:00
ges-operation-clip.c WIP: ges: fix API export/import and 'inconsistent linkage' on MSVC 2018-12-15 00:14:51 +00:00
ges-operation-clip.h ges: Use #pragma once everywhere 2020-03-19 21:09:18 +00:00
ges-operation.c ges: Cleanup the way we declare object types 2020-03-19 21:09:18 +00:00
ges-operation.h ges: Use #pragma once everywhere 2020-03-19 21:09:18 +00:00
ges-overlay-clip.c WIP: ges: fix API export/import and 'inconsistent linkage' on MSVC 2018-12-15 00:14:51 +00:00
ges-overlay-clip.h ges: Use #pragma once everywhere 2020-03-19 21:09:18 +00:00
ges-pipeline.c pipeline: don't link tracks unnecessarily 2020-03-05 17:04:51 -03:00
ges-pipeline.h ges: Use #pragma once everywhere 2020-03-19 21:09:18 +00:00
ges-pitivi-formatter.c ges: Always check return value of ges_container_add 2020-04-10 11:12:12 -04:00
ges-pitivi-formatter.h ges: Use #pragma once everywhere 2020-03-19 21:09:18 +00:00
ges-prelude.h ges: Use #pragma once everywhere 2020-03-19 21:09:18 +00:00
ges-project.c asset: Avoid dereferencing NULL pointer 2020-04-10 11:12:12 -04:00
ges-project.h ges: Use #pragma once everywhere 2020-03-19 21:09:18 +00:00
ges-screenshot.c ges: Deprecate ges_play_sink_convert_frame 2019-05-13 17:00:00 -04:00
ges-screenshot.h ges: Use #pragma once everywhere 2020-03-19 21:09:18 +00:00
ges-smart-adder.c WIP: ges: fix API export/import and 'inconsistent linkage' on MSVC 2018-12-15 00:14:51 +00:00
ges-smart-adder.h ges: Use #pragma once everywhere 2020-03-19 21:09:18 +00:00
ges-smart-video-mixer.c ges: Cleanup the way we declare object types 2020-03-19 21:09:18 +00:00
ges-smart-video-mixer.h ges: Use #pragma once everywhere 2020-03-19 21:09:18 +00:00
ges-source-clip-asset.c ges: Update documentation 2020-04-09 10:10:09 -04:00
ges-source-clip-asset.h ges: Add a SourceClipAsset class 2020-03-25 11:26:29 -03:00
ges-source-clip.c ges: Add a SourceClipAsset class 2020-03-25 11:26:29 -03:00
ges-source-clip.h ges: Use #pragma once everywhere 2020-03-19 21:09:18 +00:00
ges-source.c ges: Add a timeoverlay to video test sources 2020-03-25 11:26:29 -03:00
ges-source.h ges: Use #pragma once everywhere 2020-03-19 21:09:18 +00:00
ges-structure-parser.c ges: support test clips assets natural size/framerate 2020-03-25 11:26:29 -03:00
ges-structure-parser.h ges: Use #pragma once everywhere 2020-03-19 21:09:18 +00:00
ges-structured-interface.c structured-interface: Properly check that setting keyframe works 2020-04-10 11:12:12 -04:00
ges-structured-interface.h ges: Use #pragma once everywhere 2020-03-19 21:09:18 +00:00
ges-test-clip.c ges: Add a SourceClipAsset class 2020-03-25 11:26:29 -03:00
ges-test-clip.h ges: Use #pragma once everywhere 2020-03-19 21:09:18 +00:00
ges-text-overlay-clip.c WIP: ges: fix API export/import and 'inconsistent linkage' on MSVC 2018-12-15 00:14:51 +00:00
ges-text-overlay-clip.h ges: Use #pragma once everywhere 2020-03-19 21:09:18 +00:00
ges-text-overlay.c ges: Use assets to instantiate track elements/group 2020-03-27 17:17:23 -03:00
ges-text-overlay.h ges: Use assets to instantiate track elements/group 2020-03-27 17:17:23 -03:00
ges-timeline-element.c timeline-tree: simplify and fix editing 2020-05-07 09:37:15 +01:00
ges-timeline-element.h ges: Add API to retrieve the natural framerate of an element 2020-03-25 11:26:27 -03:00
ges-timeline-tree.c timeline-tree: simplify and fix editing 2020-05-07 09:37:15 +01:00
ges-timeline-tree.h timeline-tree: simplify and fix editing 2020-05-07 09:37:15 +01:00
ges-timeline.c timeline-tree: simplify and fix editing 2020-05-07 09:37:15 +01:00
ges-timeline.h ges: Add APIs to have a sens of frame numbers 2020-03-25 11:26:29 -03:00
ges-title-clip.c track-element: add has-internal-source property 2020-03-16 14:19:52 +00:00
ges-title-clip.h ges: Use #pragma once everywhere 2020-03-19 21:09:18 +00:00
ges-title-source.c ges: Update documentation 2020-04-09 10:10:09 -04:00
ges-title-source.h ges: Update documentation 2020-04-09 10:10:09 -04:00
ges-track-element-asset.c ges: Add API to retrieve the natural framerate of an element 2020-03-25 11:26:27 -03:00
ges-track-element-asset.h ges: Add API to retrieve the natural framerate of an element 2020-03-25 11:26:27 -03:00
ges-track-element-deprecated.h ges: Use G_DEPRECATE to mark deprecated methods 2019-12-18 15:48:23 -03:00
ges-track-element.c nleobject: stop using media-duration-factor 2020-04-29 12:32:52 +00:00
ges-track-element.h ges: Use assets to instantiate track elements/group 2020-03-27 17:17:23 -03:00
ges-track.c timeline-tree: simplify and fix editing 2020-05-07 09:37:15 +01:00
ges-track.h ges: Use #pragma once everywhere 2020-03-19 21:09:18 +00:00
ges-transition-clip.c ges: Rework the way we ensure core elements are not wrongly moved between clips 2020-04-08 14:35:28 +01:00
ges-transition-clip.h ges: Update documentation 2020-04-09 10:10:09 -04:00
ges-transition.c ges: Cleanup the way we declare object types 2020-03-19 21:09:18 +00:00
ges-transition.h ges: Use #pragma once everywhere 2020-03-19 21:09:18 +00:00
ges-types.h ges: Update documentation 2020-04-09 10:10:09 -04:00
ges-uri-asset.c ges: Update documentation 2020-04-09 10:10:09 -04:00
ges-uri-asset.h ges: Update documentation 2020-04-09 10:10:09 -04:00
ges-uri-clip.c uri-clip: use duration-limit in set_max_duration 2020-05-07 09:37:15 +01:00
ges-uri-clip.h ges: Use #pragma once everywhere 2020-03-19 21:09:18 +00:00
ges-utils.c ges: Add APIs to have a sens of frame numbers 2020-03-25 11:26:29 -03:00
ges-utils.h ges: Use #pragma once everywhere 2020-03-19 21:09:18 +00:00
ges-validate.c validate: Avoid dereferencing NULL pointer 2020-04-10 11:12:12 -04:00
ges-version.h.in ges: Use #pragma once everywhere 2020-03-19 21:09:18 +00:00
ges-video-source.c ges: Fix interlaced stream playback 2020-04-17 13:24:45 -04:00
ges-video-source.h ges: Deprecate GESImageSource and GESMultiFileSource 2020-03-30 06:54:22 -03:00
ges-video-test-source.c ges: Fix sending EOS on testclip when using timeoverlay 2020-04-09 10:10:09 -04:00
ges-video-test-source.h ges: Update documentation 2020-04-09 10:10:09 -04:00
ges-video-track.c docs: update GESAudioTrack and GESVideoTrack 2020-03-05 17:04:51 -03:00
ges-video-track.h ges: Use #pragma once everywhere 2020-03-19 21:09:18 +00:00
ges-video-transition.c ges: Use assets to instantiate track elements/group 2020-03-27 17:17:23 -03:00
ges-video-transition.h ges: Use assets to instantiate track elements/group 2020-03-27 17:17:23 -03:00
ges-video-uri-source.c ges: Fix interlaced stream playback 2020-04-17 13:24:45 -04:00
ges-video-uri-source.h ges: Update documentation 2020-04-09 10:10:09 -04:00
ges-xml-formatter.c formatter: Serialize source properties 2020-03-25 15:40:25 -03:00
ges-xml-formatter.h ges: Use #pragma once everywhere 2020-03-19 21:09:18 +00:00
ges.c ges: Hide internal debug category behind a GOnce 2019-10-02 08:52:57 +03:00
ges.h ges: Use #pragma once everywhere 2020-03-19 21:09:18 +00:00
ges.resource Implement a formatter based on [OpenTimelineIO] 2019-07-26 13:48:51 -04:00
gesmarshal.list add object-moved signal to simple timeline layer 2010-09-02 18:08:43 +02:00
gstframepositioner.c framepositioner: Fix some source repositionning rounding issues 2020-04-16 21:52:52 -04:00
gstframepositioner.h framepositioner: Fix some source repositionning rounding issues 2020-04-16 21:52:52 -04:00
meson.build ges: Add a SourceClipAsset class 2020-03-25 11:26:29 -03:00
parse.l ges-launcher: Add support for titles 2018-03-30 18:30:33 -03:00