platform/upstream/gstreamer.git
4 years agouri-clip: Remove ->create_track_element implementation
Thibault Saunier [Wed, 25 Mar 2020 01:44:07 +0000 (22:44 -0300)]
uri-clip: Remove ->create_track_element implementation

It is dead code

4 years agoges: Deprecate GESImageSource and GESMultiFileSource
Thibault Saunier [Wed, 25 Mar 2020 01:35:35 +0000 (22:35 -0300)]
ges: Deprecate GESImageSource and GESMultiFileSource

Refactoring GESVideoSource so that #GESUriVideoSource can handle
still image in a simple way

MultiFileSource has been replaced with the new `imagesequencesrc`
element, this was totally broken anyway as `multifilesrc` can not seek
properly.

4 years agotrack-element: Create nleobject on GESExtractable::set_asset
Thibault Saunier [Wed, 25 Mar 2020 01:30:38 +0000 (22:30 -0300)]
track-element: Create nleobject on GESExtractable::set_asset

This means that we have all the information about the asset
when constructing the underlying GstElements.

This also allows to cleanup some code all around

4 years agotimeline:element: Refactor the way we 'copy'
Thibault Saunier [Wed, 25 Mar 2020 01:25:47 +0000 (22:25 -0300)]
timeline:element: Refactor the way we 'copy'

Simplifying the implementation and making sure assets are set asap

4 years agoges: Use assets to instantiate track elements/group
Thibault Saunier [Wed, 25 Mar 2020 01:23:16 +0000 (22:23 -0300)]
ges: Use assets to instantiate track elements/group

And deprecate all GESTrackElement constructors, but the GESEffect one.
Those should **never** be created by users and should become internal
in the future.

Stop having docstring for the constructors that were internal.

4 years agotests: Cleanup test files handling
Thibault Saunier [Wed, 18 Mar 2020 19:24:08 +0000 (16:24 -0300)]
tests: Cleanup test files handling

4 years agoformatter: Serialize source properties
Thibault Saunier [Fri, 13 Mar 2020 18:03:17 +0000 (15:03 -0300)]
formatter: Serialize source properties

This way we ensure that the TrackElement 'active' property is
properly serialized

4 years agoges: Add a way to set layer activeness by track
Thibault Saunier [Fri, 6 Mar 2020 21:56:52 +0000 (18:56 -0300)]
ges: Add a way to set layer activeness by track

a.k.a muting layers.

Adding unit tests and making sure serialization works properly

4 years agoelement: Add API safe guard against invalid position in edit()
Thibault Saunier [Tue, 24 Mar 2020 00:21:10 +0000 (21:21 -0300)]
element: Add API safe guard against invalid position in edit()

4 years agovalidate: Refactor actions implementation
Thibault Saunier [Tue, 24 Mar 2020 00:11:45 +0000 (21:11 -0300)]
validate: Refactor actions implementation

Making them simpler to read and avoiding leaks

4 years agostructured-interface: Fix adding clip to layer error reporting
Thibault Saunier [Mon, 23 Mar 2020 18:14:13 +0000 (15:14 -0300)]
structured-interface: Fix adding clip to layer error reporting

4 years agoges: Add a SourceClipAsset class
Thibault Saunier [Tue, 17 Mar 2020 14:53:47 +0000 (11:53 -0300)]
ges: Add a SourceClipAsset class

Cleaning up the way we use the default framerate for natural
frame rate.

4 years agolaunch: Add a way to disable validate at runtime
Thibault Saunier [Tue, 10 Mar 2020 19:10:12 +0000 (16:10 -0300)]
launch: Add a way to disable validate at runtime

Also avoid to add useless bin in our sinks

4 years agoges: Plug some leaks
Thibault Saunier [Mon, 9 Mar 2020 18:38:58 +0000 (15:38 -0300)]
ges: Plug some leaks

4 years agovalidate: Add support to seek in frames
Thibault Saunier [Fri, 28 Feb 2020 14:56:22 +0000 (11:56 -0300)]
validate: Add support to seek in frames

4 years agoges: support test clips assets natural size/framerate
Thibault Saunier [Fri, 28 Feb 2020 14:47:25 +0000 (11:47 -0300)]
ges: support test clips assets natural size/framerate

This way we can test this kind of behaviour without requiring
real sources.

Also add simple tests.

4 years agoges: Add APIs to have a sens of frame numbers
Thibault Saunier [Fri, 21 Feb 2020 12:17:11 +0000 (09:17 -0300)]
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.

4 years agoutils: fix argument sanitization
Henry Wilkes [Tue, 29 Oct 2019 16:52:52 +0000 (16:52 +0000)]
utils: fix argument sanitization

_sanitize_argument is supposed to wrap arguments in '"' quote marks such
that they can be parsed and copied into a GstStructure string. This
purpose is now supported more directly, which fixes some bugs, e.g.:
  arguments                before                  fix
+title my=title          +title my="title"       +title "my=title"
+title abc n=my=name     +title abc n="my="name" +title abc n="my=name"
+title my"title          +title "my"title"       +title "my\"title"
+title my\title          +title "my\title"       +title "my\\title"

4 years agolaunch: Fix memory management issue with the rendering format
Thibault Saunier [Fri, 28 Feb 2020 14:52:38 +0000 (11:52 -0300)]
launch: Fix memory management issue with the rendering format

4 years agovalidate: Rename edit-container to edit
Thibault Saunier [Tue, 25 Feb 2020 20:42:47 +0000 (17:42 -0300)]
validate: Rename edit-container to edit

Keeping the old version for backward compat

4 years agoges: Add a timeoverlay to video test sources
Thibault Saunier [Fri, 21 Feb 2020 20:17:10 +0000 (17:17 -0300)]
ges: Add a timeoverlay to video test sources

This is often very useful to have a timeoverlay inside test sources.
We do not want to use it as an effect as segments are not the sames
in GES when it comes to nleoperations.

4 years agoelement: Handle using own property as child property
Thibault Saunier [Tue, 25 Feb 2020 21:39:47 +0000 (18:39 -0300)]
element: Handle using own property as child property

Avoiding ref cycles

4 years agoges: Ensure GESClips assets are always ClipAssets
Thibault Saunier [Fri, 21 Feb 2020 20:16:01 +0000 (17:16 -0300)]
ges: Ensure GESClips assets are always ClipAssets

4 years agoges: Add API to retrieve the natural framerate of an element
Thibault Saunier [Tue, 18 Feb 2020 18:21:38 +0000 (15:21 -0300)]
ges: Add API to retrieve the natural framerate of an element

4 years agoges: Some memory management fixes setting track mixing
Thibault Saunier [Fri, 28 Feb 2020 20:53:55 +0000 (17:53 -0300)]
ges: Some memory management fixes setting track mixing

Also fix 'mixing' property notifies

4 years agoges: Cleanup GESEdge and GESEditMode GEnum values
Thibault Saunier [Fri, 28 Feb 2020 20:50:05 +0000 (17:50 -0300)]
ges: Cleanup GESEdge and GESEditMode GEnum values

By duplicating the registered values, so that bindings have
better values to use

4 years agolaunch: Make command line provided sinks override scenario defined ones
Thibault Saunier [Mon, 2 Mar 2020 17:35:33 +0000 (14:35 -0300)]
launch: Make command line provided sinks override scenario defined ones

4 years agoframepositioner: Avoid dereferencing NULL pointer
Thibault Saunier [Fri, 28 Feb 2020 14:58:30 +0000 (11:58 -0300)]
framepositioner: Avoid dereferencing NULL pointer

4 years agovalidate: Initialize GValue before calling g_object_get_value
Thibault Saunier [Wed, 4 Mar 2020 19:03:30 +0000 (16:03 -0300)]
validate: Initialize GValue before calling g_object_get_value

This is required with GLib < 2.60

4 years agoges: Use #pragma once everywhere
Thibault Saunier [Tue, 17 Mar 2020 21:13:51 +0000 (18:13 -0300)]
ges: Use #pragma once everywhere

4 years agoges: Cleanup the way we declare object types
Thibault Saunier [Tue, 17 Mar 2020 18:51:39 +0000 (15:51 -0300)]
ges: Cleanup the way we declare object types

We create our own _DECLARE_ macro because we have instance structures

4 years agoges: Stop using hash_table_steal_extended
Thibault Saunier [Thu, 19 Mar 2020 12:15:07 +0000 (09:15 -0300)]
ges: Stop using hash_table_steal_extended

This appeard in GLib 2.58

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

4 years agoclip: Allow setting max-duration clips without TrackElements
Thibault Saunier [Wed, 18 Mar 2020 16:36:47 +0000 (13:36 -0300)]
clip: Allow setting max-duration clips without TrackElements

Otherwise this breaks quite a few assumption in user code, several
pitivi tests broke because of that.

4 years agoges: Make it so core elements can be re added to their 'owners'
Thibault Saunier [Wed, 18 Mar 2020 15:56:06 +0000 (12:56 -0300)]
ges: Make it so core elements can be re added to their 'owners'

The user might want to add/remove/add core children to clips and be able
to regroup ungrouped clip. This is needed for undo/redo in Pitivi for
example

4 years agocontainer: Let subclass know adding child was interrupted
Thibault Saunier [Wed, 18 Mar 2020 14:12:55 +0000 (11:12 -0300)]
container: Let subclass know adding child was interrupted

When the `child-added` signal emission was called, the
`GESContainer->child_added` vmethod was called (the signal is
`G_SIGNAL_RUN_FIRST`) so we need to call `GESContainer->child_removed`
ourself so subclasses know they do not control the child anymore.

4 years agotimeline-element: make start and duration EXPLICIT_NOTIFY
Henry Wilkes [Tue, 10 Mar 2020 16:01:02 +0000 (16:01 +0000)]
timeline-element: make start and duration EXPLICIT_NOTIFY

The properties will only have their signal emitted when they change in
value, even when g_object_set, etc, methods are used.

The _set_start method already did this, but start was missing the
EXPLICIT_NOTIFY flag. There should be no need to check that the property
has changed in ->set_start or ->set_duration

4 years agotimeline-element: make max-duration cap in-point
Henry Wilkes [Tue, 10 Mar 2020 15:27:20 +0000 (15:27 +0000)]
timeline-element: make max-duration cap in-point

Do not allow the in-point to exceed the max-duration of any timeline
element.

4 years agoclip: only allow children with the same timeline
Henry Wilkes [Tue, 10 Mar 2020 11:53:09 +0000 (11:53 +0000)]
clip: only allow children with the same timeline

Refuse the addition of children whose timeline is neither NULL nor the
clip's timeline.

4 years agoclip: re-handle child in-point and max-duration
Henry Wilkes [Tue, 10 Mar 2020 11:38:58 +0000 (11:38 +0000)]
clip: re-handle child in-point and max-duration

The in-point of a clip is kept in sync with its core children, unless they
have no has-internal-source.

The max-duration is defined as the minimum max-duration amongst the
clip's core children. If it is set to a new value, this sets the
max-duration of its core children to the same value if they have
has-internal-source set as TRUE.

Non-core children (such as effects on a source clip) do not influence
these values.

As part of this, we no longer track in-point in GESContainer. Unlike start
and duration, the in-point of a timeline element does not refer to its
extent in the timeline. As such, it has little meaning for most
collections of timeline-elements, in particular GESGroups. As such, there
is no generic way to relate the in-point of a container to its children.

4 years agotimeline-element: make in-point and max-duration EXPLICIT_NOTIFY
Henry Wilkes [Tue, 10 Mar 2020 11:35:23 +0000 (11:35 +0000)]
timeline-element: make in-point and max-duration EXPLICIT_NOTIFY

As such, they only emit a signal if their value changes, either through
their _set_inpoint or _set_max_duration methods, or through
g_object_set, etc.

Also, we now require the ->set_max_duration method to be implemented.
This was added to GESGroup, which will only allow the max-duration to be
set to GST_CLOCK_TIME_NONE.

4 years agotrack-element: add has-internal-source property
Henry Wilkes [Tue, 10 Mar 2020 11:29:40 +0000 (11:29 +0000)]
track-element: add has-internal-source property

Unless this property is set to TRUE, the in-point must be 0 and the
max-duration must be GST_CLOCK_TIME_NONE.

Also added EXPLICIT_NOTIFY flags to the active and track-type
properties such that their notifies are emitted only if the property
changes, even when the g_object_set, etc, methods are used.

Also added a missing notify signal to the set_active method.

4 years agoclip: copy and paste control bindings
Henry Wilkes [Tue, 3 Mar 2020 18:00:51 +0000 (18:00 +0000)]
clip: copy and paste control bindings

Previously the control bindings were not properly copied into the pasted
clip. Also changed the order so that elements are added to the clip
before the clip is added to the timeline.

4 years agotimeline-element: add signals for child properties
Henry Wilkes [Tue, 3 Mar 2020 14:31:10 +0000 (14:31 +0000)]
timeline-element: add signals for child properties

Add the child-property-added and child-property-removed signals to
GESTimelineElement.

GESContainer is able to use this to keep their child properties in sync
with their children: if they are added or removed from the child, they
are also added or removed from the container.

4 years agocontainer: freeze notifies during add and remove
Henry Wilkes [Mon, 2 Mar 2020 12:23:07 +0000 (12:23 +0000)]
container: freeze notifies during add and remove

Hold the notify signals for the container and the children until after
the child has been fully added or removed.

After the previous commit, this was used to ensure that the
notify::priority signal was sent for children of a clip *after* the
child-removed signal. This stopped being the case when the code in
->child_removed was moved to ->remove_child (the latter is called before
the child-removed signal is emitted, whilst the former is called
afterwards). Rather than undo this move of code, which was necessary to
ensure that ->add_child was always reversed, the notify::priority signal
is now simply delayed until after removing the child has completed. This
was done for all notify signals, as well as in the add method, to ensure
consistency.

This allows the test_clips.py test_signal_order_when_removing_effect to
pass.

Also make subclasses take a copy of the list of the children before
setting the start and duration, since this can potentially re-order the
children (if they have the SET_SIMPLE flag set).

4 years agoclip: make remove_child a reverse of add_child
Henry Wilkes [Mon, 2 Mar 2020 13:35:20 +0000 (13:35 +0000)]
clip: make remove_child a reverse of add_child

Previously, we relied on ->child_removed to reverse the priority changes
that occured in ->add_child. However, ->child_removed is not always
called (the signal child-removed is not always emitted) when a
->add_child needs to be removed. However, ->remove_child is always
called to reverse ->add_child, so the code was moved here. Otherwise, we
risk that the priorities of the clip will contain gaps, which will cause
problems when another child is added to the clip.

4 years agoclip: tidy handling of child priorities
Henry Wilkes [Mon, 2 Mar 2020 13:25:21 +0000 (13:25 +0000)]
clip: tidy handling of child priorities

Handle the child priorities in a way that keeps the container children
list sorted by priority at all times. Also, no longer rely on the
control_mode of the container, since we have less control over its value,
compared to private variables.

Also fixed the changing of priorities in set_top_effect_index:
previously *all* children whose priority was above or below the new
priority were shifted, when we should have been only shifting priorities
for the children whose priority lied *between* the old and the new
priority of the effect. E.g.
  effect:   A   B   C   D   E   F
  index:    0   1   2   3   4   5
After moving effect E to index 1, previously, we would get
  effect:   A   B   C   D   E   F
  index:    0   2   3   4   1   6
(this would have also shifted the priority for the core children as
well!). Whereas now, we have the correct:
  effect:   A   B   C   D   E   F
  index:    0   2   3   4   1   5

4 years agoclip: only allow core elements as children
Henry Wilkes [Mon, 2 Mar 2020 12:56:03 +0000 (12:56 +0000)]
clip: only allow core elements as children

Only allow elements that were created by ges_clip_create_track_elements
(or copied from such an element) to be added to a clip. This prevents
users from adding arbitrary elements to a clip.

As an exception, a user can add GESBaseEffects to clips whose class
supports it, i.e. to a GESSourceClip and a GESBaseEffectClip.

This change also introduces a distinction between the core elements of a
clip (created by ges_clip_create_track_elements) and non-core elements
(currently, only GESBaseEffects, for some classes). In particular,
GESBaseEffectClip will now distinguish between its core elements and
effects added by the user. This means that the core elements will always
have the lowest priority, and will not be listed as top effects. This is
desirable because it brings the behaviour of GESBaseEffectClip in line
with other clip types.

4 years agonle: Delay marking object as not in composition
Thibault Saunier [Wed, 11 Mar 2020 22:38:19 +0000 (19:38 -0300)]
nle: Delay marking object as not in composition

Instead of doing it at the time of resetting `object->in_composition`
when user calls `gst_bin_remove` do it after we actually removed
it from the object thread, and do it in the `nle_object_reset`
method where it belongs

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

4 years agoauto-transition: fix setting of SET_SIMPLE flag
Henry Wilkes [Tue, 10 Mar 2020 21:54:56 +0000 (21:54 +0000)]
auto-transition: fix setting of SET_SIMPLE flag

Previously, the SET_SIMPLE flag was non unset for auto-transitions after
it had been set.

4 years agoFix build with Python 3.8 by also checking for python-3.X-embed.pc
Sebastian Dröge [Wed, 11 Mar 2020 11:42:50 +0000 (13:42 +0200)]
Fix build with Python 3.8 by also checking for python-3.X-embed.pc

Since Python 3.8 the normal checks don't include the Python libraries
anymore and linking of the Python formatters would fail.

See also https://github.com/mesonbuild/meson/issues/5629
and https://gitlab.freedesktop.org/gstreamer/gst-python/issues/28

4 years agovalidate: Handle checking/setting subprojects ges properties
Thibault Saunier [Mon, 9 Mar 2020 14:49:33 +0000 (11:49 -0300)]
validate: Handle checking/setting subprojects ges properties

4 years agoproject: Do not warn when resetting URI to the same one
Thibault Saunier [Mon, 9 Mar 2020 14:49:02 +0000 (11:49 -0300)]
project: Do not warn when resetting URI to the same one

4 years agoges: Make setting start/duration move or trim generic
Thibault Saunier [Thu, 5 Mar 2020 18:56:28 +0000 (15:56 -0300)]
ges: Make setting start/duration move or trim generic

We were implementing the logic for moving/trimming elements specific
to SourceClip but this was not correct ass the new timeline tree allows
us to handle that for all element types in a generic and nice way.

This make us need to have groups trimming properly implemented in the
timeline tree, leading to some fixes in the group tests.

This adds tests for the various cases known to not be handled properly
by the previous code.

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

4 years agogroup: Update priority when a child is removed
Thibault Saunier [Wed, 4 Mar 2020 20:42:46 +0000 (17:42 -0300)]
group: Update priority when a child is removed

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

4 years agoclip: Don't split clips at illegal position
Thibault Saunier [Wed, 4 Mar 2020 20:16:18 +0000 (17:16 -0300)]
clip: Don't split clips at illegal position

Make sure that when we split a clip, the resulting timeline would
not be in an illegal state.

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

4 years agopipeline: don't link tracks unnecessarily
Henry Wilkes [Thu, 5 Mar 2020 19:00:20 +0000 (19:00 +0000)]
pipeline: don't link tracks unnecessarily

Unless the pipeline is in certain modes, we do not want to try and link
every track. The previous debug message implied this, but the method did
not actually end early.
Also, we always end early if we receive a track that is neither video
nor audio.

4 years agoasset: fix handling of proxies
Henry Wilkes [Thu, 5 Mar 2020 18:15:41 +0000 (18:15 +0000)]
asset: fix handling of proxies

Previous usage of the property proxy-target seemed to alternate between
the two definitions:
+ The asset we are the default proxy of
+ The asset we are in the proxy list of
Now, the latter definition is used, which seems more useful to a user
since knowing the latter can easily allow you to find out the former.

The previous behaviour of ges_asset_set_proxy (asset, NULL) was not very
clear. It is now defined so that it clears all the proxies for 'asset'.
This means that after this call, the GESAsset:proxy property will indeed
be NULL.

Also fixed:
+ We can call ges_asset_set_proxy (asset, proxy) when 'proxy' is already
  in the proxy list of 'asset'.
+ Handling of removing the default proxy in ges_asset_unproxy. This was
  sending out the wrong notifies.
+ Prohibiting circular proxying. Before we could only prevent one case,
  we should now be able to prevent all cases. This will prevent a hang
  in ges_asset_request.

4 years agotest: remove asset test that needs internal method
Henry Wilkes [Wed, 4 Mar 2020 17:00:46 +0000 (17:00 +0000)]
test: remove asset test that needs internal method

The test_proxy_asset test needs the internal method
ges_asset_finish_proxy. The test also uses the associated internal methods
ges_asset_try_proxy and ges_asset_cache_lookup. However, these are
marked with GES_API in ges-internal.h, which allows us access to them
here.
The new method is not marked as GES_API because it would not allow us to
remove the method in the future without removing it from the symbols list.
We do not want to add to the problem.

The test was simply commented out since we may wish to support tests
that access internal methods in the future using meson.

4 years agoasset: fix ownership in ges_asset_request
Henry Wilkes [Wed, 4 Mar 2020 13:05:58 +0000 (13:05 +0000)]
asset: fix ownership in ges_asset_request

Fix the ownership in ges_asset_request. This should be transfer-full,
but for proxies it would fail to add a reference. Also,
ges_asset_cache_put was leaking memory if the asset already existed.

4 years agoasset: move set_proxy (NULL, proxy) behaviour to new method
Henry Wilkes [Wed, 4 Mar 2020 11:31:32 +0000 (11:31 +0000)]
asset: move set_proxy (NULL, proxy) behaviour to new method

We should not be accepting ges_asset_set_proxy (NULL, proxy) as part of
the API! This behaviour was used internally in combination with
ges_asset_try_proxy, which is called on a still loading asset, so it was
moved to ges_asset_finish_proxy.

4 years agoasset: deprecate ->proxied method
Henry Wilkes [Wed, 4 Mar 2020 10:34:45 +0000 (10:34 +0000)]
asset: deprecate ->proxied method

This method was no longer called, so it has been deprecated.

4 years agoasset: make proxy-target read only
Henry Wilkes [Wed, 4 Mar 2020 09:59:33 +0000 (09:59 +0000)]
asset: make proxy-target read only

We should not be able to set this property.

4 years agotimeline: fix layer priority argument in trim
Henry Wilkes [Thu, 27 Feb 2020 16:08:45 +0000 (16:08 +0000)]
timeline: fix layer priority argument in trim

Previously, we tested that the given priority was `>0`, when it seems
that `>=0` was intended. A priority of `-1` means leave the priority
unchanged, whilst a priority of 0, or more, means move to this layer
priority.

4 years agotimeline-element: use default ->list_children_properties
Henry Wilkes [Fri, 21 Feb 2020 09:23:34 +0000 (09:23 +0000)]
timeline-element: use default ->list_children_properties

Stop overwriting the ->list_children_properties virtual method in
subclasses because the timeline element class handles everything itself
anyway.
Note that containers already automatically add the children properties of
their child elements in ges_container_add.

4 years agogroup: fix memory leak in child layer callback
Henry Wilkes [Tue, 25 Feb 2020 08:16:58 +0000 (08:16 +0000)]
group: fix memory leak in child layer callback

We were leaking the sigids->layer argument because gst_clip_get_layer
returns a new reference.

4 years agocontainer: fix child duration callback
Henry Wilkes [Mon, 24 Feb 2020 20:19:12 +0000 (20:19 +0000)]
container: fix child duration callback

Previously, we were setting the inpoint_offset using the start offset in
the duration callback!

Also added a notify for when the duration is changed in the child start
callback.

4 years agogroup: fix max layer priority
Henry Wilkes [Mon, 24 Feb 2020 18:58:55 +0000 (18:58 +0000)]
group: fix max layer priority

The maximum priority is `height - prio - 1`. Previously missing the -1.

Related to, but does not completely fix,
https://gitlab.freedesktop.org/gstreamer/gst-editing-services/issues/91

4 years agoclip: allow for neither track nor type in search
Henry Wilkes [Tue, 18 Feb 2020 18:02:08 +0000 (18:02 +0000)]
clip: allow for neither track nor type in search

Previously, either the track or track_type arguments had to be specified
in order to find **any** track elements. Now, you can specify neither,
which will match any track element, of the specified type.

4 years agopythontests: change num layers in timeline to 1
Henry Wilkes [Tue, 18 Feb 2020 12:17:50 +0000 (12:17 +0000)]
pythontests: change num layers in timeline to 1

In the test_timeline.test_auto_transition, the corresponding xges only
has one layer, so we should only expect one layer when we extract the
timeline. This fixes a change that was missing from commit
d3e2cf55e3ad6258ff09220ee6393655fdd833f1

4 years agoextractable: check extractable-type of set asset
Henry Wilkes [Tue, 18 Feb 2020 12:14:25 +0000 (12:14 +0000)]
extractable: check extractable-type of set asset

When setting the asset of a GESExtractable object, first make sure that
the asset's extractable-type matches the type of the object.

4 years agolayer: fix ownership when failing to add clip
Henry Wilkes [Tue, 18 Feb 2020 09:17:09 +0000 (09:17 +0000)]
layer: fix ownership when failing to add clip

If a clip is already part of a layer, then adding it to another layer
should fail. Previously, in this case, `ges_layer_add_clip` was adding a
reference to the clip instead, without subsequently giving up ownership.
This meant that the clip would be left with an unowned reference.
This has now been corrected by also calling `unref` after the
`ref_sink`.

Note that, since `clip` is already part of `current_layer`, it should
already be non-floating, so the `ref_sink`-`unref` should do nothing
overall. But we keep both to make the ownership (transfer floating/none)
explicit.

4 years agodocs: update GESAudioTrack and GESVideoTrack
Henry Wilkes [Wed, 12 Feb 2020 22:23:38 +0000 (22:23 +0000)]
docs: update GESAudioTrack and GESVideoTrack

4 years agodocs: update GESPipeline
Henry Wilkes [Tue, 21 Jan 2020 12:01:41 +0000 (12:01 +0000)]
docs: update GESPipeline

4 years agodocs: update GESMetaContainer
Henry Wilkes [Fri, 17 Jan 2020 20:10:23 +0000 (20:10 +0000)]
docs: update GESMetaContainer

4 years agodocs: update GESExtractable
Henry Wilkes [Fri, 17 Jan 2020 15:27:29 +0000 (15:27 +0000)]
docs: update GESExtractable

4 years agodocs: update GESAsset
Henry Wilkes [Fri, 17 Jan 2020 12:20:11 +0000 (12:20 +0000)]
docs: update GESAsset

4 years agodocs: update GESTrackElement
Henry Wilkes [Wed, 15 Jan 2020 14:46:02 +0000 (14:46 +0000)]
docs: update GESTrackElement

4 years agodocs: update GESTrack
Henry Wilkes [Wed, 15 Jan 2020 14:44:38 +0000 (14:44 +0000)]
docs: update GESTrack

4 years agodocs: update GESClip
Henry Wilkes [Thu, 9 Jan 2020 12:11:35 +0000 (12:11 +0000)]
docs: update GESClip

4 years agodocs: update GESGroup
Henry Wilkes [Thu, 9 Jan 2020 12:09:15 +0000 (12:09 +0000)]
docs: update GESGroup

4 years agodocs: update GESContainer
Henry Wilkes [Wed, 8 Jan 2020 09:26:07 +0000 (09:26 +0000)]
docs: update GESContainer

4 years agodocs: update GESTimelineElement
Henry Wilkes [Tue, 7 Jan 2020 17:40:53 +0000 (17:40 +0000)]
docs: update GESTimelineElement

4 years agovalidate: unref copied and pasted
Henry Wilkes [Fri, 20 Dec 2019 12:30:54 +0000 (12:30 +0000)]
validate: unref copied and pasted

4 years agotimeline: fix paste ownership
Henry Wilkes [Fri, 20 Dec 2019 11:20:49 +0000 (11:20 +0000)]
timeline: fix paste ownership

The method steals ownership of `copied_from`, so should be responsible
for unreffing it. Also make sure we fail when `layer != -1`, since this
functionality is not supported.

4 years agodocs: update GESTimeline and GESLayer
Henry Wilkes [Wed, 18 Dec 2019 20:33:45 +0000 (20:33 +0000)]
docs: update GESTimeline and GESLayer

4 years agopython: Cleanup overrides using monkey patching
Thibault Saunier [Tue, 3 Mar 2020 21:07:32 +0000 (18:07 -0300)]
python: Cleanup overrides using monkey patching

Following the PyGObject guidelines[0], this starts monkey patching
overridden elements instead of subclassing them.

[0]: https://pygobject.readthedocs.io/en/latest/devguide/override_guidelines.html#python-override-guidelines

4 years agoadd assets to layer and adjust position and duration (closes #45)
Jens Göpfert [Thu, 29 Nov 2018 18:12:24 +0000 (19:12 +0100)]
add assets to layer and adjust position and duration (closes #45)

4 years agopython: Add a Timeline.iter_clips() helper to iterate clips
Thibault Saunier [Mon, 2 Mar 2020 22:06:17 +0000 (19:06 -0300)]
python: Add a Timeline.iter_clips() helper to iterate clips

4 years agomeson: Add an option to enable/disable validate integration
Thibault Saunier [Mon, 24 Feb 2020 15:21:11 +0000 (12:21 -0300)]
meson: Add an option to enable/disable validate integration

4 years agoframepositioner: Reposition source when the user positioned them
Thibault Saunier [Sat, 22 Feb 2020 17:23:45 +0000 (14:23 -0300)]
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.

4 years agoges:launch: Handle setting playback information in scenarios
Thibault Saunier [Mon, 24 Feb 2020 11:50:04 +0000 (08:50 -0300)]
ges:launch: Handle setting playback information in scenarios

This way we can avoid real sinks when implementing scenarios

4 years agovalidate: Handle absolute control binding support when setting keyframes
Thibault Saunier [Mon, 24 Feb 2020 11:47:11 +0000 (08:47 -0300)]
validate: Handle absolute control binding support when setting keyframes

And minor fix in set-control-source

4 years agoges: Properly position video sources in the scene by default
Thibault Saunier [Wed, 19 Feb 2020 21:09:19 +0000 (18:09 -0300)]
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

4 years agoges: Add a method to retrieve the 'natural' size of VideoSource
Thibault Saunier [Wed, 19 Feb 2020 21:06:26 +0000 (18:06 -0300)]
ges: Add a method to retrieve the 'natural' size of VideoSource

This way the user can easily know how the clip would look like
if no scaling was applied to the clip, this is useful to be able
to properly position the clips with the framepositionner element.

4 years agoges: Call the right ->set_child_property vmethod
Thibault Saunier [Wed, 19 Feb 2020 18:31:28 +0000 (15:31 -0300)]
ges: Call the right ->set_child_property vmethod

We used to always call the `->set_child_property` virtual method
of the object that `ges_timeline_element_set_child_property` was called
from, but that means that, in the case of referencing GESContainer
children properties from its children, the children wouldn't know
what child property have been set, and the children override wouldn't
be takent into account, in turns, it means that the behaviour could be
different in the setter depending on parent the method was called,
which is totally unexpected.

We now make sure that the vmethod from the element that introduced the
child property is called whatever parent method is called, making the
behaviour more uniform.

Fix the python override to make sure that new behaviour is respected.

4 years agoges: Deprecate the GESTimeline::track field
Thibault Saunier [Tue, 18 Feb 2020 19:31:15 +0000 (16:31 -0300)]
ges: Deprecate the GESTimeline::track field

It is not MT safe to access it, and user should use the proper getter

4 years agoges: Set default caps for GESVideoTrack
Thibault Saunier [Tue, 18 Feb 2020 19:09:55 +0000 (16:09 -0300)]
ges: Set default caps for GESVideoTrack

By default, video track output full HD@30fps, this makes the behaviour
of clip position much more understandable and guarantess that we
always have a framerate.

The user can modify the values whenever he wants

4 years agoframepositioner: Stop lying about the source size
Thibault Saunier [Thu, 20 Feb 2020 15:28:59 +0000 (12:28 -0300)]
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 :=)

4 years agovalidate: Add action types to set/check various child properties at once
Thibault Saunier [Thu, 20 Feb 2020 15:27:37 +0000 (12:27 -0300)]
validate: Add action types to set/check various child properties at once

And add a way to take into account control bindings.

4 years agoges: Allow setting children property using the set_object_arg format
Thibault Saunier [Thu, 20 Feb 2020 15:22:19 +0000 (12:22 -0300)]
ges: Allow setting children property using the set_object_arg format

This make it much simpler for the user to set enum values and should not cause any issue