clip: only allow core elements as children
authorHenry Wilkes <hwilkes@igalia.com>
Mon, 2 Mar 2020 12:56:03 +0000 (12:56 +0000)
committerHenry Wilkes <hwilkes@igalia.com>
Mon, 16 Mar 2020 14:19:51 +0000 (14:19 +0000)
commit91b5a5804ad2c3369b869a722f29da1239f86163
treea57c58ccf0a36f1061ead13b25628dd752d6e7fa
parent41be342ba880e244be8b5038d791419ee84dd543
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.
12 files changed:
ges/ges-base-effect-clip.c
ges/ges-clip.c
ges/ges-clip.h
ges/ges-container.c
ges/ges-internal.h
ges/ges-source-clip.c
ges/ges-timeline-element.c
ges/ges-timeline.c
ges/ges-track-element.c
tests/check/ges/clip.c
tests/check/ges/effects.c
tests/check/ges/test-utils.h