mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-14 13:21:28 +00:00
91b5a5804a
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.
65 lines
2 KiB
C
65 lines
2 KiB
C
/* GStreamer Editing Services
|
|
* Copyright (C) 2011 Thibault Saunier <thibault.saunier@collabora.co.uk>
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Library General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 2 of the License, or (at your option) any later version.
|
|
*
|
|
* This library is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Library General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Library General Public
|
|
* License along with this library; if not, write to the
|
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
* Boston, MA 02110-1301, USA.
|
|
*/
|
|
|
|
/**
|
|
* SECTION: gesbaseeffectclip
|
|
* @title: GESBaseEffectClip
|
|
* @short_description: An effect in a #GESLayer
|
|
*
|
|
* #GESBaseEffectClip-s are clips whose core elements are
|
|
* #GESBaseEffect-s.
|
|
*
|
|
* ## Effects
|
|
*
|
|
* #GESBaseEffectClip-s can have **additional** #GESBaseEffect-s added as
|
|
* non-core elements. These additional effects are applied to the output
|
|
* of the core effects of the clip that they share a #GESTrack with. See
|
|
* #GESClip for how to add and move these effects from the clip.
|
|
*/
|
|
|
|
/* FIXME: properly handle the priority of the children. How should we sort
|
|
* the priority of effects when two #GESBaseEffectClip's overlap? */
|
|
#ifdef HAVE_CONFIG_H
|
|
#include "config.h"
|
|
#endif
|
|
|
|
#include <ges/ges.h>
|
|
#include "ges-internal.h"
|
|
#include "ges-types.h"
|
|
|
|
struct _GESBaseEffectClipPrivate
|
|
{
|
|
void *nothing;
|
|
};
|
|
|
|
G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (GESBaseEffectClip, ges_base_effect_clip,
|
|
GES_TYPE_OPERATION_CLIP);
|
|
|
|
static void
|
|
ges_base_effect_clip_class_init (GESBaseEffectClipClass * klass)
|
|
{
|
|
GES_CLIP_CLASS_CAN_ADD_EFFECTS (klass) = TRUE;
|
|
}
|
|
|
|
static void
|
|
ges_base_effect_clip_init (GESBaseEffectClip * self)
|
|
{
|
|
self->priv = ges_base_effect_clip_get_instance_private (self);
|
|
|
|
}
|