Commit graph

13 commits

Author SHA1 Message Date
Thibault Saunier
a507f7017e tests: Stop recording gaps in seek_with_stop
We have little control over those as they are generated by streamsynchronizer in a not reproducible way

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/175>
2020-05-19 13:27:13 +00:00
Thibault Saunier
5e448921d8 ges: Move TimeOverlayClip out of GESTestClip
This was complexifying the implementation for very little gain.
Each source type should ideally have its own API.

In that patch we make it so we do not have to subclass anything
but instead use GESAsset to pass information about how the pipeline
should look like.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/175>
2020-05-19 13:27:13 +00:00
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
Thibault Saunier
5c05b4942e tests: Stop recording segment position in seek_with_stop
There are two valid timing in GstAggregator where the segment event
is pushed before GstAggregator sets its srcpad->segment.position in
gst_aggregator_pad_chain_internal. Segment.position is basically
a helper field for internal elements use so we should not require
a specific value here as we are not checking a particular element
behavior.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/174>
2020-05-05 23:12:14 -04:00
Thibault Saunier
7dd6bc4de2 ges:tests: Fix the ignore-fields format in validatetests
They are needed as those are not 100% reproducible with GES.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/168>
2020-04-30 17:44:33 -04:00
Thibault Saunier
7bef18169a nlecomposition: Fix seeking with stop
And add some tests

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/166>
2020-04-28 19:14:26 -04:00
Thibault Saunier
5720ae4f25 framepositioner: Fix some source repositionning rounding issues
Avoid loosing (too much) precision when rescaling back and forth by
storing values in gdoubles.

Handle the fact that position values can be negative

Also fix debug category static variable
as it clashes with the instance variable name in a few methods.
2020-04-16 21:52:52 -04:00
Thibault Saunier
f9f30c4ced ges: Add a way to set layer activeness by track
a.k.a muting layers.

Adding unit tests and making sure serialization works properly
2020-03-25 15:40:25 -03:00
Thibault Saunier
ae6124e282 validate: Add support to seek in frames 2020-03-25 11:26:29 -03:00
Thibault Saunier
e835042f04 ges: Add APIs to have a sens of frame numbers
APIs:
   - ges_timeline_get_frame_time
   - ges_timeline_get_frame_at
   - ges_clip_asset_get_frame_time
   - ges_clip_get_timeline_time_from_source_frame

Extracting ges_util_structure_get_clocktime to internal utilities adding
support for specifying timing values in frames with the special
f<frame-number> synthax.
2020-03-25 11:26:29 -03:00
Thibault Saunier
9cf986c71c framepositioner: Reposition source when the user positioned them
Keeping the same proportion in the size and position and only if
the aspect ratio is conserved.
2020-02-26 13:39:29 -03:00
Thibault Saunier
53637ad749 ges: Properly position video sources in the scene by default
We try to do our best to have the video frames scaled the best way
to fill most space on the final frames, keeping aspect ratio. The user
can later on rescale or move the sources as usual but it makes the
default behaviour a better and more natural especially now that we
set default restriction caps to the video tracks.

And fix the unit test to take that change into account
2020-02-26 13:36:30 -03:00
Thibault Saunier
df6058c802 framepositioner: Stop lying about the source size
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 :=)
2020-02-26 13:36:30 -03:00