Commit graph

3302 commits

Author SHA1 Message Date
Henry Wilkes 449bc935f1 clip: add methods to convert between time coordinates
Add methods to convert between the timeline time coordinates and the
internal time coordinates of a track element in a clip, taking time
effects into account.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/177>
2020-05-25 11:20:38 +01:00
Henry Wilkes 571120dcfb effect: Add support for time effects
Allow the user to register a child property of a base effect as a time
property. This can be used by GES to correctly calculate the
duration-limit of a clip when it has time effects on it. The existing
ges_effect_class_register_rate_property is now used to automatically
register such time effects for rate effects.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/177>
2020-05-22 19:16:04 +01:00
Henry Wilkes 142456d8ba errors: added edit errors
Added more errors to GES_ERROR for when edits fail (other than
programming or usage errors). Also promoted some GST messages if they
related to a usage error.

Also added explanation of timeline overlap rules in user docs.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/177>
2020-05-22 19:15:57 +01:00
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 5316fc8d62 docs: Remove reference to deinterlacing props in title and video test source
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/175>
2020-05-19 13:27:13 +00:00
Thibault Saunier 8258d56a13 validate: Fix setting ges properties
And fix typos.

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
Thibault Saunier b79e5e3508 nlecomposition: Add stack initialization action after setting our state
Otherwise there is a pretty rare race where we get the
_initialize_stack_func executed leading to the stack set up and
the source pushing buffers before the composition source pad is
activated, and a STREAM_ERROR is reported as we end up pushing a
buffer to a flushing pad.

Thanks rr chaos mode for showing that improbable race

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/175>
2020-05-19 13:27:13 +00:00
Thibault Saunier 56544604bc timeline: No thread checking while disposing
While this is not correct, we can't predict from what thread a
GstElement will be disposed as it might still be referenced by
a GstMessage somewhere which is freed by, any thread.

In this specific case we can assume that GES user will already have
let go his timeline reference and we should not avoid assert in that
specific case as it should be safe to let the timeline be destroyed
at that point.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/175>
2020-05-19 13:27:13 +00:00
Thibault Saunier 5f420edc69 nle: Use G_PARAM_DEPRECATED for media-duration-factor
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/175>
2020-05-19 13:27:13 +00:00
Thibault Saunier cb02c15d57 ges: Ensure that assets are added to project before adding clip to timeline
It is the right ordering and in Pitivi we set the project size
when adding the first (relevant) asset, meaning that our code to
reposition clips would kick in (in the unit tests) if we do not respect
that ordering.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/176>
2020-05-18 12:19:22 -04:00
Henry Wilkes e89411527a track-element: Add is_core method to API
Open up the method to the user, since they may need the information.
Also added more documentation on what a core track element is to a clip
and how they are treated.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/169>
2020-05-13 12:57:10 +01:00
Henry Wilkes 9161c2efcb asset: unref requested assets
Prevent a few memory leaks in the tests.

Also mark ges_project_save as transfer full for the formatter asset.

Also make sure that ges_project_request_sync is transfer full on the
returned asset.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/169>
2020-05-07 10:06:52 +01:00
Henry Wilkes 0fab5f45cb clip: enforce duration-limit
Prevent setting of properties or that of children, if the clip would not
be able to set the corresponding duration if the duration-limit would
drop below the currently set duration.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/169>
2020-05-07 10:06:52 +01:00
Henry Wilkes fd353705b9 clip: make sure core child is active for non-core in same track
Each active non-core child must have a corresponding active core child
in the same track. Therefore, if we de-activate a core child, we also
need to de-activate all the non-core children in the same track.
Similarly, if we activate a non-core child, we need to activate the
corresponding core child as well.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/169>
2020-05-07 09:37:15 +01:00
Henry Wilkes 5159d367e2 clip: be more robust in handling priority
Make less assumptions about the priority of effects and core elements so
that the code would still work if the priority of an element was set
directly. In particular, the index of a top effect will always be its
position in the effect ordering.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/169>
2020-05-07 09:37:15 +01:00
Henry Wilkes 52c22efea6 container: stop storing priority offset in child mapping
GESGroup no longer uses this, and GESClip can be made simpler without
it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/169>
2020-05-07 09:37:15 +01:00
Henry Wilkes 0a3da79e97 clip: preserve auto-transition in split
When splitting a clip, keep the auto-transition at the end of the clip
alive and move its source to that of the corresponding split track
element.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/169>
2020-05-07 09:37:15 +01:00
Henry Wilkes 5c546c6fe7 clip: change order of split
We first change the duration of the splitted clip, then we add the new
clip to the layer and assign the tracks for its children. Normally, when
a clip is added to a layer it will have its track elements created, if
needed, and then assigned to their tracks. This will fail if any sources
would fully or triple overlap existing sources in the same track.

However, here we were adding the clip to the layer *and* avoiding the
track assignment process and instead setting the tracks explicitly. In
particular, the order was:

+ add new clip to layer with no tracks assigned
+ shrink the split clip
+ assign the tracks for the new clip

This has been changed to:

+ shrink the split clip
+ add new clip to layer with no tracks assigned
+ assign the tracks for the new clip

Thus, the order of events for any users connecting to object signals
will be close to that of adding another clip to the layer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/169>
2020-05-07 09:37:15 +01:00
Henry Wilkes a4cfa6d1e1 timeline: create auto-transitions during track-element-added
Any time a track element is added to a track, we need to check whether
we need to create a new corresponding auto-transition. This simply moves
the code from ges-clip.c to ges-timeline.c, where it is more appropriate.

Moreover, it technically opens the possibility for creating
auto-transitions for track elements in the timeline that have no
corresponding clip.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/169>
2020-05-07 09:37:15 +01:00
Henry Wilkes b00c01ded7 timeline-tree: also trim non-core track elements
Also trim the in-point of non-core children of clips to ensure that
their content will appear in the timeline at the same position.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/169>
2020-05-07 09:37:15 +01:00
Henry Wilkes faa9d3990b timeline: make sure appended layer has lowest priority
Make sure that the priority of an appended layer is the lowest (highest
in value) when appending a layer to the timeline. This change is
important when appending a layer to a timeline, which can easily have a
gap in priorities if a layer has been removed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/169>
2020-05-07 09:37:15 +01:00
Henry Wilkes 1cd72ed771 tests: add tests for new editing behaviour
These tests expose some of the new editing behaviour in timeline
tree. In particular, we test:
+ edits for clips within groups within a group
+ that an edit can succeed if a snap allows it to
+ that snapping occurs at a specific point, and that we alternate
  between one call to snapping-started and one call to snapping-ended
  with corresponding values
+ that an edit can fail if a snap causes it to
+ no snapping is released when an edit fails
+ We tests for the expected changes, and otherwise check that the
  configuration of the timeline has remained unchanged
+ The timeline configuration remains the same when an edit fails
+ That each clip overlap has a corresponding auto-transition
+ That particular auto-transitions are created when a new overlap is
  formed
+ That particular auto-transitions are destroyed when an overlap ends
+ That auto-transitions are not replaced when two clips move but
  maintain their overlap
+ That the timeline does not contain any unaccounted for clips

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/169>
2020-05-07 09:37:15 +01:00
Henry Wilkes 36223e25b9 layer: don't set timeline when moving clip
If a clip is moving we should not unset its timeline when it is removed
from the layer. Logic has been moved to ges_timeline_add_clip and
ges_timeline_remove_clip.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/169>
2020-05-07 09:37:15 +01:00
Henry Wilkes 343e8581f2 timeline-tree: freeze auto-transitions whilst editing
Freeze the auto-tranistions so they do not destroy themselves during an
edit. Once complete the auto-transitions can move themselves back into
position, or remove themselves if their sources are no longer
overlapping.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/169>
2020-05-07 09:37:15 +01:00
Henry Wilkes 30a821e136 clip: make auto-transitions less expensive when adding to track
Only check the overlaps with the actual track element that was just added
to the track. This reduces the tree traversal by one order.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/169>
2020-05-07 09:37:15 +01:00
Henry Wilkes cdac205db6 clip: remove children if failed to add to layer
If adding to a layer fails during ges_timeline_add_clip, any new children
that were created during this process should be removed from the clip to
put it back into its previous state.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/169>
2020-05-07 09:37:15 +01:00
Henry Wilkes fba267926f group: let timeline-tree handle layer priority
Since a group can only have its priority set whilst it is part of a
timeline, we can simply let the timeline-tree handle the move, which it
can already do, whilst checking that the move would be legal (not break
the timeline configuration). All the group has to do now if update its
priority value if the priority of any of its children changes. It
doesn't even need to keep track of the layer priority offsets.

Also, added a check to ensure added children belong to the same
timeline.

Also moved the sigids from the GObject data to a g_hash_table, which is
clearer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/169>
2020-05-07 09:37:15 +01:00
Henry Wilkes aefc992ef1 timeline-element: stop using edit vmethods
These were all redirecting to essentially ges_timeline_element_edit
anyway.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/169>
2020-05-07 09:37:15 +01:00
Henry Wilkes bac0df294e timeline-element: simplify check for being edited
It should be sufficient to set the edit flag only on the toplevel, which
allows all of its children to know they are being edited and should not
move in response.

Also, removed some unnecessary setting/checking of this.

Also, supplied the ges_timeline_element_peak_toplevel, which unlike
ges_timeline_element_get_toplevel_parent, does not add a reference to
the toplevel. Some corresponding leaks in auto-transition have been
fixed by using this instead.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/169>
2020-05-07 09:37:15 +01:00
Henry Wilkes cda1cfa0df timeline: emit snapping-started with new valid time
Only emit snapping-ended if we have a valid snap time. Moreover, we
should emit a new snapping-started even if we are snapping at the same
location. This is because a new snap will always correspond to a new edit,
possibly involving different snapping elements, which a user would want
to know about.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/169>
2020-05-07 09:37:15 +01: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
Henry Wilkes a6b13ce619 group: fix priority setting
Stop moving the group if a child clip is being edited by timeline-tree,
a child group is updating its own priority, or a layer that a clip is in
has changed priority. A group should only move if a descendant moves
layers outside of a timeline-tree edit, or the priority of the group is
set by the user.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/169>
2020-05-07 09:37:15 +01:00
Henry Wilkes 6617d76710 container: keep start and duration up to date
Simplified keeping the start and the duration of a container/group up to
date with the earliest start of the children and the last end of the
children. The previous logic was spread between ges-group and
ges-container, now all the position handling is in ges-container.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/169>
2020-05-07 09:37:15 +01:00
Henry Wilkes 5e144d9ade uri-clip: use duration-limit in set_max_duration
Use the duration-limit rather than max-duration - in-point, since the
former will be able to take other factors, such as effects, into
account.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/169>
2020-05-07 09:37:15 +01:00
Henry Wilkes 4b62749336 clip: add the duration-limit property
The duration-limit is the maximum duration that can be set for the clip
given its current children and their properties. If a change in the
children properties causes this to drop below the current duration, it
is automatically capped by this limit.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/169>
2020-05-07 09:37:15 +01:00
Thibault Saunier 154816365f ges: Output otio formatter loading issues in debug logs
Instead of spamming the terminal with a python traceback

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/173>
2020-05-06 16:11:58 +00: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 f5cb409266 test: Add support for .validatetest in the launcher app 2020-05-02 05:24:53 +00:00
Henry Wilkes 00a9825ffb container: return TRUE if adding doesn't cause any errors
If `add_child` and `set_parent` succeed we want to return TRUE, even if
the added element is no longer a child by the end of the method. This is
because some users may call ges_container_remove during `child-added`.
This shouldn't be considered an error.
2020-05-01 14:26:32 +01: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 b283b3b544 plugin: Fix a race removing tracks from timeline from the wrong thread
The case was that the timeline state was being changed from the parent
composition's action thread before the timeline was committed, leading
to the SELECT_STREAM event to be pushed from the track to the nested
timeline from the wrong composition thread.

```
**
GES:ERROR:../subprojects/gst-editing-services/ges/ges-track.c:1263:ges_track_remove_element: assertion failed: (track->priv->valid_thread == g_thread_self())
Bail out! GES:ERROR:../subprojects/gst-editing-services/ges/ges-track.c:1263:ges_track_remove_element: assertion failed: (track->priv->valid_thread == g_thread_self())

   Thread 1 (Thread 0x7f6ec2d43700 (LWP 1228982)):
   #0  0x00007f6ed85b2a25 in raise () at /lib64/libc.so.6
   #1  0x00007f6ed859b895 in abort () at /lib64/libc.so.6
   #2  0x00007f6ed899cb8c in g_assertion_message (domain=<optimized out>, file=0x7f6ed8d7fd58 "../subprojects/gst-editing-services/ges/ges-track.c", line=<optimized out>, func=<optimized out>, message=<optimized out>) at ../glib/gtestutils.c:2914
   #3  0x00007f6ed89fa9ff in g_assertion_message_expr (domain=domain@entry=0x7f6ed8d76875 "GES", file=file@entry=0x7f6ed8d7fd58 "../subprojects/gst-editing-services/ges/ges-track.c", line=line@entry=1263, func=func@entry=0x7f6ed8d805b0 <__func__.6> "ges_track_remove_element", expr=expr@entry=0x7f6ed8d801e8 "track->priv->valid_thread == g_thread_self()") at ../glib/gtestutils.c:2940
   #4  0x00007f6ed8d2658f in ges_track_remove_element (track=track@entry=0x7f6eb4119b20 [GESAudioTrack], object=object@entry=0x106f240 [GESAudioUriSource]) at ../subprojects/gst-editing-services/ges/ges-track.c:1263
   #5  0x00007f6ed8d10842 in ges_clip_empty_from_track (clip=0x7f6e7803ee80 [GESUriClip], track=track@entry=0x7f6eb4119b20 [GESAudioTrack]) at ../subprojects/gst-editing-services/ges/ges-clip.c:1086
   #6  0x00007f6ed8d01453 in ges_timeline_remove_track (timeline=timeline@entry=0x7f6e6c01ae50 [GESTimeline], track=0x7f6eb4119b20 [GESAudioTrack]) at ../subprojects/gst-editing-services/ges/ges-timeline.c:2460
   #7  0x00007f6ed8d0286b in ges_timeline_send_event (element=<optimized out>, event=<optimized out>) at ../subprojects/gst-editing-services/ges/ges-timeline.c:484
   #8  0x00007f6ed8bf466c in gst_element_send_event (element=0x7f6e6c01ae50 [GESTimeline], event=event@entry=0x7f6eb410f9f0) at ../subprojects/gstreamer/gst/gstelement.c:1934
   #9  0x00007f6ed8d242cd in ges_track_handle_message (bin=0xd846f0 [GESVideoTrack], message=0x7f6eb411ac90) at ../subprojects/gst-editing-services/ges/ges-track.c:477
   #10 0x00007f6ed8bc9128 in bin_bus_handler (bus=<optimized out>, message=<optimized out>, bin=<optimized out>) at ../subprojects/gstreamer/gst/gstbin.c:3286
   #11 0x00007f6ed8bdbae2 in gst_bus_post (bus=bus@entry=0xfdf440 [GstBus], message=message@entry=0x7f6eb411ac90) at ../subprojects/gstreamer/gst/gstbus.c:359
   #12 0x00007f6ed8bf1396 in gst_element_post_message_default (element=element@entry=0x10261d0 [NleComposition], message=0x7f6eb411ac90) at ../subprojects/gstreamer/gst/gstelement.c:2067
   #13 0x00007f6ed8bccbee in gst_bin_post_message (element=0x10261d0 [NleComposition], msg=0x7f6eb411ac90) at ../subprojects/gstreamer/gst/gstmessage.h:376
   #14 0x00007f6ed8bf4b66 in gst_element_post_message (element=0x10261d0 [NleComposition], message=0x7f6eb411ac90) at ../subprojects/gstreamer/gst/gstelement.c:2110
   #15 0x00007f6ed8bc9128 in bin_bus_handler (bus=<optimized out>, message=<optimized out>, bin=<optimized out>) at ../subprojects/gstreamer/gst/gstbin.c:3286
   #16 0x00007f6ed8bdbae2 in gst_bus_post (bus=bus@entry=0xfdf2c0 [GstBus], message=message@entry=0x7f6eb411ac90) at ../subprojects/gstreamer/gst/gstbus.c:359
   #17 0x00007f6ed8bf1396 in gst_element_post_message_default (element=element@entry=0x1029110 [GstBin], message=0x7f6eb411ac90) at ../subprojects/gstreamer/gst/gstelement.c:2067
   #18 0x00007f6ed8bccbee in gst_bin_post_message (element=0x1029110 [GstBin], msg=0x7f6eb411ac90) at ../subprojects/gstreamer/gst/gstmessage.h:376
   #19 0x00007f6ed8bf4b66 in gst_element_post_message (element=0x1029110 [GstBin], message=0x7f6eb411ac90) at ../subprojects/gstreamer/gst/gstelement.c:2110
   #20 0x00007f6ed8bc9128 in bin_bus_handler (bus=<optimized out>, message=<optimized out>, bin=<optimized out>) at ../subprojects/gstreamer/gst/gstbin.c:3286
   #21 0x00007f6ed8bdbae2 in gst_bus_post (bus=bus@entry=0xfdf500 [GstBus], message=message@entry=0x7f6eb411ac90) at ../subprojects/gstreamer/gst/gstbus.c:359
   #22 0x00007f6ed8bf1396 in gst_element_post_message_default (element=element@entry=0xd705e0 [NleSource], message=0x7f6eb411ac90) at ../subprojects/gstreamer/gst/gstelement.c:2067
   #23 0x00007f6ed8bccbee in gst_bin_post_message (element=0xd705e0 [NleSource], msg=0x7f6eb411ac90) at ../subprojects/gstreamer/gst/gstmessage.h:376
   #24 0x00007f6ed8bf4b66 in gst_element_post_message (element=0xd705e0 [NleSource], message=0x7f6eb411ac90) at ../subprojects/gstreamer/gst/gstelement.c:2110
   #25 0x00007f6ed8bc9128 in bin_bus_handler (bus=<optimized out>, message=<optimized out>, bin=<optimized out>) at ../subprojects/gstreamer/gst/gstbin.c:3286
   #26 0x00007f6ed8bdbae2 in gst_bus_post (bus=bus@entry=0x1042400 [GstBus], message=message@entry=0x7f6eb411ac90) at ../subprojects/gstreamer/gst/gstbus.c:359
   #27 0x00007f6ed8bf1396 in gst_element_post_message_default (element=element@entry=0x1029450 [GstBin], message=0x7f6eb411ac90) at ../subprojects/gstreamer/gst/gstelement.c:2067
   #28 0x00007f6ed8bccbee in gst_bin_post_message (element=0x1029450 [GstBin], msg=0x7f6eb411ac90) at ../subprojects/gstreamer/gst/gstmessage.h:376
   #29 0x00007f6ed8bf4b66 in gst_element_post_message (element=0x1029450 [GstBin], message=0x7f6eb411ac90) at ../subprojects/gstreamer/gst/gstelement.c:2110
   #30 0x00007f6ed8bc9128 in bin_bus_handler (bus=<optimized out>, message=<optimized out>, bin=<optimized out>) at ../subprojects/gstreamer/gst/gstbin.c:3286
   #31 0x00007f6ed8bdbae2 in gst_bus_post (bus=bus@entry=0x1042640 [GstBus], message=message@entry=0x7f6eb411ac90) at ../subprojects/gstreamer/gst/gstbus.c:359
   #32 0x00007f6ed8bf1396 in gst_element_post_message_default (element=element@entry=0x7f6eb42fc7a0 [GstURIDecodeBin], message=0x7f6eb411ac90) at ../subprojects/gstreamer/gst/gstelement.c:2067
   #33 0x00007f6ed8bccbee in gst_bin_post_message (element=0x7f6eb42fc7a0 [GstURIDecodeBin], msg=0x7f6eb411ac90) at ../subprojects/gstreamer/gst/gstmessage.h:376
   #34 0x00007f6ed8bf4b66 in gst_element_post_message (element=0x7f6eb42fc7a0 [GstURIDecodeBin], message=0x7f6eb411ac90) at ../subprojects/gstreamer/gst/gstelement.c:2110
   #35 0x00007f6ed8bc9128 in bin_bus_handler (bus=<optimized out>, message=<optimized out>, bin=<optimized out>) at ../subprojects/gstreamer/gst/gstbin.c:3286
   #36 0x00007f6ed8bdbae2 in gst_bus_post (bus=bus@entry=0x7f6eb80a7130 [GstBus], message=message@entry=0x7f6eb411ac90) at ../subprojects/gstreamer/gst/gstbus.c:359
   #37 0x00007f6ed8bf1396 in gst_element_post_message_default (element=element@entry=0x7f6e6c02aa60 [GstDecodeBin], message=0x7f6eb411ac90) at ../subprojects/gstreamer/gst/gstelement.c:2067
   #38 0x00007f6ed8bccbee in gst_bin_post_message (element=0x7f6e6c02aa60 [GstDecodeBin], msg=0x7f6eb411ac90) at ../subprojects/gstreamer/gst/gstmessage.h:376
   #39 0x00007f6ed8bf4b66 in gst_element_post_message (element=0x7f6e6c02aa60 [GstDecodeBin], message=0x7f6eb411ac90) at ../subprojects/gstreamer/gst/gstelement.c:2110
   #40 0x00007f6ec8f1e00d in gst_decode_bin_handle_message (bin=0x7f6e6c02aa60 [GstDecodeBin], msg=<optimized out>) at ../subprojects/gst-plugins-base/gst/playback/gstdecodebin2.c:5667
   #41 0x00007f6ed8bc9128 in bin_bus_handler (bus=<optimized out>, message=<optimized out>, bin=<optimized out>) at ../subprojects/gstreamer/gst/gstbin.c:3286
   #42 0x00007f6ed8bdbae2 in gst_bus_post (bus=bus@entry=0x7f6eb4139110 [GstBus], message=message@entry=0x7f6eb411ac90) at ../subprojects/gstreamer/gst/gstbus.c:359
   #43 0x00007f6ed8bf1396 in gst_element_post_message_default (element=element@entry=0x7f6e54038c70 [GESDemux], message=0x7f6eb411ac90) at ../subprojects/gstreamer/gst/gstelement.c:2067
   #44 0x00007f6ed8bccbee in gst_bin_post_message (element=0x7f6e54038c70 [GESDemux], msg=0x7f6eb411ac90) at ../subprojects/gstreamer/gst/gstmessage.h:376
   #45 0x00007f6ed8bf4b66 in gst_element_post_message (element=0x7f6e54038c70 [GESDemux], message=0x7f6eb411ac90) at ../subprojects/gstreamer/gst/gstelement.c:2110
   #46 0x00007f6ed8bc9128 in bin_bus_handler (bus=<optimized out>, message=<optimized out>, bin=<optimized out>) at ../subprojects/gstreamer/gst/gstbin.c:3286
   #47 0x00007f6ed8bdbae2 in gst_bus_post (bus=bus@entry=0x7f6eb4139350 [GstBus], message=message@entry=0x7f6eb411ac90) at ../subprojects/gstreamer/gst/gstbus.c:359
   #48 0x00007f6ed8bf1396 in gst_element_post_message_default (element=element@entry=0x7f6e6c01ae50 [GESTimeline], message=0x7f6eb411ac90) at ../subprojects/gstreamer/gst/gstelement.c:2067
   #49 0x00007f6ed8bccbee in gst_bin_post_message (element=0x7f6e6c01ae50 [GESTimeline], msg=0x7f6eb411ac90) at ../subprojects/gstreamer/gst/gstmessage.h:376
   #50 0x00007f6ed8bf4b66 in gst_element_post_message (element=element@entry=0x7f6e6c01ae50 [GESTimeline], message=0x7f6eb411ac90) at ../subprojects/gstreamer/gst/gstelement.c:2110
   #51 0x00007f6ed8cfa221 in ges_timeline_change_state (element=0x7f6e6c01ae50 [GESTimeline], transition=GST_STATE_CHANGE_READY_TO_PAUSED) at ../subprojects/gst-editing-services/ges/ges-timeline.c:450
   #52 0x00007f6ed8bf5d1e in gst_element_change_state (element=element@entry=0x7f6e6c01ae50 [GESTimeline], transition=GST_STATE_CHANGE_READY_TO_PAUSED) at ../subprojects/gstreamer/gst/gstelement.c:3033
   #53 0x00007f6ed8bf6868 in gst_element_continue_state (element=element@entry=0x7f6e6c01ae50 [GESTimeline], ret=ret@entry=GST_STATE_CHANGE_SUCCESS) at ../subprojects/gstreamer/gst/gstelement.c:2741
   #54 0x00007f6ed8bf5d67 in gst_element_change_state (element=element@entry=0x7f6e6c01ae50 [GESTimeline], transition=transition@entry=GST_STATE_CHANGE_NULL_TO_READY) at ../subprojects/gstreamer/gst/gstelement.c:3072
   #55 0x00007f6ed8bf6368 in gst_element_set_state_func (element=0x7f6e6c01ae50 [GESTimeline], state=GST_STATE_PAUSED) at ../subprojects/gstreamer/gst/gstelement.c:2987
   #56 0x00007f6ed8bd2129 in gst_bin_element_set_state (next=GST_STATE_PAUSED, current=GST_STATE_PAUSED, start_time=0, base_time=0, element=0x7f6e6c01ae50 [GESTimeline], bin=0x7f6e54038c70 [GESDemux]) at ../subprojects/gstreamer/gst/gstbin.c:2615
   #57 gst_bin_change_state_func (element=0x7f6e54038c70 [GESDemux], transition=GST_STATE_CHANGE_PAUSED_TO_PAUSED) at ../subprojects/gstreamer/gst/gstbin.c:2957
   #58 0x00007f6ed8bf5d1e in gst_element_change_state (element=element@entry=0x7f6e54038c70 [GESDemux], transition=transition@entry=GST_STATE_CHANGE_PAUSED_TO_PAUSED) at ../subprojects/gstreamer/gst/gstelement.c:3033
   #59 0x00007f6ed8bf6368 in gst_element_set_state_func (element=0x7f6e54038c70 [GESDemux], state=GST_STATE_PAUSED) at ../subprojects/gstreamer/gst/gstelement.c:2987
   #60 0x00007f6ed8bd2129 in gst_bin_element_set_state (next=GST_STATE_PAUSED, current=GST_STATE_READY, start_time=0, base_time=0, element=0x7f6e54038c70 [GESDemux], bin=0x7f6e6c02aa60 [GstDecodeBin]) at ../subprojects/gstreamer/gst/gstbin.c:2615
   #61 gst_bin_change_state_func (element=0x7f6e6c02aa60 [GstDecodeBin], transition=GST_STATE_CHANGE_READY_TO_PAUSED) at ../subprojects/gstreamer/gst/gstbin.c:2957
   #62 0x00007f6ec8f1e84f in gst_decode_bin_change_state (element=0x7f6e6c02aa60 [GstDecodeBin], transition=GST_STATE_CHANGE_READY_TO_PAUSED) at ../subprojects/gst-plugins-base/gst/playback/gstdecodebin2.c:5482
   #63 0x00007f6ed8bf5d1e in gst_element_change_state (element=element@entry=0x7f6e6c02aa60 [GstDecodeBin], transition=GST_STATE_CHANGE_READY_TO_PAUSED) at ../subprojects/gstreamer/gst/gstelement.c:3033
   #64 0x00007f6ed8bf6868 in gst_element_continue_state (element=element@entry=0x7f6e6c02aa60 [GstDecodeBin], ret=ret@entry=GST_STATE_CHANGE_SUCCESS) at ../subprojects/gstreamer/gst/gstelement.c:2741
   #65 0x00007f6ed8bf5d67 in gst_element_change_state (element=element@entry=0x7f6e6c02aa60 [GstDecodeBin], transition=transition@entry=GST_STATE_CHANGE_NULL_TO_READY) at ../subprojects/gstreamer/gst/gstelement.c:3072
   #66 0x00007f6ed8bf6368 in gst_element_set_state_func (element=0x7f6e6c02aa60 [GstDecodeBin], state=GST_STATE_PAUSED) at ../subprojects/gstreamer/gst/gstelement.c:2987
   #67 0x00007f6ed8bf5ae8 in gst_element_sync_state_with_parent (element=0x7f6e6c02aa60 [GstDecodeBin]) at ../subprojects/gstreamer/gst/gstelement.c:2413
   #68 0x00007f6ed89f17a0 in g_slist_foreach (list=<optimized out>, func=0x7f6ed8bf5a50 <gst_element_sync_state_with_parent>, user_data=user_data@entry=0x0) at ../glib/gslist.c:880
   #69 0x00007f6ec8f37d45 in gst_uri_decode_bin_change_state (element=<optimized out>, transition=<optimized out>) at ../subprojects/gst-plugins-base/gst/playback/gsturidecodebin.c:2869
   #70 0x00007f6ed8bf5d1e in gst_element_change_state (element=element@entry=0x7f6eb42fc7a0 [GstURIDecodeBin], transition=transition@entry=GST_STATE_CHANGE_READY_TO_PAUSED) at ../subprojects/gstreamer/gst/gstelement.c:3033
   #71 0x00007f6ed8bf6368 in gst_element_set_state_func (element=0x7f6eb42fc7a0 [GstURIDecodeBin], state=GST_STATE_PAUSED) at ../subprojects/gstreamer/gst/gstelement.c:2987
   #72 0x00007f6ed8bd2129 in gst_bin_element_set_state (next=GST_STATE_PAUSED, current=GST_STATE_READY, start_time=0, base_time=0, element=0x7f6eb42fc7a0 [GstURIDecodeBin], bin=0x1029450 [GstBin]) at ../subprojects/gstreamer/gst/gstbin.c:2615
   #73 gst_bin_change_state_func (element=0x1029450 [GstBin], transition=GST_STATE_CHANGE_READY_TO_PAUSED) at ../subprojects/gstreamer/gst/gstbin.c:2957
   #74 0x00007f6ed8bf5d1e in gst_element_change_state (element=element@entry=0x1029450 [GstBin], transition=transition@entry=GST_STATE_CHANGE_READY_TO_PAUSED) at ../subprojects/gstreamer/gst/gstelement.c:3033
   #75 0x00007f6ed8bf6368 in gst_element_set_state_func (element=0x1029450 [GstBin], state=GST_STATE_PAUSED) at ../subprojects/gstreamer/gst/gstelement.c:2987
   #76 0x00007f6ed8bd2129 in gst_bin_element_set_state (next=GST_STATE_PAUSED, current=GST_STATE_READY, start_time=0, base_time=0, element=0x1029450 [GstBin], bin=0xd705e0 [NleSource]) at ../subprojects/gstreamer/gst/gstbin.c:2615
   #77 gst_bin_change_state_func (element=0xd705e0 [NleSource], transition=GST_STATE_CHANGE_READY_TO_PAUSED) at ../subprojects/gstreamer/gst/gstbin.c:2957
   #78 0x00007f6ec805533f in nle_object_change_state (element=0xd705e0 [NleSource], transition=GST_STATE_CHANGE_READY_TO_PAUSED) at ../subprojects/gst-editing-services/plugins/nle/nleobject.c:748
   #79 0x00007f6ed8bf5d1e in gst_element_change_state (element=element@entry=0xd705e0 [NleSource], transition=transition@entry=GST_STATE_CHANGE_READY_TO_PAUSED) at ../subprojects/gstreamer/gst/gstelement.c:3033
   #80 0x00007f6ed8bf6368 in gst_element_set_state_func (element=0xd705e0 [NleSource], state=GST_STATE_PAUSED) at ../subprojects/gstreamer/gst/gstelement.c:2987
   #81 0x00007f6ed8bd2129 in gst_bin_element_set_state (next=GST_STATE_PAUSED, current=GST_STATE_READY, start_time=0, base_time=0, element=0xd705e0 [NleSource], bin=0x1029110 [GstBin]) at ../subprojects/gstreamer/gst/gstbin.c:2615
   #82 gst_bin_change_state_func (element=0x1029110 [GstBin], transition=GST_STATE_CHANGE_READY_TO_PAUSED) at ../subprojects/gstreamer/gst/gstbin.c:2957
   #83 0x00007f6ed8bf5d1e in gst_element_change_state (element=element@entry=0x1029110 [GstBin], transition=transition@entry=GST_STATE_CHANGE_READY_TO_PAUSED) at ../subprojects/gstreamer/gst/gstelement.c:3033
   #84 0x00007f6ed8bf6368 in gst_element_set_state_func (element=0x1029110 [GstBin], state=GST_STATE_PAUSED) at ../subprojects/gstreamer/gst/gstelement.c:2987
   #85 0x00007f6ed8bf5ae8 in gst_element_sync_state_with_parent (element=0x1029110 [GstBin]) at ../subprojects/gstreamer/gst/gstelement.c:2413
   #86 0x00007f6ec8060356 in _activate_new_stack (toplevel_seek=<optimized out>, comp=0x10261d0 [NleComposition]) at ../subprojects/gst-editing-services/plugins/nle/nlecomposition.c:3117
   #87 update_pipeline (comp=comp@entry=0x10261d0 [NleComposition], currenttime=<optimized out>, seqnum=<optimized out>, update_reason=update_reason@entry=COMP_UPDATE_STACK_INITIALIZE) at ../subprojects/gst-editing-services/plugins/nle/nlecomposition.c:3396
   #88 0x00007f6ec80614f6 in _initialize_stack_func (comp=0x10261d0 [NleComposition], ucompo=0x108c800) at ../subprojects/gst-editing-services/plugins/nle/nlecomposition.c:732
   #89 0x00007f6ed893788a in g_closure_invoke (closure=<optimized out>, return_value=<optimized out>, n_param_values=<optimized out>, param_values=<optimized out>, invocation_hint=<optimized out>) at ../gobject/gclosure.c:810
   #90 0x00007f6ec805aaf6 in _execute_actions (comp=0x10261d0 [NleComposition]) at ../subprojects/gst-editing-services/plugins/nle/nlecomposition.c:412
   #91 0x00007f6ed8c4c1cf in gst_task_func (task=0x7f6e6c01c290 [GstTask]) at ../subprojects/gstreamer/gst/gsttask.c:328
   #92 0x00007f6ed89fc0f4 in g_thread_pool_thread_proxy (data=<optimized out>) at ../glib/gthreadpool.c:354
   #93 0x00007f6ed89fb7f2 in g_thread_proxy (data=0x7f6eb0017800) at ../glib/gthread.c:807
   #94 0x00007f6ed7e14432 in start_thread () at /lib64/libpthread.so.0
   #95 0x00007f6ed86779d3 in clone () at /lib64/libc.so.6
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/167>
2020-04-30 13:38:34 -04:00
Henry Wilkes f0f7e05cef check: give nle_tempochange test more time
These test can take longer than most under valgrind, so give them a
little more time until they timeout.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/160>
2020-04-29 12:32:52 +00:00
Henry Wilkes 4daa0ecba4 timeline: fix adding track when layers contains clips
Made sure that adding a new track only uses select-tracks-for-object for
core children to determine whether a track elements should be added to the
new track or not, and *not* any other track. In particular, there should
be *no* change in the existing tracks of the timeline when adding another
track. Moreover, a new track should not invoke the creation of track
elements for other tracks.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/160>
2020-04-29 12:32:52 +00:00
Henry Wilkes dc9dbddbae nleobject: stop using media-duration-factor
The property had been deprecated and is unused.

This property is not needed. Any internal time effect that an nleoperation
wraps is itself responsible for converting seek/segment timestamps.
Previously, the ghostpads were performing a rate conversion after the
rate element had already done so, essentially doubling their effect on
seeks and segment times. This was always unnecessary, but went unnoticed
by the tempochange test because it was using an identity element rather
than an actual rate-changing element.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/160>
2020-04-29 12:32:52 +00:00
Henry Wilkes 2794ec836f nleoperation: stop setting next_base_time
This property was unused.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/160>
2020-04-29 12:32:52 +00: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 f30a127776 launch: Add support for testfiles
Making it simpler to define a test in a single files, including the
configuration etc..

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/166>
2020-04-27 17:58:40 -04:00
Thibault Saunier a71b4984f6 track: Do not commit ourselves automatically when changing state from wrong thread
The user is responsible to commit the timeline from the right thread
in that case and in the case of gesdemux, the loaded timeline is filling
gaps automatically when the project is set loaded.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/166>
2020-04-27 17:58:40 -04:00
Andoni Morales Alastruey 4383df86c4 macos: fix python's configure checks 2020-04-18 16:27:18 +02:00