Rename TrackEffect to BaseEffect

This commit is contained in:
Thibault Saunier 2013-01-26 12:35:19 -03:00
parent d69964fd2a
commit 5da8fa89e2
19 changed files with 123 additions and 124 deletions

View file

@ -45,7 +45,7 @@ platform as well as Windows. It is released under the GNU Library General Public
<xi:include href="xml/ges-track.xml"/>
<xi:include href="xml/ges-track-element.xml"/>
<xi:include href="xml/ges-track-source.xml"/>
<xi:include href="xml/ges-track-effect.xml"/>
<xi:include href="xml/ges-base-effect.xml"/>
<xi:include href="xml/ges-track-operation.xml"/>
<xi:include href="xml/ges-base-transition-clip.xml"/>
<xi:include href="xml/ges-asset.xml"/>

View file

@ -852,19 +852,19 @@ ges_pitivi_formatter_get_type
</SECTION>
<SECTION>
<FILE>ges-track-effect</FILE>
<TITLE>GESTrackEffect</TITLE>
GESTrackEffect
<FILE>ges-base-effect</FILE>
<TITLE>GESBaseEffect</TITLE>
GESBaseEffect
<SUBSECTION Standard>
GESTrackEffectClass
GESTrackEffectPrivate
GES_IS_TRACK_EFFECT
GES_IS_TRACK_EFFECT_CLASS
GES_TRACK_EFFECT
GES_TRACK_EFFECT_CLASS
GES_TRACK_EFFECT_GET_CLASS
GES_TYPE_TRACK_EFFECT
ges_track_effect_get_type
GESBaseEffectClass
GESBaseEffectPrivate
GES_IS_BASE_EFFECT
GES_IS_BASE_EFFECT_CLASS
GES_BASE_EFFECT
GES_BASE_EFFECT_CLASS
GES_BASE_EFFECT_GET_CLASS
GES_TYPE_BASE_EFFECT
ges_base_effect_get_type
</SECTION>
<SECTION>

View file

@ -27,7 +27,7 @@ ges_track_filesource_get_type
ges_track_get_type
ges_track_image_source_get_type
ges_track_element_get_type
ges_track_effect_get_type
ges_base_effect_get_type
ges_track_parse_launch_effect_get_type
ges_track_operation_get_type
ges_track_source_get_type

View file

@ -522,7 +522,7 @@
id="tspan4438"
x="286.56216"
y="302.49377"
style="font-size:20px;font-style:italic;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:120.00000477%;writing-mode:lr-tb;text-anchor:middle;font-family:Georgia;-inkscape-font-specification:Georgia Italic">TrackEffect</tspan></text>
style="font-size:20px;font-style:italic;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:120.00000477%;writing-mode:lr-tb;text-anchor:middle;font-family:Georgia;-inkscape-font-specification:Georgia Italic">BaseEffect</tspan></text>
<text
xml:space="preserve"
style="font-size:20px;font-style:italic;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:center;line-height:120.00000477%;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Georgia;-inkscape-font-specification:Georgia Bold Italic"

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

View file

@ -42,7 +42,7 @@ libges_@GST_API_VERSION@_la_SOURCES = \
ges-track-audio-test-source.c \
ges-track-title-source.c \
ges-track-text-overlay.c \
ges-track-effect.c \
ges-base-effect.c \
ges-track-parse-launch-effect.c \
ges-screenshot.c \
ges-formatter.c \
@ -83,7 +83,7 @@ libges_@GST_API_VERSION@include_HEADERS = \
ges-title-clip.h \
ges-overlay-clip.h \
ges-text-overlay-clip.h \
ges-track-effect.h \
ges-base-effect.h \
ges-track-parse-launch-effect.h \
ges-track.h \
ges-track-element.h \

View file

@ -25,7 +25,7 @@
* The Assets in the GStreamer Editing Services represent the ressources
* that can be used. You can create assets for any type that implements the #GESExtractable
* interface, for example #GESClips, #GESFormatter, and #GESTrackElement do implement it.
* This means that asssets will represent for example a #GESUriClips, #GESTrackEffect etc,
* This means that asssets will represent for example a #GESUriClips, #GESBaseEffect etc,
* and then you can extract objects of those types with the appropriate parameters from the asset
* using the #ges_asset_extract method:
*

View file

@ -18,7 +18,7 @@
*/
/**
* SECTION:ges-track-effect
* SECTION:ges-base-effect
* @short_description: adds an effect to a stream in a GESSourceClip or a
* #GESTimelineLayer
*/
@ -28,38 +28,37 @@
#include "ges-internal.h"
#include "ges-track-element.h"
#include "ges-track-effect.h"
#include "ges-base-effect.h"
G_DEFINE_ABSTRACT_TYPE (GESTrackEffect, ges_track_effect,
G_DEFINE_ABSTRACT_TYPE (GESBaseEffect, ges_base_effect,
GES_TYPE_TRACK_OPERATION);
static GHashTable *ges_track_effect_get_props_hashtable (GESTrackElement *
self);
static GHashTable *ges_base_effect_get_props_hashtable (GESTrackElement * self);
guint pspec_hash (gconstpointer key_spec);
static gboolean pspec_equal (gconstpointer key_spec_1,
gconstpointer key_spec_2);
struct _GESTrackEffectPrivate
struct _GESBaseEffectPrivate
{
void *nothing;
};
static void
ges_track_effect_class_init (GESTrackEffectClass * klass)
ges_base_effect_class_init (GESBaseEffectClass * klass)
{
GESTrackElementClass *obj_bg_class = GES_TRACK_ELEMENT_CLASS (klass);
g_type_class_add_private (klass, sizeof (GESTrackEffectPrivate));
g_type_class_add_private (klass, sizeof (GESBaseEffectPrivate));
obj_bg_class->get_props_hastable = ges_track_effect_get_props_hashtable;
obj_bg_class->get_props_hastable = ges_base_effect_get_props_hashtable;
}
static void
ges_track_effect_init (GESTrackEffect * self)
ges_base_effect_init (GESBaseEffect * self)
{
self->priv =
G_TYPE_INSTANCE_GET_PRIVATE (self, GES_TYPE_TRACK_EFFECT,
GESTrackEffectPrivate);
G_TYPE_INSTANCE_GET_PRIVATE (self, GES_TYPE_BASE_EFFECT,
GESBaseEffectPrivate);
}
static gboolean
@ -87,7 +86,7 @@ pspec_hash (gconstpointer key_spec)
/* Virtual methods */
static GHashTable *
ges_track_effect_get_props_hashtable (GESTrackElement * self)
ges_base_effect_get_props_hashtable (GESTrackElement * self)
{
GValue item = { 0, };
GstIterator *it;

View file

@ -17,8 +17,8 @@
* Boston, MA 02110-1301, USA.
*/
#ifndef _GES_TRACK_EFFECT
#define _GES_TRACK_EFFECT
#ifndef _GES_BASE_EFFECT
#define _GES_BASE_EFFECT
#include <glib-object.h>
#include <ges/ges-types.h>
@ -26,40 +26,40 @@
G_BEGIN_DECLS
#define GES_TYPE_TRACK_EFFECT ges_track_effect_get_type()
#define GES_TRACK_EFFECT(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GES_TYPE_TRACK_EFFECT, GESTrackEffect))
#define GES_TRACK_EFFECT_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), GES_TYPE_TRACK_EFFECT, GESTrackEffectClass))
#define GES_IS_TRACK_EFFECT(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GES_TYPE_TRACK_EFFECT))
#define GES_IS_TRACK_EFFECT_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE ((klass), GES_TYPE_TRACK_EFFECT))
#define GES_TRACK_EFFECT_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_TRACK_EFFECT, GESTrackEffectClass))
#define GES_TYPE_BASE_EFFECT ges_base_effect_get_type()
#define GES_BASE_EFFECT(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GES_TYPE_BASE_EFFECT, GESBaseEffect))
#define GES_BASE_EFFECT_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), GES_TYPE_BASE_EFFECT, GESBaseEffectClass))
#define GES_IS_BASE_EFFECT(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GES_TYPE_BASE_EFFECT))
#define GES_IS_BASE_EFFECT_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE ((klass), GES_TYPE_BASE_EFFECT))
#define GES_BASE_EFFECT_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_BASE_EFFECT, GESBaseEffectClass))
typedef struct _GESTrackEffectPrivate GESTrackEffectPrivate;
typedef struct _GESBaseEffectPrivate GESBaseEffectPrivate;
/**
* GESTrackEffect:
* GESBaseEffect:
*/
struct _GESTrackEffect
struct _GESBaseEffect
{
/*< private > */
GESTrackOperation parent;
GESTrackEffectPrivate *priv;
GESBaseEffectPrivate *priv;
/* Padding for API extension */
gpointer _ges_reserved[GES_PADDING];
};
/**
* GESTrackEffectClass:
* GESBaseEffectClass:
* @parent_class: parent class
*/
struct _GESTrackEffectClass
struct _GESBaseEffectClass
{
/*< private > */
GESTrackOperationClass parent_class;
@ -68,7 +68,7 @@ struct _GESTrackEffectClass
};
GType ges_track_effect_get_type (void);
GType ges_base_effect_get_type (void);
G_END_DECLS
#endif /* _GES_TRACK_EFFECT */
#endif /* _GES_BASE_EFFECT */

View file

@ -850,7 +850,7 @@ ges_base_xml_formatter_add_track_element (GESBaseXmlFormatter * self,
goto out;
}
if (g_type_is_a (track_element_type, GES_TYPE_TRACK_EFFECT) == FALSE) {
if (g_type_is_a (track_element_type, GES_TYPE_BASE_EFFECT) == FALSE) {
GST_FIXME_OBJECT (self, "%s currently not supported",
g_type_name (track_element_type));
goto out;

View file

@ -61,7 +61,7 @@ track_element_priority_changed_cb (GESTrackElement * child,
GParamSpec * arg G_GNUC_UNUSED, GESClip * object);
static void update_height (GESClip * object);
static gint sort_track_effects (gpointer a, gpointer b, GESClip * object);
static gint sort_base_effects (gpointer a, gpointer b, GESClip * object);
static void
get_layer_priorities (GESTimelineLayer * layer, guint32 * layer_min_gnl_prio,
guint32 * layer_max_gnl_prio);
@ -240,7 +240,7 @@ ges_clip_class_init (GESClipClass * klass)
/**
* GESClip::effect-added:
* @object: the #GESClip
* @effect: the #GESTrackEffect that was added.
* @effect: the #GESBaseEffect that was added.
*
* Will be emitted after an effect was added to the object.
*
@ -249,12 +249,12 @@ ges_clip_class_init (GESClipClass * klass)
ges_clip_signals[EFFECT_ADDED] =
g_signal_new ("effect-added", G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_FIRST, 0, NULL, NULL, g_cclosure_marshal_generic,
G_TYPE_NONE, 1, GES_TYPE_TRACK_EFFECT);
G_TYPE_NONE, 1, GES_TYPE_BASE_EFFECT);
/**
* GESClip::effect-removed:
* @object: the #GESClip
* @effect: the #GESTrackEffect that was added.
* @effect: the #GESBaseEffect that was added.
*
* Will be emitted after an effect was remove from the object.
*
@ -263,7 +263,7 @@ ges_clip_class_init (GESClipClass * klass)
ges_clip_signals[EFFECT_REMOVED] =
g_signal_new ("effect-removed", G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_FIRST, 0, NULL, NULL, g_cclosure_marshal_generic,
G_TYPE_NONE, 1, GES_TYPE_TRACK_EFFECT);
G_TYPE_NONE, 1, GES_TYPE_BASE_EFFECT);
/**
* GESClip::track-object-added:
@ -452,10 +452,10 @@ ges_clip_add_track_element (GESClip * object, GESTrackElement * trobj)
g_return_val_if_fail (GES_IS_TRACK_ELEMENT (trobj), FALSE);
priv = object->priv;
is_effect = GES_IS_TRACK_EFFECT (trobj);
is_effect = GES_IS_BASE_EFFECT (trobj);
GST_LOG ("Got a TrackElement : %p , setting the timeline object as its"
"creator. Is a TrackEffect %i", trobj, is_effect);
"creator. Is a BaseEffect %i", trobj, is_effect);
if (!trobj)
return FALSE;
@ -476,9 +476,9 @@ ges_clip_add_track_element (GESClip * object, GESTrackElement * trobj)
mapping->priority_offset = priv->nb_effects;
/* If the trackelement is an effect:
* - We add it on top of the list of TrackEffect
* - We add it on top of the list of BaseEffect
* - We put all TrackElement present in the Clip
* which are not TrackEffect on top of them
* which are not BaseEffect on top of them
*
* FIXME: Let the full control over priorities to the user
*/
@ -501,7 +501,7 @@ ges_clip_add_track_element (GESClip * object, GESTrackElement * trobj)
object->trackelements =
g_list_insert_sorted_with_data (object->trackelements, trobj,
(GCompareDataFunc) sort_track_effects, object);
(GCompareDataFunc) sort_base_effects, object);
_set_start0 (GES_TIMELINE_ELEMENT (trobj), _START (object));
_set_duration0 (GES_TIMELINE_ELEMENT (trobj), _DURATION (object));
@ -537,13 +537,13 @@ ges_clip_add_track_element (GESClip * object, GESTrackElement * trobj)
_PRIORITY (object) + mapping->priority_offset);
GST_DEBUG ("Returning trobj:%p", trobj);
if (!GES_IS_TRACK_EFFECT (trobj)) {
if (!GES_IS_BASE_EFFECT (trobj)) {
g_signal_emit (object, ges_clip_signals[TRACK_ELEMENT_ADDED], 0,
GES_TRACK_ELEMENT (trobj));
} else {
/* emit 'effect-added' */
g_signal_emit (object, ges_clip_signals[EFFECT_ADDED], 0,
GES_TRACK_EFFECT (trobj));
GES_BASE_EFFECT (trobj));
}
return TRUE;
@ -598,11 +598,11 @@ ges_clip_release_track_element (GESClip * object,
object->trackelements = g_list_remove (object->trackelements, trackelement);
if (GES_IS_TRACK_EFFECT (trackelement)) {
if (GES_IS_BASE_EFFECT (trackelement)) {
/* emit 'object-removed' */
object->priv->nb_effects--;
g_signal_emit (object, ges_clip_signals[EFFECT_REMOVED], 0,
GES_TRACK_EFFECT (trackelement));
GES_BASE_EFFECT (trackelement));
} else
g_signal_emit (object, ges_clip_signals[TRACK_ELEMENT_REMOVED], 0,
GES_TRACK_ELEMENT (trackelement));
@ -830,7 +830,7 @@ _set_priority (GESTimelineElement * element, guint32 priority)
}
object->trackelements = g_list_sort_with_data (object->trackelements,
(GCompareDataFunc) sort_track_effects, object);
(GCompareDataFunc) sort_base_effects, object);
priv->ignore_notifies = FALSE;
return TRUE;
@ -1015,7 +1015,7 @@ ges_clip_get_track_elements (GESClip * object)
}
static gint
sort_track_effects (gpointer a, gpointer b, GESClip * object)
sort_base_effects (gpointer a, gpointer b, GESClip * object)
{
guint prio_offset_a, prio_offset_b;
ObjectMapping *map_a, *map_b;
@ -1045,9 +1045,9 @@ sort_track_effects (gpointer a, gpointer b, GESClip * object)
* Get effects applied on @object
*
* Returns: (transfer full) (element-type GESTrackElement): a #GList of the
* #GESTrackEffect that are applied on @object order by ascendant priorities.
* #GESBaseEffect that are applied on @object order by ascendant priorities.
* The refcount of the objects will be increased. The user will have to
* unref each #GESTrackEffect and free the #GList.
* unref each #GESBaseEffect and free the #GList.
*
* Since: 0.10.2
*/
@ -1074,7 +1074,7 @@ ges_clip_get_top_effects (GESClip * object)
/**
* ges_clip_get_top_effect_position:
* @object: The origin #GESClip
* @effect: The #GESTrackEffect we want to get the top position from
* @effect: The #GESBaseEffect we want to get the top position from
*
* Gets the top position of an effect.
*
@ -1083,7 +1083,7 @@ ges_clip_get_top_effects (GESClip * object)
* Since: 0.10.2
*/
gint
ges_clip_get_top_effect_position (GESClip * object, GESTrackEffect * effect)
ges_clip_get_top_effect_position (GESClip * object, GESBaseEffect * effect)
{
g_return_val_if_fail (GES_IS_CLIP (object), -1);
@ -1094,7 +1094,7 @@ ges_clip_get_top_effect_position (GESClip * object, GESTrackEffect * effect)
/**
* ges_clip_set_top_effect_priority:
* @object: The origin #GESClip
* @effect: The #GESTrackEffect to move
* @effect: The #GESBaseEffect to move
* @newpriority: the new position at which to move the @effect inside this
* #GESClip
*
@ -1106,7 +1106,7 @@ ges_clip_get_top_effect_position (GESClip * object, GESTrackEffect * effect)
*/
gboolean
ges_clip_set_top_effect_priority (GESClip * object,
GESTrackEffect * effect, guint newpriority)
GESBaseEffect * effect, guint newpriority)
{
gint inc;
GList *tmp;
@ -1150,7 +1150,7 @@ ges_clip_set_top_effect_priority (GESClip * object,
}
object->trackelements = g_list_sort_with_data (object->trackelements,
(GCompareDataFunc) sort_track_effects, object);
(GCompareDataFunc) sort_base_effects, object);
return TRUE;
}

View file

@ -202,8 +202,8 @@ void ges_clip_set_moving_from_layer (GESClip *object, gboolean is_moving);
/* Effects */
GList* ges_clip_get_top_effects (GESClip *object);
gint ges_clip_get_top_effect_position (GESClip *object, GESTrackEffect *effect);
gboolean ges_clip_set_top_effect_priority (GESClip *object, GESTrackEffect *effect, guint newpriority);
gint ges_clip_get_top_effect_position (GESClip *object, GESBaseEffect *effect);
gboolean ges_clip_set_top_effect_priority (GESClip *object, GESBaseEffect *effect, guint newpriority);
/* Editing */
GESClip *ges_clip_split (GESClip *object, guint64 position);

View file

@ -207,13 +207,13 @@ save_track_elements (xmlTextWriterPtr writer, GList * source_list,
xmlTextWriterWriteAttribute (writer, BAD_CAST "id", BAD_CAST cast);
xmlFree (cast);
if (GES_IS_TRACK_EFFECT (trackelement)) {
if (GES_IS_BASE_EFFECT (trackelement)) {
GParamSpec **pspecs, *spec;
gchar *serialized, *concatenated;
guint n_props = 0;
xmlTextWriterWriteAttribute (writer, BAD_CAST "type",
BAD_CAST "pitivi.timeline.track.TrackEffect");
BAD_CAST "pitivi.timeline.track.BaseEffect");
g_object_get (trackelement, "bin-description", &bin_desc, NULL);
xmlTextWriterStartElement (writer, BAD_CAST "effect");
@ -272,7 +272,7 @@ save_track_elements (xmlTextWriterPtr writer, GList * source_list,
xmlTextWriterEndElement (writer);
/* We add effects at the end of the trackelement list */
if (GES_IS_TRACK_EFFECT (trackelement)) {
if (GES_IS_BASE_EFFECT (trackelement)) {
srcmap->tck_obj_ids = g_list_append (srcmap->tck_obj_ids,
xmlXPathCastNumberToString (*id));
} else {

View file

@ -26,13 +26,13 @@
#include "ges-internal.h"
#include "ges-extractable.h"
#include "ges-track-element.h"
#include "ges-track-effect.h"
#include "ges-base-effect.h"
#include "ges-track-parse-launch-effect.h"
static void ges_extractable_interface_init (GESExtractableInterface * iface);
G_DEFINE_TYPE_WITH_CODE (GESTrackParseLaunchEffect,
ges_track_parse_launch_effect, GES_TYPE_TRACK_EFFECT,
ges_track_parse_launch_effect, GES_TYPE_BASE_EFFECT,
G_IMPLEMENT_INTERFACE (GES_TYPE_EXTRACTABLE,
ges_extractable_interface_init));

View file

@ -22,7 +22,7 @@
#include <glib-object.h>
#include <ges/ges-types.h>
#include <ges/ges-track-effect.h>
#include <ges/ges-base-effect.h>
G_BEGIN_DECLS
#define GES_TYPE_TRACK_PARSE_LAUNCH_EFFECT ges_track_parse_launch_effect_get_type()
@ -52,7 +52,7 @@ typedef struct _GESTrackParseLaunchEffectPrivate GESTrackParseLaunchEffectPriv
struct _GESTrackParseLaunchEffect
{
/*< private > */
GESTrackEffect parent;
GESBaseEffect parent;
GESTrackParseLaunchEffectPrivate *priv;
/* Padding for API extension */
@ -67,7 +67,7 @@ struct _GESTrackParseLaunchEffect
struct _GESTrackParseLaunchEffectClass
{
/*< private > */
GESTrackEffectClass parent_class;
GESBaseEffectClass parent_class;
/* Padding for API extension */
gpointer _ges_reserved[GES_PADDING];

View file

@ -95,8 +95,8 @@ typedef struct _GESTrackSourceClass GESTrackSourceClass;
typedef struct _GESTrackOperation GESTrackOperation;
typedef struct _GESTrackOperationClass GESTrackOperationClass;
typedef struct _GESTrackEffect GESTrackEffect;
typedef struct _GESTrackEffectClass GESTrackEffectClass;
typedef struct _GESBaseEffect GESBaseEffect;
typedef struct _GESBaseEffectClass GESBaseEffectClass;
typedef struct _GESTrackParseLaunchEffect GESTrackParseLaunchEffect;
typedef struct _GESTrackParseLaunchEffectClass GESTrackParseLaunchEffectClass;

View file

@ -540,7 +540,7 @@ _parse_effect (GMarkupParseContext * context, const gchar * element_name,
}
type = g_type_from_name (strtype);
if (!g_type_is_a (type, GES_TYPE_TRACK_EFFECT))
if (!g_type_is_a (type, GES_TYPE_BASE_EFFECT))
goto wrong_type;
if (children_properties) {
@ -583,7 +583,7 @@ wrong_children_properties:
wrong_type:
g_set_error (error, G_MARKUP_ERROR,
G_MARKUP_ERROR_INVALID_CONTENT,
"element '%s', %s not a GESTrackEffect'", element_name, strtype);
"element '%s', %s not a GESBaseEffect'", element_name, strtype);
}
static void

View file

@ -69,7 +69,7 @@
#include <ges/ges-track-transition.h>
#include <ges/ges-track-video-transition.h>
#include <ges/ges-track-audio-transition.h>
#include <ges/ges-track-effect.h>
#include <ges/ges-base-effect.h>
#include <ges/ges-track-parse-launch-effect.h>
#include <ges/ges-formatter.h>
#include <ges/ges-pitivi-formatter.h>

View file

@ -21,7 +21,7 @@
#include <ges/ges.h>
#include <gst/check/gstcheck.h>
void effect_added_cb (GESClip * obj, GESTrackEffect * trop, gpointer data);
void effect_added_cb (GESClip * obj, GESBaseEffect * trop, gpointer data);
void
deep_prop_changed_cb (GESTrackElement * obj, GstElement * element,
GParamSpec * spec);
@ -44,7 +44,7 @@ GST_START_TEST (test_add_effect_to_clip)
GESTimeline *timeline;
GESTimelineLayer *layer;
GESTrack *track_audio, *track_video;
GESTrackParseLaunchEffect *track_effect;
GESTrackParseLaunchEffect *base_effect;
GESTestClip *source;
ges_init ();
@ -67,17 +67,17 @@ GST_START_TEST (test_add_effect_to_clip)
GST_DEBUG ("Create effect");
track_effect = ges_track_parse_launch_effect_new ("agingtv");
base_effect = ges_track_parse_launch_effect_new ("agingtv");
fail_unless (GES_IS_TRACK_EFFECT (track_effect));
fail_unless (GES_IS_BASE_EFFECT (base_effect));
fail_unless (ges_clip_add_track_element (GES_CLIP
(source), GES_TRACK_ELEMENT (track_effect)));
(source), GES_TRACK_ELEMENT (base_effect)));
fail_unless (ges_track_add_object (track_video,
GES_TRACK_ELEMENT (track_effect)));
GES_TRACK_ELEMENT (base_effect)));
assert_equals_int (GES_TRACK_ELEMENT (track_effect)->active, TRUE);
assert_equals_int (GES_TRACK_ELEMENT (base_effect)->active, TRUE);
ges_timeline_layer_remove_object (layer, (GESClip *) source);
@ -91,7 +91,7 @@ GST_START_TEST (test_get_effects_from_tl)
GESTimeline *timeline;
GESTimelineLayer *layer;
GESTrack *track_video;
GESTrackParseLaunchEffect *track_effect, *track_effect1, *track_effect2;
GESTrackParseLaunchEffect *base_effect, *base_effect1, *base_effect2;
GESTestClip *source;
GList *effects, *tmp = NULL;
gint effect_prio = -1;
@ -115,28 +115,28 @@ GST_START_TEST (test_get_effects_from_tl)
GST_DEBUG ("Create effect");
track_effect = ges_track_parse_launch_effect_new ("agingtv");
track_effect1 = ges_track_parse_launch_effect_new ("agingtv");
track_effect2 = ges_track_parse_launch_effect_new ("agingtv");
base_effect = ges_track_parse_launch_effect_new ("agingtv");
base_effect1 = ges_track_parse_launch_effect_new ("agingtv");
base_effect2 = ges_track_parse_launch_effect_new ("agingtv");
fail_unless (GES_IS_TRACK_EFFECT (track_effect));
fail_unless (GES_IS_TRACK_EFFECT (track_effect1));
fail_unless (GES_IS_TRACK_EFFECT (track_effect2));
fail_unless (GES_IS_BASE_EFFECT (base_effect));
fail_unless (GES_IS_BASE_EFFECT (base_effect1));
fail_unless (GES_IS_BASE_EFFECT (base_effect2));
fail_unless (ges_clip_add_track_element (GES_CLIP
(source), GES_TRACK_ELEMENT (track_effect)));
(source), GES_TRACK_ELEMENT (base_effect)));
fail_unless (ges_track_add_object (track_video,
GES_TRACK_ELEMENT (track_effect)));
GES_TRACK_ELEMENT (base_effect)));
fail_unless (ges_clip_add_track_element (GES_CLIP
(source), GES_TRACK_ELEMENT (track_effect1)));
(source), GES_TRACK_ELEMENT (base_effect1)));
fail_unless (ges_track_add_object (track_video,
GES_TRACK_ELEMENT (track_effect1)));
GES_TRACK_ELEMENT (base_effect1)));
fail_unless (ges_clip_add_track_element (GES_CLIP
(source), GES_TRACK_ELEMENT (track_effect2)));
(source), GES_TRACK_ELEMENT (base_effect2)));
fail_unless (ges_track_add_object (track_video,
GES_TRACK_ELEMENT (track_effect2)));
GES_TRACK_ELEMENT (base_effect2)));
g_object_get (G_OBJECT (source), "height", &clip_height, NULL);
fail_unless (clip_height == 4);
@ -145,9 +145,9 @@ GST_START_TEST (test_get_effects_from_tl)
fail_unless (g_list_length (effects) == 3);
for (tmp = effects; tmp; tmp = tmp->next) {
gint priority = ges_clip_get_top_effect_position (GES_CLIP (source),
GES_TRACK_EFFECT (tmp->data));
GES_BASE_EFFECT (tmp->data));
fail_unless (priority > effect_prio);
fail_unless (GES_IS_TRACK_EFFECT (tmp->data));
fail_unless (GES_IS_BASE_EFFECT (tmp->data));
effect_prio = priority;
g_object_unref (tmp->data);
@ -217,9 +217,9 @@ GST_START_TEST (test_effect_clip)
effects = ges_clip_get_top_effects (GES_CLIP (effect_clip));
for (tmp = effects, i = 0; tmp; tmp = tmp->next, i++) {
gint priority = ges_clip_get_top_effect_position (GES_CLIP (effect_clip),
GES_TRACK_EFFECT (tmp->data));
GES_BASE_EFFECT (tmp->data));
fail_unless (priority > effect_prio);
fail_unless (GES_IS_TRACK_EFFECT (tmp->data));
fail_unless (GES_IS_BASE_EFFECT (tmp->data));
fail_unless (ges_track_element_get_track (GES_TRACK_ELEMENT (tmp->
data))->type == track_type[i]);
effect_prio = priority;
@ -281,12 +281,12 @@ GST_START_TEST (test_priorities_clip)
GES_TRACK_ELEMENT (tck_effect1)));
fail_unless (ges_clip_set_top_effect_priority (GES_CLIP
(effect_clip), GES_TRACK_EFFECT (tck_effect1), 0));
(effect_clip), GES_BASE_EFFECT (tck_effect1), 0));
fail_unless (_PRIORITY (tck_effect), 3);
fail_unless (ges_clip_set_top_effect_priority (GES_CLIP
(effect_clip), GES_TRACK_EFFECT (tck_effect1), 3));
(effect_clip), GES_BASE_EFFECT (tck_effect1), 3));
fail_unless (_PRIORITY (tck_effect) == 2);
g_object_get (effect_clip, "height", &clip_height, NULL);
@ -295,9 +295,9 @@ GST_START_TEST (test_priorities_clip)
effects = ges_clip_get_top_effects (GES_CLIP (effect_clip));
for (tmp = effects, i = 0; tmp; tmp = tmp->next, i++) {
gint priority = ges_clip_get_top_effect_position (GES_CLIP (effect_clip),
GES_TRACK_EFFECT (tmp->data));
GES_BASE_EFFECT (tmp->data));
fail_unless (priority > effect_prio);
fail_unless (GES_IS_TRACK_EFFECT (tmp->data));
fail_unless (GES_IS_BASE_EFFECT (tmp->data));
effect_prio = priority;
g_object_unref (tmp->data);
@ -311,7 +311,7 @@ GST_START_TEST (test_priorities_clip)
GST_END_TEST;
GST_START_TEST (test_track_effect_set_properties)
GST_START_TEST (test_base_effect_set_properties)
{
GESTimeline *timeline;
GESTimelineLayer *layer;
@ -384,11 +384,11 @@ GST_START_TEST (test_track_effect_set_properties)
GST_END_TEST;
void
effect_added_cb (GESClip * obj, GESTrackEffect * trop, gpointer data)
effect_added_cb (GESClip * obj, GESBaseEffect * trop, gpointer data)
{
GST_DEBUG ("Effect added");
fail_unless (GES_IS_CLIP (obj));
fail_unless (GES_IS_TRACK_EFFECT (trop));
fail_unless (GES_IS_BASE_EFFECT (trop));
}
void
@ -464,7 +464,7 @@ ges_suite (void)
tcase_add_test (tc_chain, test_get_effects_from_tl);
tcase_add_test (tc_chain, test_effect_clip);
tcase_add_test (tc_chain, test_priorities_clip);
tcase_add_test (tc_chain, test_track_effect_set_properties);
tcase_add_test (tc_chain, test_base_effect_set_properties);
tcase_add_test (tc_chain, test_clip_signals);
return s;

View file

@ -235,7 +235,7 @@ _test_project (GESProject * project, GESTimeline * timeline)
GESTrackElement *trackelement =
GES_TRACK_ELEMENT (tmptrackelement->data);
if (GES_IS_TRACK_EFFECT (trackelement)) {
if (GES_IS_BASE_EFFECT (trackelement)) {
guint nb_scratch_lines;
ges_track_element_get_child_properties (trackelement,