Commit graph

2038 commits

Author SHA1 Message Date
Thibault Saunier 50616ad293 build: Add version.h to the headers list
So it is properly installed and the gir contains the required information

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/197>
2020-07-10 08:21:11 -04:00
Thibault Saunier 6938800bc8 pitivi-formatter: Also skip the class 2020-07-09 21:43:33 -04:00
Thibault Saunier 2c30962172 title: Make deprecated symbols visible API
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/195>
2020-07-08 10:03:43 -04:00
Mathieu Duponchelle 734c3ebb0a docs: fix links 2020-06-23 18:37:12 +02:00
Sebastian Dröge 361c638d74 smart-video-mixer: Don't call gst_ghost_pad_construct() anymore
It's deprecated, unneeded and doesn't do anything anymore.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/192>
2020-06-22 12:34:20 +03:00
Thibault Saunier fe49c80c8d ges: Add all missing Since markers from 1.16 onward
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/191>
2020-06-19 11:13:24 -04:00
Thibault Saunier c05f9b1d5e asset: Do not try to update proxies when we are in a proxying loop
This is a regression introduced in
c12b84788d, this commit simply brings back
the previous behavior.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/185>
2020-06-17 20:45:40 +00:00
Thibault Saunier c09de963be ges: Refactor the way we plug converters in effects
Stopping to do it at the bin description level but properly
plugging them where they are needed and cleanly ghosting the pads
where it makes most sense.

This introduces support for GES to request pads on the most upstream
element in case no static pad can be ghosted.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/187>
2020-06-17 10:48:41 -04:00
Thibault Saunier c217346fa0 structured-interface: Add support for setting effects inpoint
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/187>
2020-06-16 18:21:01 -04:00
Thibault Saunier f070373def track-element: Make set_has_internal_source return a boolean
Telling the user if it is legal to have an internal source in that
particular GESTrackElement.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/187>
2020-06-16 18:21:01 -04:00
Thibault Saunier ba6c842831 pipeline: doc: Add a note about trying to render before setting rendering settings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/189>
2020-06-16 15:49:41 -04:00
Thibault Saunier 9e0fbe964f uri-clip: Add a warning about synchronous uri discovery
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/189>
2020-06-16 15:49:41 -04:00
Mathieu Duponchelle 10568c30d9 track, composition: mark stream id properties as DOC_SHOW_DEFAULT
and update plugins cache

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/182>
2020-06-04 23:14:59 +02:00
Guillaume Desmottes a90f9dc257 add missing Since annotations on new API
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/181>
2020-06-03 09:57:06 +02:00
Thibault Saunier d56f3fe9ec formatter: Do not dereference NULL pointer
CID 1461701

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/180>
2020-05-27 23:49:00 +00:00
Thibault Saunier 8047323e93 xml-formatter: Add an GST_ERROR when setting control sources fails
CID 1463853

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/180>
2020-05-27 23:49:00 +00:00
Thibault Saunier 1f94299c49 validate: Wait for state change to consider commit as done
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/178>
2020-05-26 19:14:53 -04:00
Thibault Saunier db5c62ad4c formatter: Fix saving/loading project with clip speed rate control
We need to ensure that clips duration is set after time effects are
added and we now need to serialize effects inpoints and max duration.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/177>
2020-05-25 11:20:38 +01:00
Henry Wilkes a6d0418f99 uri-clip: don't assume duration needs to stay the same
ges_uri_clip_asset_get_duration does not tell us what the duration in
the timeline needs to be. Especially when we have time effects, or
effects with finite max-durations. So we should no longer expect the
duration to stay the same when replacing assets. Instead, we just check
that the new max-duration would be compatible with the current in-point
(which was not checked before), and the clip would not be totally
overlapped if its duration-limit changes.

This is based on the assumption that each source is replaced one-to-one
in its track. If a source is replaced with nothing in the same track,
this check may be a little too strong (but still mostly weaker than
before). However, problems could occur if track selection does
something unexpected, such as placing the new source in a track not
previously occupied.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/177>
2020-05-25 11:20:38 +01:00
Henry Wilkes f269a7f2a6 clip: provide an example of using time effects
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/177>
2020-05-25 11:20:38 +01:00
Henry Wilkes 9e18e03939 track-element: use out-point for updating control bindings
The out-point, which is an internal time, is used instead of the
duration for determining the control binding value at the end of the
element.

Also, allow the user to switch off the auto-clamping of control sources
if they are not desired. And allow them to clamp specific control sources
individually.

Also, fix a lot of memory leaks related to control sources. In
particular, releasing the extra ref gained by source in
g_object_get (binding, "control-source", &source, NULL);

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/177>
2020-05-25 11:20:38 +01:00
Henry Wilkes 738524662b clip: test for layer in group
Make sure the layer exists before we try to remove the grouped clips
from it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/177>
2020-05-25 11:20:38 +01:00
Henry Wilkes 34719efa17 timeline-tree: make sure the layer priority refers to an existing layer
If a layer priority sits between the priorities of two layers in the
timeline, i.e. it references a gap in the timeline's layers, then
ges_timeline_append_layer will never fill this gap and create the
desired layer, so the edit in timeline-tree would loop forever. So a
check was added to avoid this.

This would be a usage error, but a user can reasonably end up with a gap
in their layers if they remove a layer from the timeline.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/177>
2020-05-25 11:20:38 +01:00
Henry Wilkes 53d335b4ed clip: add method for adding top effects
Unlike ges_container_add, this lets you set the index and will check
that track selection did not fail. This is useful for time effects whose
addition would create an unsupported timeline configuration.

Also can use the clip add error in ges_timeline_add_clip to let the user
know when adding a clip to a layer that its in-point is set larger than
the max-duration of its core children.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/177>
2020-05-25 11:20:38 +01:00
Henry Wilkes 478db52ded timeline-tree: take time effects into account when trimming
When trimming the start of a clip, we want to set the in-point of its
children such that whatever data was at the timeline time T still
remains at the timeline time T after the trim, where
  T = MAX (prev_start, new_start)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/177>
2020-05-25 11:20:38 +01:00
Henry Wilkes 364c112d66 clip: use time translation for split
The new in-point should be the media position corresponding to the media
position. media_duration_factor is no longer needed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/177>
2020-05-25 11:20:38 +01:00
Henry Wilkes e36e99e1ce clip: fix warning when getting duration-limit
The duration-limit case was missing a 'break;' statement.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/177>
2020-05-25 11:20:38 +01:00
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 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 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 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 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