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>
Basically we were advertising that the source size would be the
size of the track if it hadn't been defined by end user, but since
we started to let scaling happen in the compositor, this is not true
as the source size is now the natural size of the underlying video
stream.
Remove the unit test and reimplemented using a validate scenario which
make the test much simpler to read :=)
This is implemented on top of a Tree that represents the whole timeline.
SourceClips can not fully overlap anymore and the tests have been
updated to take that into account. Some new tests were added to verify
that behaviour in greater details
Each timeline element is in a layer (potentially spanning
over several), it is very often useful to retrieve an element
layer priority (from an app perspective more than the element
priority itself as that is a bit of an implementation detail
in the end).
Port tests to it
GstDiscoverer objects were leaked by tests making the leaks detector
unusable.
Introduce ges_deinit(), similiar to gst_deinit(), doing some cleanup
before exiting the process.
https://bugzilla.gnome.org/show_bug.cgi?id=776805
I got some trouble with
arc land
and I wanted to push the 3 commit coming after this revert as 3
different commits but they ended up being all squash into one single
commit, which is clearly not cool for later bisecting and blaming.
Reverting that commit and re pushing those 3 commits as they were
supposed to be.
This reverts commit 9fe15ef435.
For example if the size has been serialized in a file, but the user has
not personalized the size, we want that whenever the restriction caps
change the size, the video should take the size of the track
restriction caps.
We know need to keep track of the current positionner.size even if
setting through caps size changes.
https://bugzilla.gnome.org/show_bug.cgi?id=739527
And fix all the tests as we need to wait for the project to be loaded
to check the reference count of the timeline (as we keep a ref on the
timeline in project to later emit "loaded" on idle).
If you want a custom clip then you have to subclass GESClip,
This class was pre historicall and only used for testing purposes, we
have GESTestClip for that.
https://bugzilla.gnome.org/show_bug.cgi?id=706855
Check if an object rthat has already been freed has been destroyed is not safe.
Add a helper function that uses weak reference to check that objects that are expected
to be destroyed when unrefing an object are actually destroyed.
This exact same method will be needed in GESGroup, so we should have the method
in the common parent class.
API:
- ges_clip_edit
+ ges_container_edit
+ GESContainer->edit vmethod
The GNL API changed to go from a model where user could
enable/disable updates in the composition, which leaded to races
in many places, to a model where any positioning change in the
composition is not directly done but 'cached' and then the user
has to commit those changes so they become effective in the media
processing stack.
The new API in GES is pretty similare and is basically copy
pasting this new design.
We still need to see if in some context it would make sense to add
a mode where we would commit any changes ourself at the end of our
operation for basic use cases.
Removed APIs:
ges_timeline_enable_update
ges_timeline_is_updating
ges_track_enable_update
ges_track_is_updating
New APIs:
ges_track_commit
ges_timeline_commit
+ Fix tests (we still need a round of modernisation, making use of
assets where it makes sense)
There is no reason to use those method outside of GES, so remove them,
cleaning the API and making it easier for users.
Removed APIs:
-----------
* ges_clip_create_track_element
* ges_clip_create_track_elements
Modifies some API:
ges_timeline_object_create_track_objects now take a GESTrackType instead of a
GESTrack as second argument, and return a GList instead of a boolean
ges_timeline_object_create_track_object now take a GESTrackType instead of a
GESTrack as second argument