2011-01-31 12:28:44 +00:00
|
|
|
/* 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
|
2012-11-04 00:25:20 +00:00
|
|
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
2011-01-31 12:28:44 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2014-04-07 19:02:48 +00:00
|
|
|
* SECTION: gesbaseeffectclip
|
2017-03-08 21:13:48 +00:00
|
|
|
* @title: GESBaseEffectClip
|
2020-03-02 12:56:03 +00:00
|
|
|
* @short_description: An effect in a #GESLayer
|
2011-01-31 12:28:44 +00:00
|
|
|
*
|
2020-03-02 12:56:03 +00:00
|
|
|
* #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.
|
2020-05-15 13:28:09 +00:00
|
|
|
*
|
|
|
|
* Note that you cannot add time effects to #GESBaseEffectClip, neither
|
|
|
|
* as core children, nor as additional effects.
|
2011-01-31 12:28:44 +00:00
|
|
|
*/
|
2020-03-02 12:56:03 +00:00
|
|
|
|
|
|
|
/* FIXME: properly handle the priority of the children. How should we sort
|
|
|
|
* the priority of effects when two #GESBaseEffectClip's overlap? */
|
2018-09-24 14:41:24 +00:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include "config.h"
|
|
|
|
#endif
|
2011-01-31 12:28:44 +00:00
|
|
|
|
|
|
|
#include <ges/ges.h>
|
|
|
|
#include "ges-internal.h"
|
|
|
|
#include "ges-types.h"
|
|
|
|
|
2013-01-25 18:45:07 +00:00
|
|
|
struct _GESBaseEffectClipPrivate
|
2011-01-31 12:28:44 +00:00
|
|
|
{
|
2011-02-10 15:15:50 +00:00
|
|
|
void *nothing;
|
2011-01-31 12:28:44 +00:00
|
|
|
};
|
|
|
|
|
2018-09-06 01:55:02 +00:00
|
|
|
G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (GESBaseEffectClip, ges_base_effect_clip,
|
|
|
|
GES_TYPE_OPERATION_CLIP);
|
2011-01-31 12:28:44 +00:00
|
|
|
|
2020-05-15 13:28:09 +00:00
|
|
|
static gboolean
|
|
|
|
ges_base_effect_clip_add_child (GESContainer * container,
|
|
|
|
GESTimelineElement * element)
|
|
|
|
{
|
|
|
|
if (GES_IS_TIME_EFFECT (element)) {
|
|
|
|
GST_WARNING_OBJECT (container, "Cannot add %" GES_FORMAT " as a child "
|
|
|
|
"because it is a time effect", GES_ARGS (element));
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
return
|
|
|
|
GES_CONTAINER_CLASS (ges_base_effect_clip_parent_class)->add_child
|
|
|
|
(container, element);
|
|
|
|
}
|
|
|
|
|
2011-01-31 12:28:44 +00:00
|
|
|
static void
|
2013-01-25 18:45:07 +00:00
|
|
|
ges_base_effect_clip_class_init (GESBaseEffectClipClass * klass)
|
2011-01-31 12:28:44 +00:00
|
|
|
{
|
2020-05-15 13:28:09 +00:00
|
|
|
GESContainerClass *container_class = GES_CONTAINER_CLASS (klass);
|
|
|
|
|
2020-03-02 12:56:03 +00:00
|
|
|
GES_CLIP_CLASS_CAN_ADD_EFFECTS (klass) = TRUE;
|
2020-05-15 13:28:09 +00:00
|
|
|
container_class->add_child = ges_base_effect_clip_add_child;
|
2011-01-31 12:28:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2013-01-25 18:45:07 +00:00
|
|
|
ges_base_effect_clip_init (GESBaseEffectClip * self)
|
2011-01-31 12:28:44 +00:00
|
|
|
{
|
2018-09-06 01:55:02 +00:00
|
|
|
self->priv = ges_base_effect_clip_get_instance_private (self);
|
2011-01-31 12:28:44 +00:00
|
|
|
}
|