Rename GESTrackObject to GESTrackElement

This commit is contained in:
Thibault Saunier 2013-01-26 12:31:33 -03:00
parent dc04fd005c
commit d69964fd2a
64 changed files with 2045 additions and 1983 deletions

View file

@ -26,7 +26,7 @@ LOCAL_SRC_FILES := \
ges-overlay-clip.c \
ges-text-overlay-clip.c \
ges-track.c \
ges-track-object.c \
ges-track-element.c \
ges-track-source.c \
ges-track-operation.c \
ges-track-filesource.c \

View file

@ -43,7 +43,7 @@ platform as well as Windows. It is released under the GNU Library General Public
<xi:include href="xml/ges-overlay-clip.xml"/>
<xi:include href="xml/ges-base-effect-clip.xml"/>
<xi:include href="xml/ges-track.xml"/>
<xi:include href="xml/ges-track-object.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-track-operation.xml"/>

View file

@ -89,43 +89,43 @@ GES_TYPE_TRACK
</SECTION>
<SECTION>
<FILE>ges-track-object</FILE>
<TITLE>GESTrackObject</TITLE>
GESTrackObject
GESTrackObjectClass
ges_track_object_set_max_duration
ges_track_object_set_active
ges_track_object_set_locked
ges_track_object_is_locked
ges_track_object_get_track
ges_track_object_get_clip
ges_track_object_get_gnlobject
ges_track_object_get_element
ges_track_object_get_max_duration
ges_track_object_is_active
ges_track_object_lookup_child
ges_track_object_list_children_properties
ges_track_object_set_child_property
ges_track_object_set_child_properties
ges_track_object_set_child_property_valist
ges_track_object_set_child_property_by_pspec
ges_track_object_get_child_property
ges_track_object_get_child_properties
ges_track_object_get_child_property_valist
ges_track_object_get_child_property_by_pspec
ges_track_object_edit
ges_track_object_copy
<FILE>ges-track-element</FILE>
<TITLE>GESTrackElement</TITLE>
GESTrackElement
GESTrackElementClass
ges_track_element_set_max_duration
ges_track_element_set_active
ges_track_element_set_locked
ges_track_element_is_locked
ges_track_element_get_track
ges_track_element_get_clip
ges_track_element_get_gnlobject
ges_track_element_get_element
ges_track_element_get_max_duration
ges_track_element_is_active
ges_track_element_lookup_child
ges_track_element_list_children_properties
ges_track_element_set_child_property
ges_track_element_set_child_properties
ges_track_element_set_child_property_valist
ges_track_element_set_child_property_by_pspec
ges_track_element_get_child_property
ges_track_element_get_child_properties
ges_track_element_get_child_property_valist
ges_track_element_get_child_property_by_pspec
ges_track_element_edit
ges_track_element_copy
<SUBSECTION Standard>
GESTrackObjectPrivate
ges_track_object_set_clip
ges_track_object_set_track
ges_track_object_get_type
GES_IS_TRACK_OBJECT
GES_IS_TRACK_OBJECT_CLASS
GES_TRACK_OBJECT
GES_TRACK_OBJECT_CLASS
GES_TRACK_OBJECT_GET_CLASS
GES_TYPE_TRACK_OBJECT
GESTrackElementPrivate
ges_track_element_set_clip
ges_track_element_set_track
ges_track_element_get_type
GES_IS_TRACK_ELEMENT
GES_IS_TRACK_ELEMENT_CLASS
GES_TRACK_ELEMENT
GES_TRACK_ELEMENT_CLASS
GES_TRACK_ELEMENT_GET_CLASS
GES_TYPE_TRACK_ELEMENT
</SECTION>
<SECTION>
@ -356,12 +356,12 @@ GES_TIMELINE_ELEMENT_GET_CLASS
<TITLE>GESClip</TITLE>
GESClip
GESClipClass
GESCreateTrackObjectFunc
GESCreateTrackObjectsFunc
GESFillTrackObjectFunc
GESCreateTrackElementFunc
GESCreateTrackElementsFunc
GESFillTrackElementFunc
ges_clip_get_layer
ges_clip_find_track_object
ges_clip_add_track_object
ges_clip_find_track_element
ges_clip_add_track_element
ges_clip_add_asset
ges_clip_get_top_effects
ges_clip_get_top_effect_position
@ -376,15 +376,15 @@ ges_clip_objects_set_locked
ges_clip_set_max_duration
<SUBSECTION Standard>
GES_CLIP_HEIGHT
ges_clip_create_track_objects
ges_clip_create_track_object
ges_clip_fill_track_object
ges_clip_create_track_elements
ges_clip_create_track_element
ges_clip_fill_track_element
ges_clip_is_moving_from_layer
ges_clip_release_track_object
ges_clip_get_track_objects
ges_clip_release_track_element
ges_clip_get_track_elements
ges_clip_set_layer
ges_clip_set_moving_from_layer
ges_clip_lock_track_objects
ges_clip_lock_track_elements
GESClipPrivate
GES_IS_CLIP
GES_IS_CLIP_CLASS
@ -570,7 +570,7 @@ ges_transition_clip_get_type
<FILE>ges-custom-source-clip</FILE>
<TITLE>GESCustomSourceClip</TITLE>
GESCustomSourceClip
GESFillTrackObjectUserFunc
GESFillTrackElementUserFunc
ges_custom_source_clip_new
<SUBSECTION Standard>
GESCustomSourceClipClass
@ -1004,19 +1004,19 @@ GES_ASSET_CLIP_GET_CLASS
<SECTION>
<FILE>ges-asset-track-object</FILE>
<TITLE>GESAssetTrackObject</TITLE>
GESAssetTrackObject
ges_asset_track_object_get_type
ges_asset_track_object_get_track_type
ges_asset_track_object_set_track_type
<TITLE>GESAssetTrackElement</TITLE>
GESAssetTrackElement
ges_asset_track_element_get_type
ges_asset_track_element_get_track_type
ges_asset_track_element_set_track_type
<SUBSECTION Standard>
GESAssetTrackObjectPrivate
GES_ASSET_TRACK_OBJECT
GES_TYPE_ASSET_TRACK_OBJECT
GES_ASSET_TRACK_OBJECT_CLASS
GES_IS_ASSET_TRACK_OBJECT
GES_IS_ASSET_TRACK_OBJECT_CLASS
GES_ASSET_TRACK_OBJECT_GET_CLASS
GESAssetTrackElementPrivate
GES_ASSET_TRACK_ELEMENT
GES_TYPE_ASSET_TRACK_ELEMENT
GES_ASSET_TRACK_ELEMENT_CLASS
GES_IS_ASSET_TRACK_ELEMENT
GES_IS_ASSET_TRACK_ELEMENT_CLASS
GES_ASSET_TRACK_ELEMENT_GET_CLASS
</SECTION>
<SECTION>

View file

@ -26,7 +26,7 @@ ges_track_audio_transition_get_type
ges_track_filesource_get_type
ges_track_get_type
ges_track_image_source_get_type
ges_track_object_get_type
ges_track_element_get_type
ges_track_effect_get_type
ges_track_parse_launch_effect_get_type
ges_track_operation_get_type

View file

@ -30,7 +30,7 @@ libges_@GST_API_VERSION@_la_SOURCES = \
ges-overlay-clip.c \
ges-text-overlay-clip.c \
ges-track.c \
ges-track-object.c \
ges-track-element.c \
ges-track-source.c \
ges-track-operation.c \
ges-track-filesource.c \
@ -86,7 +86,7 @@ libges_@GST_API_VERSION@include_HEADERS = \
ges-track-effect.h \
ges-track-parse-launch-effect.h \
ges-track.h \
ges-track-object.h \
ges-track-element.h \
ges-track-source.h \
ges-track-operation.h \
ges-track-filesource.h \

View file

@ -23,7 +23,7 @@
*
* The #GESUriClipAsset is a special #GESAsset specilized in #GESClip.
* it is mostly used to get information about the #GESTrackType-s the objects extracted
* from it can potentialy create #GESTrackObject for.
* from it can potentialy create #GESTrackElement for.
*/
#include "ges-asset-clip.h"
@ -152,7 +152,7 @@ ges_asset_clip_class_init (GESAssetClipClass * self_class)
* @self: a #GESAssetClip
* @supportedformats: The track types supported by the GESAssetClip
*
* Sets track types for which objects extracted from @self can create #GESTrackObject
* Sets track types for which objects extracted from @self can create #GESTrackElement
*/
void
ges_asset_clip_set_supported_formats (GESAssetClip * self,
@ -167,9 +167,9 @@ ges_asset_clip_set_supported_formats (GESAssetClip * self,
* ges_asset_clip_get_supported_formats:
* @self: a #GESAssetClip
*
* Gets track types for which objects extracted from @self can create #GESTrackObject
* Gets track types for which objects extracted from @self can create #GESTrackElement
*
* Returns: The track types on which @self will create TrackObject when added to
* Returns: The track types on which @self will create TrackElement when added to
* a layer
*/
GESTrackType

View file

@ -20,7 +20,7 @@
/**
* SECTION: ges-asset-track-object
* @short_description: A GESAsset subclass specialized in GESTrackObject extraction
* @short_description: A GESAsset subclass specialized in GESTrackElement extraction
*/
#include "ges-asset-track-object.h"
@ -34,9 +34,9 @@ enum
static GParamSpec *properties[PROP_LAST];
G_DEFINE_TYPE (GESAssetTrackObject, ges_asset_track_object, GES_TYPE_ASSET);
G_DEFINE_TYPE (GESAssetTrackElement, ges_asset_track_element, GES_TYPE_ASSET);
struct _GESAssetTrackObjectPrivate
struct _GESAssetTrackElementPrivate
{
GESTrackType type;
};
@ -45,7 +45,7 @@ static void
_get_property (GObject * object, guint property_id,
GValue * value, GParamSpec * pspec)
{
GESAssetTrackObject *asset = GES_ASSET_TRACK_OBJECT (object);
GESAssetTrackElement *asset = GES_ASSET_TRACK_ELEMENT (object);
switch (property_id) {
case PROP_TRACK_TYPE:
@ -60,7 +60,7 @@ static void
_set_property (GObject * object, guint property_id,
const GValue * value, GParamSpec * pspec)
{
GESAssetTrackObject *asset = GES_ASSET_TRACK_OBJECT (object);
GESAssetTrackElement *asset = GES_ASSET_TRACK_ELEMENT (object);
switch (property_id) {
case PROP_TRACK_TYPE:
@ -72,11 +72,11 @@ _set_property (GObject * object, guint property_id,
}
static void
ges_asset_track_object_class_init (GESAssetTrackObjectClass * klass)
ges_asset_track_element_class_init (GESAssetTrackElementClass * klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
g_type_class_add_private (klass, sizeof (GESAssetTrackObjectPrivate));
g_type_class_add_private (klass, sizeof (GESAssetTrackElementPrivate));
object_class->get_property = _get_property;
object_class->set_property = _set_property;
@ -96,47 +96,47 @@ ges_asset_track_object_class_init (GESAssetTrackObjectClass * klass)
}
static void
ges_asset_track_object_init (GESAssetTrackObject * self)
ges_asset_track_element_init (GESAssetTrackElement * self)
{
GESAssetTrackObjectPrivate *priv;
GESAssetTrackElementPrivate *priv;
priv = self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
GES_TYPE_ASSET_TRACK_OBJECT, GESAssetTrackObjectPrivate);
GES_TYPE_ASSET_TRACK_ELEMENT, GESAssetTrackElementPrivate);
priv->type = GES_TRACK_TYPE_UNKNOWN;
}
/**
* ges_asset_track_object_set_track_type:
* ges_asset_track_element_set_track_type:
* @asset: A #GESAssetObject
* @type: A #GESTrackType
*
* Set the #GESAssetTrackType the #GESTrackObject extracted from @self
* Set the #GESAssetTrackType the #GESTrackElement extracted from @self
* should get into
*/
void
ges_asset_track_object_set_track_type (GESAssetTrackObject * asset,
ges_asset_track_element_set_track_type (GESAssetTrackElement * asset,
GESTrackType type)
{
g_return_if_fail (GES_IS_ASSET_TRACK_OBJECT (asset));
g_return_if_fail (GES_IS_ASSET_TRACK_ELEMENT (asset));
asset->priv->type = type;
}
/**
* ges_asset_track_object_get_track_type:
* ges_asset_track_element_get_track_type:
* @asset: A #GESAssetObject
*
* Get the GESAssetTrackType the #GESTrackObject extracted from @self
* Get the GESAssetTrackType the #GESTrackElement extracted from @self
* should get into
*
* Returns: a #GESTrackType
*/
const GESTrackType
ges_asset_track_object_get_track_type (GESAssetTrackObject * asset)
ges_asset_track_element_get_track_type (GESAssetTrackElement * asset)
{
g_return_val_if_fail (GES_IS_ASSET_TRACK_OBJECT (asset),
g_return_val_if_fail (GES_IS_ASSET_TRACK_ELEMENT (asset),
GES_TRACK_TYPE_UNKNOWN);
return asset->priv->type;

View file

@ -17,8 +17,8 @@
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef _GES_ASSET_TRACK_OBJECT_
#define _GES_ASSET_TRACK_OBJECT_
#ifndef _GES_ASSET_TRACK_ELEMENT_
#define _GES_ASSET_TRACK_ELEMENT_
#include <glib-object.h>
#include <gio/gio.h>
@ -27,38 +27,38 @@
G_BEGIN_DECLS
#define GES_TYPE_ASSET_TRACK_OBJECT ges_asset_track_object_get_type()
#define GES_ASSET_TRACK_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GES_TYPE_ASSET_TRACK_OBJECT, GESAssetTrackObject))
#define GES_ASSET_TRACK_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GES_TYPE_ASSET_TRACK_OBJECT, GESAssetTrackObjectClass))
#define GES_IS_ASSET_TRACK_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GES_TYPE_ASSET_TRACK_OBJECT))
#define GES_IS_ASSET_TRACK_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GES_TYPE_ASSET_TRACK_OBJECT))
#define GES_ASSET_TRACK_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_ASSET_TRACK_OBJECT, GESAssetTrackObjectClass))
#define GES_TYPE_ASSET_TRACK_ELEMENT ges_asset_track_element_get_type()
#define GES_ASSET_TRACK_ELEMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GES_TYPE_ASSET_TRACK_ELEMENT, GESAssetTrackElement))
#define GES_ASSET_TRACK_ELEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GES_TYPE_ASSET_TRACK_ELEMENT, GESAssetTrackElementClass))
#define GES_IS_ASSET_TRACK_ELEMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GES_TYPE_ASSET_TRACK_ELEMENT))
#define GES_IS_ASSET_TRACK_ELEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GES_TYPE_ASSET_TRACK_ELEMENT))
#define GES_ASSET_TRACK_ELEMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_ASSET_TRACK_ELEMENT, GESAssetTrackElementClass))
typedef struct _GESAssetTrackObjectPrivate GESAssetTrackObjectPrivate;
typedef struct _GESAssetTrackElementPrivate GESAssetTrackElementPrivate;
GType ges_asset_track_object_get_type (void);
GType ges_asset_track_element_get_type (void);
struct _GESAssetTrackObject
struct _GESAssetTrackElement
{
GESAsset parent;
/* <private> */
GESAssetTrackObjectPrivate *priv;
GESAssetTrackElementPrivate *priv;
/* Padding for API extension */
gpointer __ges_reserved[GES_PADDING];
};
struct _GESAssetTrackObjectClass
struct _GESAssetTrackElementClass
{
GESAssetClass parent_class;
gpointer _ges_reserved[GES_PADDING];
};
const GESTrackType ges_asset_track_object_get_track_type (GESAssetTrackObject *asset);
void ges_asset_track_object_set_track_type (GESAssetTrackObject * asset, GESTrackType type);
const GESTrackType ges_asset_track_element_get_track_type (GESAssetTrackElement *asset);
void ges_asset_track_element_set_track_type (GESAssetTrackElement * asset, GESTrackType type);
G_END_DECLS
#endif /* _GES_ASSET_TRACK_OBJECT */
#endif /* _GES_ASSET_TRACK_ELEMENT */

View file

@ -24,7 +24,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 #GESTrackObject do implement it.
* interface, for example #GESClips, #GESFormatter, and #GESTrackElement do implement it.
* This means that asssets will represent for example a #GESUriClips, #GESTrackEffect 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

@ -77,10 +77,10 @@ _height_changed_cb (GESClip * obj, GParamSpec * arg G_GNUC_UNUSED,
}
static void
_track_changed_cb (GESTrackObject * obj, GParamSpec * arg G_GNUC_UNUSED,
_track_changed_cb (GESTrackElement * obj, GParamSpec * arg G_GNUC_UNUSED,
GESAutoTransition * self)
{
if (ges_track_object_get_track (obj) == NULL) {
if (ges_track_element_get_track (obj) == NULL) {
GST_DEBUG_OBJECT (self, "Neighboor %" GST_PTR_FORMAT
" removed from track ... auto destructing", obj);
@ -129,8 +129,8 @@ ges_auto_transition_class_init (GESAutoTransitionClass * klass)
GESAutoTransition *
ges_auto_transition_new (GESTrackObject * transition,
GESTrackObject * previous_source, GESTrackObject * next_source)
ges_auto_transition_new (GESTrackElement * transition,
GESTrackElement * previous_source, GESTrackElement * next_source)
{
GESAutoTransition *self = g_object_new (GES_TYPE_AUTO_TRANSITION, NULL);
@ -138,9 +138,9 @@ ges_auto_transition_new (GESTrackObject * transition,
self->next_source = next_source;
self->transition = transition;
self->previous_clip = ges_track_object_get_clip (previous_source);
self->next_clip = ges_track_object_get_clip (next_source);
self->transition_clip = ges_track_object_get_clip (transition);
self->previous_clip = ges_track_element_get_clip (previous_source);
self->next_clip = ges_track_element_get_clip (next_source);
self->transition_clip = ges_track_element_get_clip (transition);
g_signal_connect (previous_source, "notify::start",
G_CALLBACK (neighbour_changed_cb), self);

View file

@ -21,7 +21,7 @@
#define _GES_AUTO_TRANSITION_H_
#include <glib-object.h>
#include "ges-track-object.h"
#include "ges-track-element.h"
#include "ges-clip.h"
#include "ges-timeline-layer.h"
@ -52,9 +52,9 @@ struct _GESAutoTransition
GObject parent_instance;
/* <read only and construct only> */
GESTrackObject *previous_source;
GESTrackObject *next_source;
GESTrackObject *transition;
GESTrackElement *previous_source;
GESTrackElement *next_source;
GESTrackElement *transition;
GESTimelineLayer *layer;
@ -70,9 +70,9 @@ struct _GESAutoTransition
GType ges_auto_transition_get_type (void) G_GNUC_CONST;
GESAutoTransition * ges_auto_transition_new (GESTrackObject * transition,
GESTrackObject * previous_source,
GESTrackObject * next_source);
GESAutoTransition * ges_auto_transition_new (GESTrackElement * transition,
GESTrackElement * previous_source,
GESTrackElement * next_source);
G_END_DECLS
#endif /* _GES_AUTO_TRANSITION_H_ */

View file

@ -34,7 +34,7 @@ G_DEFINE_ABSTRACT_TYPE (GESBaseXmlFormatter, ges_base_xml_formatter,
typedef struct PendingEffects
{
gchar *track_id;
GESTrackObject *tckobj;
GESTrackElement *trackelement;
GstStructure *children_properties;
GstStructure *properties;
@ -58,7 +58,7 @@ typedef struct PendingClip
GList *effects;
/* TODO Implement asset effect management
* PendingTrackObjects *track_objects; */
* PendingTrackElements *track_elements; */
} PendingClip;
typedef struct LayerEntry
@ -385,12 +385,12 @@ _loading_done (GESFormatter * self)
static void
_set_child_property (GQuark field_id, const GValue * value,
GESTrackObject * effect)
GESTrackElement * effect)
{
GParamSpec *pspec;
GstElement *element;
if (!ges_track_object_lookup_child (effect,
if (!ges_track_element_lookup_child (effect,
g_quark_to_string (field_id), &element, &pspec))
return;
@ -435,34 +435,34 @@ _add_object_to_layer (GESBaseXmlFormatterPrivate * priv, const gchar * id,
}
static void
_add_track_object (GESFormatter * self, GESClip * clip,
GESTrackObject * tckobj, const gchar * track_id,
_add_track_element (GESFormatter * self, GESClip * clip,
GESTrackElement * trackelement, const gchar * track_id,
GstStructure * children_properties, GstStructure * properties)
{
GESBaseXmlFormatterPrivate *priv = _GET_PRIV (self);
GESTrack *track = g_hash_table_lookup (priv->tracks, track_id);
if (track == NULL) {
GST_WARNING_OBJECT (self, "No track with id %s, can not add tckobj",
GST_WARNING_OBJECT (self, "No track with id %s, can not add trackelement",
track_id);
gst_object_unref (tckobj);
gst_object_unref (trackelement);
return;
}
GST_DEBUG_OBJECT (self, "Adding track_object: %" GST_PTR_FORMAT
" To : %" GST_PTR_FORMAT, tckobj, clip);
GST_DEBUG_OBJECT (self, "Adding track_element: %" GST_PTR_FORMAT
" To : %" GST_PTR_FORMAT, trackelement, clip);
ges_clip_add_track_object (clip, tckobj);
ges_track_add_object (track, tckobj);
ges_clip_add_track_element (clip, trackelement);
ges_track_add_object (track, trackelement);
gst_structure_foreach (children_properties,
(GstStructureForeachFunc) _set_child_property, tckobj);
(GstStructureForeachFunc) _set_child_property, trackelement);
}
static void
_free_pending_effect (PendingEffects * pend)
{
g_free (pend->track_id);
gst_object_unref (pend->tckobj);
gst_object_unref (pend->trackelement);
if (pend->children_properties)
gst_structure_free (pend->children_properties);
if (pend->properties)
@ -575,7 +575,7 @@ new_asset_cb (GESAsset * source, GAsyncResult * res, PendingAsset * passet)
PendingEffects *peffect = (PendingEffects *) tmpeffect->data;
/* We keep a ref as _free_pending_effect unrefs it */
_add_track_object (self, clip, gst_object_ref (peffect->tckobj),
_add_track_element (self, clip, gst_object_ref (peffect->trackelement),
peffect->track_id, peffect->children_properties, peffect->properties);
}
_free_pending_clip (priv, pend);
@ -830,12 +830,12 @@ ges_base_xml_formatter_add_track (GESBaseXmlFormatter * self,
}
void
ges_base_xml_formatter_add_track_object (GESBaseXmlFormatter * self,
GType track_object_type, const gchar * asset_id, const gchar * track_id,
ges_base_xml_formatter_add_track_element (GESBaseXmlFormatter * self,
GType track_element_type, const gchar * asset_id, const gchar * track_id,
const gchar * timeline_obj_id, GstStructure * children_properties,
GstStructure * properties, const gchar * metadatas, GError ** error)
{
GESTrackObject *tckobj;
GESTrackElement *trackelement;
GError *err = NULL;
GESAsset *asset = NULL;
@ -844,37 +844,37 @@ ges_base_xml_formatter_add_track_object (GESBaseXmlFormatter * self,
if (priv->check_only)
return;
if (g_type_is_a (track_object_type, GES_TYPE_TRACK_OBJECT) == FALSE) {
GST_DEBUG_OBJECT (self, "%s is not a TrackObject, can not create it",
g_type_name (track_object_type));
if (g_type_is_a (track_element_type, GES_TYPE_TRACK_ELEMENT) == FALSE) {
GST_DEBUG_OBJECT (self, "%s is not a TrackElement, can not create it",
g_type_name (track_element_type));
goto out;
}
if (g_type_is_a (track_object_type, GES_TYPE_TRACK_EFFECT) == FALSE) {
if (g_type_is_a (track_element_type, GES_TYPE_TRACK_EFFECT) == FALSE) {
GST_FIXME_OBJECT (self, "%s currently not supported",
g_type_name (track_object_type));
g_type_name (track_element_type));
goto out;
}
asset = ges_asset_request (track_object_type, asset_id, &err);
asset = ges_asset_request (track_element_type, asset_id, &err);
if (asset == NULL) {
GST_DEBUG_OBJECT (self, "Can not create tckobj %s", asset_id);
GST_DEBUG_OBJECT (self, "Can not create trackelement %s", asset_id);
GST_FIXME_OBJECT (self, "Check if missing plugins etc %s",
err ? err->message : "");
goto out;
}
tckobj = GES_TRACK_OBJECT (ges_asset_extract (asset, NULL));
if (tckobj) {
trackelement = GES_TRACK_ELEMENT (ges_asset_extract (asset, NULL));
if (trackelement) {
GESClip *clip;
if (metadatas)
ges_meta_container_add_metas_from_string (GES_META_CONTAINER (tckobj),
metadatas);
ges_meta_container_add_metas_from_string (GES_META_CONTAINER
(trackelement), metadatas);
clip = g_hash_table_lookup (priv->clips, timeline_obj_id);
if (clip) {
_add_track_object (GES_FORMATTER (self), clip, tckobj, track_id,
_add_track_element (GES_FORMATTER (self), clip, trackelement, track_id,
children_properties, properties);
} else {
PendingEffects *peffect;
@ -882,13 +882,13 @@ ges_base_xml_formatter_add_track_object (GESBaseXmlFormatter * self,
timeline_obj_id);
if (pend == NULL) {
GST_WARNING_OBJECT (self, "No Clip with id: %s can not "
"add TrackObject", timeline_obj_id);
"add TrackElement", timeline_obj_id);
goto out;
}
peffect = g_slice_new0 (PendingEffects);
peffect->tckobj = tckobj;
peffect->trackelement = trackelement;
peffect->track_id = g_strdup (track_id);
peffect->properties = properties ? gst_structure_copy (properties) : NULL;
peffect->children_properties = children_properties ?

File diff suppressed because it is too large Load diff

View file

@ -39,9 +39,9 @@ G_BEGIN_DECLS
typedef struct _GESClipPrivate GESClipPrivate;
/**
* GESFillTrackObjectFunc:
* GESFillTrackElementFunc:
* @object: the #GESClip controlling the track object
* @trobject: the #GESTrackObject
* @trobject: the #GESTrackElement
* @gnlobj: the GNonLin object that needs to be filled.
*
* A function that will be called when the GNonLin object of a corresponding
@ -52,54 +52,54 @@ typedef struct _GESClipPrivate GESClipPrivate;
*
* Returns: TRUE if the implementer succesfully filled the @gnlobj, else #FALSE.
*/
typedef gboolean (*GESFillTrackObjectFunc) (GESClip *object,
GESTrackObject *trobject,
typedef gboolean (*GESFillTrackElementFunc) (GESClip *object,
GESTrackElement *trobject,
GstElement *gnlobj);
/**
* GESCreateTrackObjectFunc:
* GESCreateTrackElementFunc:
* @object: a #GESClip
* @type: a #GESTrackType
*
* Creates the 'primary' track object for this @object.
*
* Subclasses should implement this method if they only provide a
* single #GESTrackObject per track.
* single #GESTrackElement per track.
*
* If the subclass needs to create more than one #GESTrackObject for a
* given track, then it should implement the 'create_track_objects'
* If the subclass needs to create more than one #GESTrackElement for a
* given track, then it should implement the 'create_track_elements'
* method instead.
*
* The implementer of this function shall return the proper #GESTrackObject
* The implementer of this function shall return the proper #GESTrackElement
* that should be controlled by @object for the given @track.
*
* The returned #GESTrackObject will be automatically added to the list
* The returned #GESTrackElement will be automatically added to the list
* of objects controlled by the #GESClip.
*
* Returns: the #GESTrackObject to be used, or %NULL if it can't provide one
* Returns: the #GESTrackElement to be used, or %NULL if it can't provide one
* for the given @track.
*/
typedef GESTrackObject *(*GESCreateTrackObjectFunc) (GESClip * object,
typedef GESTrackElement *(*GESCreateTrackElementFunc) (GESClip * object,
GESTrackType type);
/**
* GESCreateTrackObjectsFunc:
* GESCreateTrackElementsFunc:
* @object: a #GESClip
* @type: a #GESTrackType
*
* Create all track objects this object handles for this type of track.
*
* Subclasses should implement this method if they potentially need to
* return more than one #GESTrackObject(s) for a given #GESTrack.
* return more than one #GESTrackElement(s) for a given #GESTrack.
*
* For each object created, the subclass must call
* ges_clip_add_track_object() with the newly created object
* ges_clip_add_track_element() with the newly created object
* and provided @type.
*
* Returns: %TRUE on success %FALSE on failure.
*/
typedef GList * (*GESCreateTrackObjectsFunc) (GESClip * object, GESTrackType type);
typedef GList * (*GESCreateTrackElementsFunc) (GESClip * object, GESTrackType type);
/**
* GES_CLIP_HEIGHT:
@ -111,7 +111,7 @@ typedef GList * (*GESCreateTrackObjectsFunc) (GESClip * object, GESTrackType typ
/**
* GESClip:
* @trackobjects: (element-type GES.TrackObject): A list of TrackObject
* @trackelements: (element-type GES.TrackElement): A list of TrackElement
* controlled by this Clip sorted by priority. NOTE: Do not modify.
*
* The #GESClip base class.
@ -121,7 +121,7 @@ struct _GESClip
GESTimelineElement parent;
/*< readonly >*/
GList *trackobjects;
GList *trackelements;
/* We don't add those properties to the priv struct for optimization purposes
* start, inpoint, duration and fullduration are in nanoseconds */
@ -137,20 +137,20 @@ struct _GESClip
/**
* GESClipClass:
* @create_track_object: method to create a single #GESTrackObject for a given #GESTrack.
* @create_track_objects: method to create multiple #GESTrackObjects for a
* @create_track_element: method to create a single #GESTrackElement for a given #GESTrack.
* @create_track_elements: method to create multiple #GESTrackElements for a
* #GESTrack.
* @fill_track_object: method to fill an associated #GESTrackObject.
* @need_fill_track: Set to TRUE if @fill_track_object needs to be called.
* @fill_track_element: method to fill an associated #GESTrackElement.
* @need_fill_track: Set to TRUE if @fill_track_element needs to be called.
* @snaps: Set to %TRUE if the objects of this type snap with
* other objects in a timeline %FALSE otherwise (default is %FALSE). Basically only
* sources snap.
* @track_object_added: Should be overridden by subclasses if they need to perform an
* operation when a #GESTrackObject is added. Since: 0.10.2
* @track_object_released: Should be overridden by subclasses if they need to perform
* action when a #GESTrackObject is released. Since: 0.10.2
* @track_element_added: Should be overridden by subclasses if they need to perform an
* operation when a #GESTrackElement is added. Since: 0.10.2
* @track_element_released: Should be overridden by subclasses if they need to perform
* action when a #GESTrackElement is released. Since: 0.10.2
*
* Subclasses can override the @create_track_object and @fill_track_object methods.
* Subclasses can override the @create_track_element and @fill_track_element methods.
*/
struct _GESClipClass
{
@ -158,18 +158,18 @@ struct _GESClipClass
GESTimelineElementClass parent_class;
/*< public > */
GESCreateTrackObjectFunc create_track_object;
GESCreateTrackObjectsFunc create_track_objects;
GESCreateTrackElementFunc create_track_element;
GESCreateTrackElementsFunc create_track_elements;
/* FIXME : might need a release_track_object */
GESFillTrackObjectFunc fill_track_object;
/* FIXME : might need a release_track_element */
GESFillTrackElementFunc fill_track_element;
gboolean need_fill_track;
gboolean snaps;
void (*track_object_added) (GESClip *object,
GESTrackObject *tck_object);
void (*track_object_released) (GESClip *object,
GESTrackObject *tck_object);
void (*track_element_added) (GESClip *object,
GESTrackElement *tck_object);
void (*track_element_released) (GESClip *object,
GESTrackElement *tck_object);
/*< private >*/
/* Padding for API extension */
@ -182,17 +182,17 @@ GType ges_clip_get_type (void);
void ges_clip_set_layer (GESClip *object,
GESTimelineLayer *layer);
/* TrackObject handling */
GList* ges_clip_get_track_objects (GESClip *object);
/* TrackElement handling */
GList* ges_clip_get_track_elements (GESClip *object);
GESTrackType ges_clip_get_supported_formats (GESClip *object);
GESTrackObject *ges_clip_create_track_object (GESClip *object, GESTrackType type);
GList * ges_clip_create_track_objects (GESClip *object, GESTrackType type);
gboolean ges_clip_release_track_object (GESClip *object, GESTrackObject *trackobject);
GESTrackElement *ges_clip_create_track_element (GESClip *object, GESTrackType type);
GList * ges_clip_create_track_elements (GESClip *object, GESTrackType type);
gboolean ges_clip_release_track_element (GESClip *object, GESTrackElement *trackelement);
void ges_clip_set_supported_formats (GESClip *object, GESTrackType supportedformats);
gboolean ges_clip_add_asset (GESClip *object, GESAsset *asset);
gboolean ges_clip_add_track_object (GESClip *object, GESTrackObject *trobj);
gboolean ges_clip_fill_track_object (GESClip *object, GESTrackObject *trackobj, GstElement *gnlobj);
GESTrackObject *ges_clip_find_track_object (GESClip *object, GESTrack *track, GType type);
gboolean ges_clip_add_track_element (GESClip *object, GESTrackElement *trobj);
gboolean ges_clip_fill_track_element (GESClip *object, GESTrackElement *trackelement, GstElement *gnlobj);
GESTrackElement *ges_clip_find_track_element (GESClip *object, GESTrack *track, GType type);
/* Layer */
GESTimelineLayer *ges_clip_get_layer (GESClip *object);

View file

@ -50,7 +50,7 @@ enum
struct _GESCustomSourceClipPrivate
{
GESFillTrackObjectUserFunc filltrackobjectfunc;
GESFillTrackElementUserFunc filltrackelementfunc;
gpointer user_data;
};
@ -117,7 +117,7 @@ extractable_get_id (GESExtractable * self)
{
GESCustomSourceClipPrivate *priv = GES_CUSTOM_SOURCE_CLIP (self)->priv;
return g_strdup_printf ("%i!%i", GPOINTER_TO_INT (priv->filltrackobjectfunc),
return g_strdup_printf ("%i!%i", GPOINTER_TO_INT (priv->filltrackelementfunc),
GPOINTER_TO_INT (priv->user_data));
}
@ -130,11 +130,11 @@ ges_extractable_interface_init (GESExtractableInterface * iface)
}
static gboolean
ges_custom_source_clip_fill_track_object (GESClip * object,
GESTrackObject * trobject, GstElement * gnlobj);
ges_custom_source_clip_fill_track_element (GESClip * object,
GESTrackElement * trobject, GstElement * gnlobj);
static GESTrackObject *
ges_custom_source_clip_create_track_object (GESClip * obj, GESTrackType type)
static GESTrackElement *
ges_custom_source_clip_create_track_element (GESClip * obj, GESTrackType type)
{
return g_object_new (GES_TYPE_TRACK_SOURCE, "track-type", type, NULL);
}
@ -146,7 +146,7 @@ _set_property (GObject * object, guint property_id,
GESCustomSourceClipPrivate *priv = GES_CUSTOM_SOURCE_CLIP (object)->priv;
switch (property_id) {
case PROP_FILL_FUNC:
priv->filltrackobjectfunc = g_value_get_pointer (value);
priv->filltrackelementfunc = g_value_get_pointer (value);
break;
case PROP_USER_DATA:
priv->user_data = g_value_get_pointer (value);
@ -164,19 +164,20 @@ ges_custom_source_clip_class_init (GESCustomSourceClipClass * klass)
g_type_class_add_private (klass, sizeof (GESCustomSourceClipPrivate));
clip_class->fill_track_object = ges_custom_source_clip_fill_track_object;
clip_class->create_track_object = ges_custom_source_clip_create_track_object;
clip_class->fill_track_element = ges_custom_source_clip_fill_track_element;
clip_class->create_track_element =
ges_custom_source_clip_create_track_element;
object_class->set_property = _set_property;
/**
* GESCustomSourceClip:fill-func:
*
* The function pointer to create the TrackObject content
* The function pointer to create the TrackElement content
*/
g_object_class_install_property (object_class, PROP_FILL_FUNC,
g_param_spec_pointer ("fill-func", "Fill func",
"A pointer to a GESFillTrackObjectUserFunc",
"A pointer to a GESFillTrackElementUserFunc",
G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
/**
@ -186,7 +187,7 @@ ges_custom_source_clip_class_init (GESCustomSourceClipClass * klass)
*/
g_object_class_install_property (object_class, PROP_USER_DATA,
g_param_spec_pointer ("user-data", "User data",
"The user data pointer that will be passed when creating TrackObjects",
"The user data pointer that will be passed when creating TrackElements",
G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
}
@ -198,17 +199,17 @@ ges_custom_source_clip_init (GESCustomSourceClip * self)
}
static gboolean
ges_custom_source_clip_fill_track_object (GESClip * object,
GESTrackObject * trobject, GstElement * gnlobj)
ges_custom_source_clip_fill_track_element (GESClip * object,
GESTrackElement * trobject, GstElement * gnlobj)
{
gboolean res;
GESCustomSourceClipPrivate *priv;
GST_DEBUG ("Calling callback (timelineobj:%p, trackobj:%p, gnlobj:%p)",
GST_DEBUG ("Calling callback (timelineobj:%p, trackelement:%p, gnlobj:%p)",
object, trobject, gnlobj);
priv = GES_CUSTOM_SOURCE_CLIP (object)->priv;
res = priv->filltrackobjectfunc (object, trobject, gnlobj, priv->user_data);
res = priv->filltrackelementfunc (object, trobject, gnlobj, priv->user_data);
GST_DEBUG ("Returning res:%d", res);
@ -217,7 +218,7 @@ ges_custom_source_clip_fill_track_object (GESClip * object,
/**
* ges_custom_source_clip_new:
* @func: (scope notified): The #GESFillTrackObjectUserFunc that will be used to fill the track
* @func: (scope notified): The #GESFillTrackElementUserFunc that will be used to fill the track
* objects.
* @user_data: (closure): a gpointer that will be used when @func is called.
*
@ -226,13 +227,14 @@ ges_custom_source_clip_fill_track_object (GESClip * object,
* Returns: The new #GESCustomSourceClip.
*/
GESCustomSourceClip *
ges_custom_source_clip_new (GESFillTrackObjectUserFunc func, gpointer user_data)
ges_custom_source_clip_new (GESFillTrackElementUserFunc func,
gpointer user_data)
{
GESCustomSourceClip *src;
src = g_object_new (GES_TYPE_CUSTOM_SOURCE_CLIP, "supported-formats",
GES_TRACK_TYPE_CUSTOM, NULL);
src->priv->filltrackobjectfunc = func;
src->priv->filltrackelementfunc = func;
src->priv->user_data = user_data;
return src;
@ -240,7 +242,7 @@ ges_custom_source_clip_new (GESFillTrackObjectUserFunc func, gpointer user_data)
/**
* ges_asset_custom_source_clip_new:
* @func: (scope notified): The #GESFillTrackObjectUserFunc that will be used to fill the track
* @func: (scope notified): The #GESFillTrackElementUserFunc that will be used to fill the track
* objects.
* @user_data: (closure): a gpointer that will be used when @func is called.
*
@ -250,7 +252,7 @@ ges_custom_source_clip_new (GESFillTrackObjectUserFunc func, gpointer user_data)
* Returns: The new #GESAsset.
*/
GESAsset *
ges_asset_custom_source_clip_new (GESFillTrackObjectUserFunc func,
ges_asset_custom_source_clip_new (GESFillTrackElementUserFunc func,
gpointer user_data)
{
GESAsset *asset;

View file

@ -47,9 +47,9 @@ G_BEGIN_DECLS
typedef struct _GESCustomSourceClipPrivate GESCustomSourceClipPrivate;
/**
* GESFillTrackObjectUserFunc:
* GESFillTrackElementUserFunc:
* @object: the #GESClip controlling the track object
* @trobject: the #GESTrackObject
* @trobject: the #GESTrackElement
* @gnlobj: the GNonLin object that needs to be filled.
* @user_data: the gpointer to optional user data
*
@ -61,8 +61,8 @@ typedef struct _GESCustomSourceClipPrivate GESCustomSourceClipPrivate;
*
* Returns: TRUE if the implementer succesfully filled the @gnlobj, else #FALSE.
*/
typedef gboolean (*GESFillTrackObjectUserFunc) (GESClip * object,
GESTrackObject * trobject,
typedef gboolean (*GESFillTrackElementUserFunc) (GESClip * object,
GESTrackElement * trobject,
GstElement * gnlobj,
gpointer user_data);
@ -97,11 +97,11 @@ struct _GESCustomSourceClipClass {
GType ges_custom_source_clip_get_type (void);
GESCustomSourceClip*
ges_custom_source_clip_new (GESFillTrackObjectUserFunc func,
ges_custom_source_clip_new (GESFillTrackElementUserFunc func,
gpointer user_data);
GESAsset*
ges_asset_custom_source_clip_new (GESFillTrackObjectUserFunc func,
ges_asset_custom_source_clip_new (GESFillTrackElementUserFunc func,
gpointer user_data);

View file

@ -52,7 +52,7 @@ enum
};
static void ges_effect_clip_finalize (GObject * object);
static GESTrackObject
static GESTrackElement
* ges_tl_parse_launch_effect_create_track_obj (GESClip * self,
GESTrackType type);
@ -143,7 +143,7 @@ ges_effect_clip_class_init (GESEffectClipClass * klass)
"Bin description of the audio track of the effect",
NULL, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
timobj_class->create_track_object =
timobj_class->create_track_element =
ges_tl_parse_launch_effect_create_track_obj;
timobj_class->need_fill_track = FALSE;
}
@ -156,7 +156,7 @@ ges_effect_clip_init (GESEffectClip * self)
}
static GESTrackObject *
static GESTrackElement *
ges_tl_parse_launch_effect_create_track_obj (GESClip * self, GESTrackType type)
{
const gchar *bin_description = NULL;

View file

@ -25,7 +25,7 @@
#include <gio/gio.h>
#include "ges-timeline.h"
#include "ges-track-object.h"
#include "ges-track-element.h"
#include "ges-timeline-element.h"
#include "ges-asset.h"
@ -47,31 +47,31 @@ GST_DEBUG_CATEGORY_EXTERN (_ges_debug);
#define _set_priority0 ges_timeline_element_set_priority
G_GNUC_INTERNAL gboolean
timeline_ripple_object (GESTimeline *timeline, GESTrackObject *obj,
timeline_ripple_object (GESTimeline *timeline, GESTrackElement *obj,
GList * layers, GESEdge edge,
guint64 position);
G_GNUC_INTERNAL gboolean
timeline_slide_object (GESTimeline *timeline, GESTrackObject *obj,
timeline_slide_object (GESTimeline *timeline, GESTrackElement *obj,
GList * layers, GESEdge edge, guint64 position);
G_GNUC_INTERNAL gboolean
timeline_roll_object (GESTimeline *timeline, GESTrackObject *obj,
timeline_roll_object (GESTimeline *timeline, GESTrackElement *obj,
GList * layers, GESEdge edge, guint64 position);
G_GNUC_INTERNAL gboolean
timeline_trim_object (GESTimeline *timeline, GESTrackObject * object,
timeline_trim_object (GESTimeline *timeline, GESTrackElement * object,
GList * layers, GESEdge edge, guint64 position);
G_GNUC_INTERNAL gboolean
ges_timeline_trim_object_simple (GESTimeline * timeline, GESTrackObject * obj,
ges_timeline_trim_object_simple (GESTimeline * timeline, GESTrackElement * obj,
GList * layers, GESEdge edge, guint64 position, gboolean snapping);
G_GNUC_INTERNAL gboolean
ges_timeline_move_object_simple (GESTimeline * timeline, GESTrackObject * object,
ges_timeline_move_object_simple (GESTimeline * timeline, GESTrackElement * object,
GList * layers, GESEdge edge, guint64 position);
G_GNUC_INTERNAL gboolean
timeline_move_object (GESTimeline *timeline, GESTrackObject * object,
timeline_move_object (GESTimeline *timeline, GESTrackElement * object,
GList * layers, GESEdge edge, guint64 position);
G_GNUC_INTERNAL gboolean
@ -205,7 +205,7 @@ void ges_base_xml_formatter_add_encoding_profile (GESBaseXmlFormat
gboolean variableframerate,
GstStructure * properties,
GError ** error);
G_GNUC_INTERNAL void ges_base_xml_formatter_add_track_object (GESBaseXmlFormatter *self,
G_GNUC_INTERNAL void ges_base_xml_formatter_add_track_element (GESBaseXmlFormatter *self,
GType effect_type,
const gchar *asset_id,
const gchar * track_id,

View file

@ -70,7 +70,7 @@ struct _GESPitiviFormatterPrivate
* "effect_name": name
* "effect_props": {"propname": value}}}
*/
GHashTable *track_objects_table;
GHashTable *track_elements_table;
/* {factory-ref: [track-object-ref-id,...]} */
GHashTable *clips_table;
@ -148,7 +148,7 @@ write_int_attribute (xmlTextWriterPtr writer, guint64 nb, const gchar * attr,
}
static void
save_track_objects (xmlTextWriterPtr writer, GList * source_list,
save_track_elements (xmlTextWriterPtr writer, GList * source_list,
GESTrackType type, gint * id)
{
GList *tmp, *tck_objs, *tmp_tck;
@ -166,15 +166,15 @@ save_track_objects (xmlTextWriterPtr writer, GList * source_list,
object = srcmap->obj;
/* Save track associated objects */
tck_objs = ges_clip_get_track_objects (object);
tck_objs = ges_clip_get_track_elements (object);
for (tmp_tck = tck_objs; tmp_tck; tmp_tck = tmp_tck->next) {
xmlChar *cast;
GESTrackObject *tckobj = GES_TRACK_OBJECT (tmp_tck->data);
GESTrack *track = ges_track_object_get_track (tckobj);
GESTrackElement *trackelement = GES_TRACK_ELEMENT (tmp_tck->data);
GESTrack *track = ges_track_element_get_track (trackelement);
const gchar *active, *locked;
if (!track) {
GST_WARNING ("Track object %p not in a track yet", tckobj);
GST_WARNING ("Track object %p not in a track yet", trackelement);
continue;
}
@ -187,16 +187,18 @@ save_track_objects (xmlTextWriterPtr writer, GList * source_list,
xmlTextWriterStartElement (writer, BAD_CAST "track-object");
active =
ges_track_object_is_active (tckobj) ? "(bool)True" : "(bool)False";
ges_track_element_is_active (trackelement) ? "(bool)True" :
"(bool)False";
xmlTextWriterWriteAttribute (writer, BAD_CAST "active", BAD_CAST active);
locked =
ges_track_object_is_locked (tckobj) ? "(bool)True" : "(bool)False";
ges_track_element_is_locked (trackelement) ? "(bool)True" :
"(bool)False";
xmlTextWriterWriteAttribute (writer, BAD_CAST "locked", BAD_CAST locked);
/* Here the priority correspond to the layer priority */
write_int_attribute (writer, srcmap->priority, "priority", "(int)");
g_object_get (G_OBJECT (tckobj), "duration", &duration, "start", &start,
"in-point", &inpoint, NULL);
g_object_get (G_OBJECT (trackelement), "duration", &duration, "start",
&start, "in-point", &inpoint, NULL);
write_int_attribute (writer, duration, "duration", "(gint64)");
write_int_attribute (writer, start, "start", "(gint64)");
write_int_attribute (writer, inpoint, "in_point", "(gint64)");
@ -205,7 +207,7 @@ save_track_objects (xmlTextWriterPtr writer, GList * source_list,
xmlTextWriterWriteAttribute (writer, BAD_CAST "id", BAD_CAST cast);
xmlFree (cast);
if (GES_IS_TRACK_EFFECT (tckobj)) {
if (GES_IS_TRACK_EFFECT (trackelement)) {
GParamSpec **pspecs, *spec;
gchar *serialized, *concatenated;
guint n_props = 0;
@ -213,7 +215,7 @@ save_track_objects (xmlTextWriterPtr writer, GList * source_list,
xmlTextWriterWriteAttribute (writer, BAD_CAST "type",
BAD_CAST "pitivi.timeline.track.TrackEffect");
g_object_get (tckobj, "bin-description", &bin_desc, NULL);
g_object_get (trackelement, "bin-description", &bin_desc, NULL);
xmlTextWriterStartElement (writer, BAD_CAST "effect");
xmlTextWriterStartElement (writer, BAD_CAST "factory");
xmlTextWriterWriteAttribute (writer, BAD_CAST "name",
@ -221,7 +223,8 @@ save_track_objects (xmlTextWriterPtr writer, GList * source_list,
xmlTextWriterEndElement (writer);
xmlTextWriterStartElement (writer, BAD_CAST "gst-element-properties");
pspecs = ges_track_object_list_children_properties (tckobj, &n_props);
pspecs =
ges_track_element_list_children_properties (trackelement, &n_props);
j = 0;
@ -230,7 +233,8 @@ save_track_objects (xmlTextWriterPtr writer, GList * source_list,
spec = pspecs[j];
g_value_init (&val, spec->value_type);
ges_track_object_get_child_property_by_pspec (tckobj, spec, &val);
ges_track_element_get_child_property_by_pspec (trackelement, spec,
&val);
serialized = gst_value_serialize (&val);
if (!g_strcmp0 (spec->name, (gchar *) "preset")) {
concatenated =
@ -258,7 +262,7 @@ save_track_objects (xmlTextWriterPtr writer, GList * source_list,
} else {
xmlTextWriterWriteAttribute (writer, BAD_CAST "type",
BAD_CAST "pitivi.timeline.track.SourceTrackObject");
BAD_CAST "pitivi.timeline.track.SourceTrackElement");
xmlTextWriterStartElement (writer, BAD_CAST "factory-ref");
xmlTextWriterWriteAttribute (writer, BAD_CAST "id",
@ -267,8 +271,8 @@ save_track_objects (xmlTextWriterPtr writer, GList * source_list,
xmlTextWriterEndElement (writer);
xmlTextWriterEndElement (writer);
/* We add effects at the end of the trackobject list */
if (GES_IS_TRACK_EFFECT (tckobj)) {
/* We add effects at the end of the trackelement list */
if (GES_IS_TRACK_EFFECT (trackelement)) {
srcmap->tck_obj_ids = g_list_append (srcmap->tck_obj_ids,
xmlXPathCastNumberToString (*id));
} else {
@ -324,7 +328,7 @@ save_tracks (GESTimeline * timeline, xmlTextWriterPtr writer,
continue;
}
save_track_objects (writer, source_list, type, &id);
save_track_elements (writer, source_list, type, &id);
xmlTextWriterEndElement (writer);
}
@ -386,7 +390,7 @@ save_sources (GESPitiviFormatter * formatter, GList * layers,
uriclip_uri));
srcmap->obj = g_object_ref (clip);
srcmap->priority = ges_timeline_layer_get_priority (layer);
/* We fill up the tck_obj_ids in save_track_objects */
/* We fill up the tck_obj_ids in save_track_elements */
source_list = g_list_append (source_list, srcmap);
}
}
@ -585,7 +589,7 @@ list_sources (GESFormatter * self)
}
static gboolean
parse_track_objects (GESFormatter * self)
parse_track_elements (GESFormatter * self)
{
GESPitiviFormatterPrivate *priv = GES_PITIVI_FORMATTER (self)->priv;
xmlXPathObjectPtr xpathObj;
@ -660,7 +664,7 @@ parse_track_objects (GESFormatter * self)
if (effect_table)
g_hash_table_insert (table, g_strdup ("effect_props"), effect_table);
g_hash_table_insert (priv->track_objects_table, g_strdup (id), table);
g_hash_table_insert (priv->track_elements_table, g_strdup (id), table);
}
xmlXPathFreeObject (xpathObj);
@ -674,7 +678,7 @@ parse_clips (GESFormatter * self)
xmlNodeSetPtr nodes;
xmlXPathObjectPtr xpathObj;
xmlNodePtr clip_nd, tmp_nd, tmp_nd2;
xmlChar *tckobjrefId, *facrefId = NULL;
xmlChar *trackelementrefId, *facrefId = NULL;
GList *reflist = NULL;
GESPitiviFormatterPrivate *priv = GES_PITIVI_FORMATTER (self)->priv;
@ -695,7 +699,7 @@ parse_clips (GESFormatter * self)
clip_nd = nodes->nodeTab[j];
for (tmp_nd = clip_nd->children; tmp_nd; tmp_nd = tmp_nd->next) {
/* We assume that factory-ref is always before the tckobjs-ref */
/* We assume that factory-ref is always before the trackelements-ref */
if (!xmlStrcmp (tmp_nd->name, (xmlChar *) "factory-ref")) {
facrefId = xmlGetProp (tmp_nd, (xmlChar *) "id");
@ -705,14 +709,15 @@ parse_clips (GESFormatter * self)
if (!xmlStrcmp (tmp_nd2->name, (xmlChar *) "track-object-ref")) {
/* We add the track object ref ID to the list of the current
* Clip tracks, this way we can merge 2
* Clip-s into 1 when we have unlinked TrackObject-s */
* Clip-s into 1 when we have unlinked TrackElement-s */
reflist = g_hash_table_lookup (clips_table, facrefId);
tckobjrefId = xmlGetProp (tmp_nd2, (xmlChar *) "id");
reflist = g_list_append (reflist, g_strdup ((gchar *) tckobjrefId));
trackelementrefId = xmlGetProp (tmp_nd2, (xmlChar *) "id");
reflist =
g_list_append (reflist, g_strdup ((gchar *) trackelementrefId));
g_hash_table_insert (clips_table, g_strdup ((gchar *) facrefId),
reflist);
xmlFree (tckobjrefId);
xmlFree (trackelementrefId);
}
}
}
@ -743,8 +748,8 @@ set_properties (GObject * obj, GHashTable * props_table)
}
static void
track_object_added_cb (GESClip * object,
GESTrackObject * track_object, GHashTable * props_table)
track_element_added_cb (GESClip * object,
GESTrackElement * track_element, GHashTable * props_table)
{
gchar *media_type = NULL, *lockedstr;
GList *tck_objs = NULL, *tmp = NULL;
@ -754,7 +759,7 @@ track_object_added_cb (GESClip * object,
gint type = 0;
GESPitiviFormatter *formatter;
tck_objs = ges_clip_get_track_objects (object);
tck_objs = ges_clip_get_track_elements (object);
media_type = (gchar *) g_hash_table_lookup (props_table, "media_type");
lockedstr = (gchar *) g_hash_table_lookup (props_table, "locked");
@ -779,15 +784,15 @@ track_object_added_cb (GESClip * object,
for (tmp = tck_objs; tmp; tmp = tmp->next) {
if (!GES_IS_TRACK_OBJECT (tmp->data)) {
if (!GES_IS_TRACK_ELEMENT (tmp->data)) {
/* If we arrive here something massively screwed */
GST_ERROR ("Not a TrackObject, this is a bug");
GST_ERROR ("Not a TrackElement, this is a bug");
continue;
}
track = ges_track_object_get_track (tmp->data);
track = ges_track_element_get_track (tmp->data);
if (!track) {
GST_WARNING ("TrackObject not in a track yet");
GST_WARNING ("TrackElement not in a track yet");
continue;
}
@ -802,11 +807,11 @@ track_object_added_cb (GESClip * object,
&& track->type == GES_TRACK_TYPE_AUDIO)) {
/* We unlock the track objects so we do not move the whole Clip */
ges_track_object_set_locked (tmp->data, FALSE);
ges_track_element_set_locked (tmp->data, FALSE);
set_properties (G_OBJECT (tmp->data), props_table);
if (locked)
ges_track_object_set_locked (tmp->data, TRUE);
ges_track_element_set_locked (tmp->data, TRUE);
type = track->type;
g_object_get (tmp->data, "start", &start, "duration", &duration, NULL);
@ -814,29 +819,29 @@ track_object_added_cb (GESClip * object,
}
if (has_effect) {
tck_objs = ges_clip_get_track_objects (object);
tck_objs = ges_clip_get_track_elements (object);
/* FIXME make sure this is the way we want to handle that
* ie: set duration and start as the other trackobject
* ie: set duration and start as the other trackelement
* and no let full control to the user. */
for (tmp = tck_objs; tmp; tmp = tmp->next) {
/* We set the effects start and duration */
track = ges_track_object_get_track (tmp->data);
track = ges_track_element_get_track (tmp->data);
if (GES_IS_TRACK_PARSE_LAUNCH_EFFECT (tmp->data)
&& (type == track->type)) {
/* We lock the track objects so we do not move the whole Clip */
ges_track_object_set_locked (tmp->data, FALSE);
ges_track_element_set_locked (tmp->data, FALSE);
g_object_set (tmp->data, "start", start, "duration", duration, NULL);
if (locked)
ges_track_object_set_locked (tmp->data, TRUE);
ges_track_element_set_locked (tmp->data, TRUE);
}
}
}
/* Disconnect the signal */
g_signal_handlers_disconnect_by_func (object, track_object_added_cb,
g_signal_handlers_disconnect_by_func (object, track_element_added_cb,
props_table);
}
@ -853,12 +858,12 @@ make_source (GESFormatter * self, GList * reflist, GHashTable * source_table)
GESUriClip *src = NULL;
gint prio;
gboolean a_avail = FALSE, v_avail = FALSE, video;
GHashTable *tckobj_table = priv->track_objects_table;
GHashTable *trackelement_table = priv->track_elements_table;
for (tmp = reflist; tmp; tmp = tmp->next) {
/* Get the layer */
props_table = g_hash_table_lookup (tckobj_table, (gchar *) tmp->data);
props_table = g_hash_table_lookup (trackelement_table, (gchar *) tmp->data);
prio_str = (gchar *) g_hash_table_lookup (props_table, "priority");
prio_array = g_strsplit (prio_str, ")", 0);
prio = (gint) g_ascii_strtod (prio_array[1], NULL);
@ -918,7 +923,7 @@ make_source (GESFormatter * self, GList * reflist, GHashTable * source_table)
ges_timeline_layer_add_object (layer, GES_CLIP (src));
g_signal_connect (src, "track-object-added",
G_CALLBACK (track_object_added_cb), props_table);
G_CALLBACK (track_element_added_cb), props_table);
priv->sources_to_load = g_list_prepend (priv->sources_to_load, src);
}
@ -929,20 +934,20 @@ make_source (GESFormatter * self, GList * reflist, GHashTable * source_table)
effect = ges_track_parse_launch_effect_new ((gchar *)
g_hash_table_lookup (props_table, (gchar *) "effect_name"));
ges_track_object_set_track_type (GES_TRACK_OBJECT (effect),
ges_track_element_set_track_type (GES_TRACK_ELEMENT (effect),
(video ? GES_TRACK_TYPE_VIDEO : GES_TRACK_TYPE_AUDIO));
effect_table =
g_hash_table_lookup (props_table, (gchar *) "effect_props");
ges_clip_add_track_object (GES_CLIP (src), GES_TRACK_OBJECT (effect));
ges_clip_add_track_element (GES_CLIP (src), GES_TRACK_ELEMENT (effect));
if (!g_strcmp0 (active, (gchar *) "(bool)False"))
ges_track_object_set_active (GES_TRACK_OBJECT (effect), FALSE);
ges_track_element_set_active (GES_TRACK_ELEMENT (effect), FALSE);
if (video)
ges_track_add_object (priv->trackv, GES_TRACK_OBJECT (effect));
ges_track_add_object (priv->trackv, GES_TRACK_ELEMENT (effect));
else
ges_track_add_object (priv->tracka, GES_TRACK_OBJECT (effect));
ges_track_add_object (priv->tracka, GES_TRACK_ELEMENT (effect));
/* Set effect properties */
keys = g_hash_table_get_keys (effect_table);
@ -959,11 +964,11 @@ make_source (GESFormatter * self, GList * reflist, GHashTable * source_table)
if (g_strstr_len (prop_val, -1, "(GEnum)")) {
gchar **val = g_strsplit (prop_val, ")", 2);
ges_track_object_set_child_properties (GES_TRACK_OBJECT (effect),
ges_track_element_set_child_properties (GES_TRACK_ELEMENT (effect),
(gchar *) tmp_key->data, atoi (val[1]), NULL);
g_strfreev (val);
} else if (ges_track_object_lookup_child (GES_TRACK_OBJECT (effect),
} else if (ges_track_element_lookup_child (GES_TRACK_ELEMENT (effect),
(gchar *) tmp->data, NULL, &spec)) {
gchar *caps_str = g_strdup_printf ("structure1, property1=%s;",
prop_val);
@ -973,7 +978,7 @@ make_source (GESFormatter * self, GList * reflist, GHashTable * source_table)
structure = gst_caps_get_structure (caps, 0);
value = gst_structure_get_value (structure, "property1");
ges_track_object_set_child_property_by_pspec (GES_TRACK_OBJECT
ges_track_element_set_child_property_by_pspec (GES_TRACK_ELEMENT
(effect), spec, (GValue *) value);
gst_caps_unref (caps);
}
@ -1056,7 +1061,7 @@ load_pitivi_file_from_uri (GESFormatter * self,
return FALSE;
}
if (!parse_track_objects (self)) {
if (!parse_track_elements (self)) {
GST_ERROR ("Couldn't find track objects markup in the xptv file");
return FALSE;
}
@ -1102,8 +1107,8 @@ ges_pitivi_formatter_finalize (GObject * object)
if (priv->layers_table != NULL)
g_hash_table_destroy (priv->layers_table);
if (priv->track_objects_table != NULL) {
g_hash_table_destroy (priv->track_objects_table);
if (priv->track_elements_table != NULL) {
g_hash_table_destroy (priv->track_elements_table);
}
G_OBJECT_CLASS (ges_pitivi_formatter_parent_class)->finalize (object);
@ -1142,7 +1147,7 @@ ges_pitivi_formatter_init (GESPitiviFormatter * self)
priv = self->priv;
priv->track_objects_table =
priv->track_elements_table =
g_hash_table_new_full (g_str_hash, g_str_equal, g_free,
(GDestroyNotify) g_hash_table_destroy);

View file

@ -32,7 +32,7 @@
#include "ges-internal.h"
#include "ges-test-clip.h"
#include "ges-source-clip.h"
#include "ges-track-object.h"
#include "ges-track-element.h"
#include "ges-track-video-test-source.h"
#include "ges-track-audio-test-source.h"
#include <string.h>
@ -56,8 +56,8 @@ enum
PROP_VOLUME,
};
static GESTrackObject
* ges_test_clip_create_track_object (GESClip * obj, GESTrackType type);
static GESTrackElement
* ges_test_clip_create_track_element (GESClip * obj, GESTrackType type);
static void
ges_test_clip_get_property (GObject * object, guint property_id,
@ -159,7 +159,7 @@ ges_test_clip_class_init (GESTestClipClass * klass)
g_param_spec_boolean ("mute", "Mute", "Mute audio track",
FALSE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
timobj_class->create_track_object = ges_test_clip_create_track_object;
timobj_class->create_track_element = ges_test_clip_create_track_element;
timobj_class->need_fill_track = FALSE;
}
@ -185,7 +185,7 @@ ges_test_clip_init (GESTestClip * self)
void
ges_test_clip_set_mute (GESTestClip * self, gboolean mute)
{
GList *tmp, *trackobjects;
GList *tmp, *trackelements;
GESClip *object = (GESClip *) self;
GST_DEBUG ("self:%p, mute:%d", self, mute);
@ -193,16 +193,17 @@ ges_test_clip_set_mute (GESTestClip * self, gboolean mute)
self->priv->mute = mute;
/* Go over tracked objects, and update 'active' status on all audio objects */
trackobjects = ges_clip_get_track_objects (object);
for (tmp = trackobjects; tmp; tmp = tmp->next) {
GESTrackObject *trackobject = (GESTrackObject *) tmp->data;
trackelements = ges_clip_get_track_elements (object);
for (tmp = trackelements; tmp; tmp = tmp->next) {
GESTrackElement *trackelement = (GESTrackElement *) tmp->data;
if (ges_track_object_get_track (trackobject)->type == GES_TRACK_TYPE_AUDIO)
ges_track_object_set_active (trackobject, !mute);
if (ges_track_element_get_track (trackelement)->type ==
GES_TRACK_TYPE_AUDIO)
ges_track_element_set_active (trackelement, !mute);
g_object_unref (GES_TRACK_OBJECT (tmp->data));
g_object_unref (GES_TRACK_ELEMENT (tmp->data));
}
g_list_free (trackobjects);
g_list_free (trackelements);
}
/**
@ -216,21 +217,21 @@ ges_test_clip_set_mute (GESTestClip * self, gboolean mute)
void
ges_test_clip_set_vpattern (GESTestClip * self, GESVideoTestPattern vpattern)
{
GList *tmp, *trackobjects;
GList *tmp, *trackelements;
GESClip *object = (GESClip *) self;
self->priv->vpattern = vpattern;
trackobjects = ges_clip_get_track_objects (object);
for (tmp = trackobjects; tmp; tmp = tmp->next) {
GESTrackObject *trackobject = (GESTrackObject *) tmp->data;
if (GES_IS_TRACK_VIDEO_TEST_SOURCE (trackobject))
trackelements = ges_clip_get_track_elements (object);
for (tmp = trackelements; tmp; tmp = tmp->next) {
GESTrackElement *trackelement = (GESTrackElement *) tmp->data;
if (GES_IS_TRACK_VIDEO_TEST_SOURCE (trackelement))
ges_track_video_test_source_set_pattern (
(GESTrackVideoTestSource *) trackobject, vpattern);
(GESTrackVideoTestSource *) trackelement, vpattern);
g_object_unref (GES_TRACK_OBJECT (tmp->data));
g_object_unref (GES_TRACK_ELEMENT (tmp->data));
}
g_list_free (trackobjects);
g_list_free (trackelements);
}
/**
@ -244,21 +245,21 @@ ges_test_clip_set_vpattern (GESTestClip * self, GESVideoTestPattern vpattern)
void
ges_test_clip_set_frequency (GESTestClip * self, gdouble freq)
{
GList *tmp, *trackobjects;
GList *tmp, *trackelements;
GESClip *object = (GESClip *) self;
self->priv->freq = freq;
trackobjects = ges_clip_get_track_objects (object);
for (tmp = trackobjects; tmp; tmp = tmp->next) {
GESTrackObject *trackobject = (GESTrackObject *) tmp->data;
if (GES_IS_TRACK_AUDIO_TEST_SOURCE (trackobject))
trackelements = ges_clip_get_track_elements (object);
for (tmp = trackelements; tmp; tmp = tmp->next) {
GESTrackElement *trackelement = (GESTrackElement *) tmp->data;
if (GES_IS_TRACK_AUDIO_TEST_SOURCE (trackelement))
ges_track_audio_test_source_set_freq (
(GESTrackAudioTestSource *) trackobject, freq);
(GESTrackAudioTestSource *) trackelement, freq);
g_object_unref (GES_TRACK_OBJECT (tmp->data));
g_object_unref (GES_TRACK_ELEMENT (tmp->data));
}
g_list_free (trackobjects);
g_list_free (trackelements);
}
/**
@ -272,21 +273,21 @@ ges_test_clip_set_frequency (GESTestClip * self, gdouble freq)
void
ges_test_clip_set_volume (GESTestClip * self, gdouble volume)
{
GList *tmp, *trackobjects;
GList *tmp, *trackelements;
GESClip *object = (GESClip *) self;
self->priv->volume = volume;
trackobjects = ges_clip_get_track_objects (object);
for (tmp = trackobjects; tmp; tmp = tmp->next) {
GESTrackObject *trackobject = (GESTrackObject *) tmp->data;
if (GES_IS_TRACK_AUDIO_TEST_SOURCE (trackobject))
trackelements = ges_clip_get_track_elements (object);
for (tmp = trackelements; tmp; tmp = tmp->next) {
GESTrackElement *trackelement = (GESTrackElement *) tmp->data;
if (GES_IS_TRACK_AUDIO_TEST_SOURCE (trackelement))
ges_track_audio_test_source_set_volume (
(GESTrackAudioTestSource *) trackobject, volume);
(GESTrackAudioTestSource *) trackelement, volume);
g_object_unref (GES_TRACK_OBJECT (tmp->data));
g_object_unref (GES_TRACK_ELEMENT (tmp->data));
}
g_list_free (trackobjects);
g_list_free (trackelements);
}
/**
@ -345,24 +346,24 @@ ges_test_clip_get_volume (GESTestClip * self)
return self->priv->volume;
}
static GESTrackObject *
ges_test_clip_create_track_object (GESClip * obj, GESTrackType type)
static GESTrackElement *
ges_test_clip_create_track_element (GESClip * obj, GESTrackType type)
{
GESTestClipPrivate *priv = GES_TEST_CLIP (obj)->priv;
GESTrackObject *res = NULL;
GESTrackElement *res = NULL;
GST_DEBUG ("Creating a GESTrackTestSource for type: %s",
ges_track_type_name (type));
if (type == GES_TRACK_TYPE_VIDEO) {
res = (GESTrackObject *) ges_track_video_test_source_new ();
res = (GESTrackElement *) ges_track_video_test_source_new ();
ges_track_video_test_source_set_pattern (
(GESTrackVideoTestSource *) res, priv->vpattern);
} else if (type == GES_TRACK_TYPE_AUDIO) {
res = (GESTrackObject *) ges_track_audio_test_source_new ();
res = (GESTrackElement *) ges_track_audio_test_source_new ();
if (priv->mute)
ges_track_object_set_active (res, FALSE);
ges_track_element_set_active (res, FALSE);
ges_track_audio_test_source_set_freq ((GESTrackAudioTestSource *) res,
priv->freq);

View file

@ -27,7 +27,7 @@
#include "ges-internal.h"
#include "ges-text-overlay-clip.h"
#include "ges-track-object.h"
#include "ges-track-element.h"
#include "ges-track-text-overlay.h"
#include <string.h>
@ -63,8 +63,8 @@ enum
PROP_YPOS,
};
static GESTrackObject
* ges_overlay_text_clip_create_track_object (GESClip * obj,
static GESTrackElement
* ges_overlay_text_clip_create_track_element (GESClip * obj,
GESTrackType type);
static void
@ -202,7 +202,8 @@ ges_overlay_text_clip_class_init (GESTextOverlayClipClass * klass)
GES_TEXT_HALIGN_TYPE, DEFAULT_PROP_HALIGNMENT,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));
timobj_class->create_track_object = ges_overlay_text_clip_create_track_object;
timobj_class->create_track_element =
ges_overlay_text_clip_create_track_element;
timobj_class->need_fill_track = FALSE;
/**
@ -265,7 +266,7 @@ ges_overlay_text_clip_init (GESTextOverlayClip * self)
void
ges_overlay_text_clip_set_text (GESTextOverlayClip * self, const gchar * text)
{
GList *tmp, *trackobjects;
GList *tmp, *trackelements;
GESClip *object = (GESClip *) self;
GST_DEBUG ("self:%p, text:%s", self, text);
@ -275,17 +276,18 @@ ges_overlay_text_clip_set_text (GESTextOverlayClip * self, const gchar * text)
self->priv->text = g_strdup (text);
trackobjects = ges_clip_get_track_objects (object);
for (tmp = trackobjects; tmp; tmp = tmp->next) {
GESTrackObject *trackobject = (GESTrackObject *) tmp->data;
trackelements = ges_clip_get_track_elements (object);
for (tmp = trackelements; tmp; tmp = tmp->next) {
GESTrackElement *trackelement = (GESTrackElement *) tmp->data;
if (ges_track_object_get_track (trackobject)->type == GES_TRACK_TYPE_VIDEO)
ges_track_text_overlay_set_text (GES_TRACK_TEXT_OVERLAY
(trackobject), self->priv->text);
if (ges_track_element_get_track (trackelement)->type ==
GES_TRACK_TYPE_VIDEO)
ges_track_text_overlay_set_text (GES_TRACK_TEXT_OVERLAY (trackelement),
self->priv->text);
g_object_unref (GES_TRACK_OBJECT (tmp->data));
g_object_unref (GES_TRACK_ELEMENT (tmp->data));
}
g_list_free (trackobjects);
g_list_free (trackelements);
}
/**
@ -300,7 +302,7 @@ void
ges_overlay_text_clip_set_font_desc (GESTextOverlayClip * self,
const gchar * font_desc)
{
GList *tmp, *trackobjects;
GList *tmp, *trackelements;
GESClip *object = (GESClip *) self;
GST_DEBUG ("self:%p, font_desc:%s", self, font_desc);
@ -310,17 +312,18 @@ ges_overlay_text_clip_set_font_desc (GESTextOverlayClip * self,
self->priv->font_desc = g_strdup (font_desc);
trackobjects = ges_clip_get_track_objects (object);
for (tmp = trackobjects; tmp; tmp = tmp->next) {
GESTrackObject *trackobject = (GESTrackObject *) tmp->data;
trackelements = ges_clip_get_track_elements (object);
for (tmp = trackelements; tmp; tmp = tmp->next) {
GESTrackElement *trackelement = (GESTrackElement *) tmp->data;
if (ges_track_object_get_track (trackobject)->type == GES_TRACK_TYPE_VIDEO)
if (ges_track_element_get_track (trackelement)->type ==
GES_TRACK_TYPE_VIDEO)
ges_track_text_overlay_set_font_desc (GES_TRACK_TEXT_OVERLAY
(trackobject), self->priv->font_desc);
(trackelement), self->priv->font_desc);
g_object_unref (GES_TRACK_OBJECT (tmp->data));
g_object_unref (GES_TRACK_ELEMENT (tmp->data));
}
g_list_free (trackobjects);
g_list_free (trackelements);
}
@ -336,24 +339,25 @@ void
ges_overlay_text_clip_set_halign (GESTextOverlayClip * self,
GESTextHAlign halign)
{
GList *tmp, *trackobjects;
GList *tmp, *trackelements;
GESClip *object = (GESClip *) self;
GST_DEBUG ("self:%p, halign:%d", self, halign);
self->priv->halign = halign;
trackobjects = ges_clip_get_track_objects (object);
for (tmp = trackobjects; tmp; tmp = tmp->next) {
GESTrackObject *trackobject = (GESTrackObject *) tmp->data;
trackelements = ges_clip_get_track_elements (object);
for (tmp = trackelements; tmp; tmp = tmp->next) {
GESTrackElement *trackelement = (GESTrackElement *) tmp->data;
if (ges_track_object_get_track (trackobject)->type == GES_TRACK_TYPE_VIDEO)
if (ges_track_element_get_track (trackelement)->type ==
GES_TRACK_TYPE_VIDEO)
ges_track_text_overlay_set_halignment (GES_TRACK_TEXT_OVERLAY
(trackobject), self->priv->halign);
(trackelement), self->priv->halign);
g_object_unref (GES_TRACK_OBJECT (tmp->data));
g_object_unref (GES_TRACK_ELEMENT (tmp->data));
}
g_list_free (trackobjects);
g_list_free (trackelements);
}
@ -369,24 +373,25 @@ void
ges_overlay_text_clip_set_valign (GESTextOverlayClip * self,
GESTextVAlign valign)
{
GList *tmp, *trackobjects;
GList *tmp, *trackelements;
GESClip *object = (GESClip *) self;
GST_DEBUG ("self:%p, valign:%d", self, valign);
self->priv->valign = valign;
trackobjects = ges_clip_get_track_objects (object);
for (tmp = trackobjects; tmp; tmp = tmp->next) {
GESTrackObject *trackobject = (GESTrackObject *) tmp->data;
trackelements = ges_clip_get_track_elements (object);
for (tmp = trackelements; tmp; tmp = tmp->next) {
GESTrackElement *trackelement = (GESTrackElement *) tmp->data;
if (ges_track_object_get_track (trackobject)->type == GES_TRACK_TYPE_VIDEO)
if (ges_track_element_get_track (trackelement)->type ==
GES_TRACK_TYPE_VIDEO)
ges_track_text_overlay_set_valignment (GES_TRACK_TEXT_OVERLAY
(trackobject), self->priv->valign);
(trackelement), self->priv->valign);
g_object_unref (GES_TRACK_OBJECT (tmp->data));
g_object_unref (GES_TRACK_ELEMENT (tmp->data));
}
g_list_free (trackobjects);
g_list_free (trackelements);
}
@ -402,24 +407,25 @@ ges_overlay_text_clip_set_valign (GESTextOverlayClip * self,
void
ges_overlay_text_clip_set_color (GESTextOverlayClip * self, guint32 color)
{
GList *tmp, *trackobjects;
GList *tmp, *trackelements;
GESClip *object = (GESClip *) self;
GST_DEBUG ("self:%p, color:%d", self, color);
self->priv->color = color;
trackobjects = ges_clip_get_track_objects (object);
for (tmp = trackobjects; tmp; tmp = tmp->next) {
GESTrackObject *trackobject = (GESTrackObject *) tmp->data;
trackelements = ges_clip_get_track_elements (object);
for (tmp = trackelements; tmp; tmp = tmp->next) {
GESTrackElement *trackelement = (GESTrackElement *) tmp->data;
if (ges_track_object_get_track (trackobject)->type == GES_TRACK_TYPE_VIDEO)
ges_track_text_overlay_set_color (GES_TRACK_TEXT_OVERLAY
(trackobject), self->priv->color);
if (ges_track_element_get_track (trackelement)->type ==
GES_TRACK_TYPE_VIDEO)
ges_track_text_overlay_set_color (GES_TRACK_TEXT_OVERLAY (trackelement),
self->priv->color);
g_object_unref (GES_TRACK_OBJECT (tmp->data));
g_object_unref (GES_TRACK_ELEMENT (tmp->data));
}
g_list_free (trackobjects);
g_list_free (trackelements);
}
/**
@ -434,24 +440,25 @@ ges_overlay_text_clip_set_color (GESTextOverlayClip * self, guint32 color)
void
ges_overlay_text_clip_set_xpos (GESTextOverlayClip * self, gdouble position)
{
GList *tmp, *trackobjects;
GList *tmp, *trackelements;
GESClip *object = (GESClip *) self;
GST_DEBUG ("self:%p, xpos:%f", self, position);
self->priv->xpos = position;
trackobjects = ges_clip_get_track_objects (object);
for (tmp = trackobjects; tmp; tmp = tmp->next) {
GESTrackObject *trackobject = (GESTrackObject *) tmp->data;
trackelements = ges_clip_get_track_elements (object);
for (tmp = trackelements; tmp; tmp = tmp->next) {
GESTrackElement *trackelement = (GESTrackElement *) tmp->data;
if (ges_track_object_get_track (trackobject)->type == GES_TRACK_TYPE_VIDEO)
ges_track_text_overlay_set_xpos (GES_TRACK_TEXT_OVERLAY
(trackobject), self->priv->xpos);
if (ges_track_element_get_track (trackelement)->type ==
GES_TRACK_TYPE_VIDEO)
ges_track_text_overlay_set_xpos (GES_TRACK_TEXT_OVERLAY (trackelement),
self->priv->xpos);
g_object_unref (GES_TRACK_OBJECT (tmp->data));
g_object_unref (GES_TRACK_ELEMENT (tmp->data));
}
g_list_free (trackobjects);
g_list_free (trackelements);
}
/**
@ -466,24 +473,25 @@ ges_overlay_text_clip_set_xpos (GESTextOverlayClip * self, gdouble position)
void
ges_overlay_text_clip_set_ypos (GESTextOverlayClip * self, gdouble position)
{
GList *tmp, *trackobjects;
GList *tmp, *trackelements;
GESClip *object = (GESClip *) self;
GST_DEBUG ("self:%p, ypos:%f", self, position);
self->priv->ypos = position;
trackobjects = ges_clip_get_track_objects (object);
for (tmp = trackobjects; tmp; tmp = tmp->next) {
GESTrackObject *trackobject = (GESTrackObject *) tmp->data;
trackelements = ges_clip_get_track_elements (object);
for (tmp = trackelements; tmp; tmp = tmp->next) {
GESTrackElement *trackelement = (GESTrackElement *) tmp->data;
if (ges_track_object_get_track (trackobject)->type == GES_TRACK_TYPE_VIDEO)
ges_track_text_overlay_set_ypos (GES_TRACK_TEXT_OVERLAY
(trackobject), self->priv->ypos);
if (ges_track_element_get_track (trackelement)->type ==
GES_TRACK_TYPE_VIDEO)
ges_track_text_overlay_set_ypos (GES_TRACK_TEXT_OVERLAY (trackelement),
self->priv->ypos);
g_object_unref (GES_TRACK_OBJECT (tmp->data));
g_object_unref (GES_TRACK_ELEMENT (tmp->data));
}
g_list_free (trackobjects);
g_list_free (trackelements);
}
/**
@ -594,17 +602,17 @@ ges_overlay_text_clip_get_ypos (GESTextOverlayClip * self)
return self->priv->ypos;
}
static GESTrackObject *
ges_overlay_text_clip_create_track_object (GESClip * obj, GESTrackType type)
static GESTrackElement *
ges_overlay_text_clip_create_track_element (GESClip * obj, GESTrackType type)
{
GESTextOverlayClipPrivate *priv = GES_OVERLAY_TEXT_CLIP (obj)->priv;
GESTrackObject *res = NULL;
GESTrackElement *res = NULL;
GST_DEBUG ("Creating a GESTrackOverlay");
if (type == GES_TRACK_TYPE_VIDEO) {
res = (GESTrackObject *) ges_track_text_overlay_new ();
res = (GESTrackElement *) ges_track_text_overlay_new ();
GST_DEBUG ("Setting text property");
ges_track_text_overlay_set_text ((GESTrackTextOverlay *) res, priv->text);
ges_track_text_overlay_set_font_desc ((GESTrackTextOverlay *) res,

View file

@ -461,7 +461,7 @@ ges_timeline_layer_is_empty (GESTimelineLayer * layer)
* An object can only be added to one layer.
*
* Calling this method will construct and properly set all the media related
* elements on @object. If you need to know when those objects (actually #GESTrackObject)
* elements on @object. If you need to know when those objects (actually #GESTrackElement)
* are constructed, you should connect to the object::track-object-added signal which
* is emited right after those elements are ready to be used.
*

File diff suppressed because it is too large Load diff

View file

@ -29,7 +29,7 @@
#include "ges-internal.h"
#include "ges-title-clip.h"
#include "ges-source-clip.h"
#include "ges-track-object.h"
#include "ges-track-element.h"
#include "ges-track-title-source.h"
#include <string.h>
@ -68,13 +68,14 @@ enum
PROP_YPOS,
};
static GESTrackObject
* ges_title_clip_create_track_object (GESClip * obj, GESTrackType type);
static GESTrackElement
* ges_title_clip_create_track_element (GESClip * obj, GESTrackType type);
static void
ges_title_clip_track_object_added (GESClip * obj, GESTrackObject * tckobj);
static void
ges_title_clip_track_object_released (GESClip * obj, GESTrackObject * tckobj);
ges_title_clip_track_element_added (GESClip * obj,
GESTrackElement * trackelement);
static void ges_title_clip_track_element_released (GESClip * obj,
GESTrackElement * trackelement);
static void
ges_title_clip_get_property (GObject * object, guint property_id,
@ -229,10 +230,10 @@ ges_title_clip_class_init (GESTitleClipClass * klass)
g_param_spec_boolean ("mute", "Mute", "Mute audio track",
FALSE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
timobj_class->create_track_object = ges_title_clip_create_track_object;
timobj_class->create_track_element = ges_title_clip_create_track_element;
timobj_class->need_fill_track = FALSE;
timobj_class->track_object_added = ges_title_clip_track_object_added;
timobj_class->track_object_released = ges_title_clip_track_object_released;
timobj_class->track_element_added = ges_title_clip_track_element_added;
timobj_class->track_element_released = ges_title_clip_track_element_released;
/**
* GESTitleClip:color:
@ -405,7 +406,7 @@ ges_title_clip_set_valignment (GESTitleClip * self, GESTextVAlign valign)
void
ges_title_clip_set_mute (GESTitleClip * self, gboolean mute)
{
GList *tmp, *trackobjects;
GList *tmp, *trackelements;
GESClip *object = (GESClip *) self;
GST_DEBUG_OBJECT (self, "mute:%d", mute);
@ -413,17 +414,18 @@ ges_title_clip_set_mute (GESTitleClip * self, gboolean mute)
self->priv->mute = mute;
/* Go over tracked objects, and update 'active' status on all audio objects */
/* FIXME : We need a much less crack way to find the trackobject to change */
trackobjects = ges_clip_get_track_objects (object);
for (tmp = trackobjects; tmp; tmp = tmp->next) {
GESTrackObject *trackobject = (GESTrackObject *) tmp->data;
/* FIXME : We need a much less crack way to find the trackelement to change */
trackelements = ges_clip_get_track_elements (object);
for (tmp = trackelements; tmp; tmp = tmp->next) {
GESTrackElement *trackelement = (GESTrackElement *) tmp->data;
if (ges_track_object_get_track (trackobject)->type == GES_TRACK_TYPE_AUDIO)
ges_track_object_set_active (trackobject, !mute);
if (ges_track_element_get_track (trackelement)->type ==
GES_TRACK_TYPE_AUDIO)
ges_track_element_set_active (trackelement, !mute);
g_object_unref (GES_TRACK_OBJECT (tmp->data));
g_object_unref (GES_TRACK_ELEMENT (tmp->data));
}
g_list_free (trackobjects);
g_list_free (trackelements);
}
/**
@ -659,41 +661,43 @@ ges_title_clip_get_ypos (GESTitleClip * self)
}
static void
ges_title_clip_track_object_released (GESClip * obj, GESTrackObject * tckobj)
ges_title_clip_track_element_released (GESClip * obj,
GESTrackElement * trackelement)
{
GESTitleClipPrivate *priv = GES_TITLE_CLIP (obj)->priv;
/* If this is called, we should be sure the tckobj exists */
if (GES_IS_TRACK_TITLE_SOURCE (tckobj)) {
GST_DEBUG_OBJECT (obj, "%p released from %p", tckobj, obj);
priv->track_titles = g_slist_remove (priv->track_titles, tckobj);
g_object_unref (tckobj);
/* If this is called, we should be sure the trackelement exists */
if (GES_IS_TRACK_TITLE_SOURCE (trackelement)) {
GST_DEBUG_OBJECT (obj, "%p released from %p", trackelement, obj);
priv->track_titles = g_slist_remove (priv->track_titles, trackelement);
g_object_unref (trackelement);
}
}
static void
ges_title_clip_track_object_added (GESClip * obj, GESTrackObject * tckobj)
ges_title_clip_track_element_added (GESClip * obj,
GESTrackElement * trackelement)
{
GESTitleClipPrivate *priv = GES_TITLE_CLIP (obj)->priv;
if (GES_IS_TRACK_TITLE_SOURCE (tckobj)) {
GST_DEBUG_OBJECT (obj, "%p added to %p", tckobj, obj);
if (GES_IS_TRACK_TITLE_SOURCE (trackelement)) {
GST_DEBUG_OBJECT (obj, "%p added to %p", trackelement, obj);
priv->track_titles =
g_slist_prepend (priv->track_titles, g_object_ref (tckobj));
g_slist_prepend (priv->track_titles, g_object_ref (trackelement));
}
}
static GESTrackObject *
ges_title_clip_create_track_object (GESClip * obj, GESTrackType type)
static GESTrackElement *
ges_title_clip_create_track_element (GESClip * obj, GESTrackType type)
{
GESTitleClipPrivate *priv = GES_TITLE_CLIP (obj)->priv;
GESTrackObject *res = NULL;
GESTrackElement *res = NULL;
GST_DEBUG_OBJECT (obj, "a GESTrackTitleSource");
if (type == GES_TRACK_TYPE_VIDEO) {
res = (GESTrackObject *) ges_track_title_source_new ();
res = (GESTrackElement *) ges_track_title_source_new ();
GST_DEBUG_OBJECT (obj, "text property");
ges_track_title_source_set_text ((GESTrackTitleSource *) res, priv->text);
ges_track_title_source_set_font_desc ((GESTrackTitleSource *) res,

View file

@ -28,7 +28,7 @@
*/
#include "ges-internal.h"
#include "ges-track-object.h"
#include "ges-track-element.h"
#include "ges-track-audio-test-source.h"
G_DEFINE_TYPE (GESTrackAudioTestSource, ges_track_audio_test_source,
@ -51,14 +51,14 @@ static void ges_track_audio_test_source_get_property (GObject * object, guint
static void ges_track_audio_test_source_set_property (GObject * object, guint
property_id, const GValue * value, GParamSpec * pspec);
static GstElement *ges_track_audio_test_source_create_element (GESTrackObject *
static GstElement *ges_track_audio_test_source_create_element (GESTrackElement *
self);
static void
ges_track_audio_test_source_class_init (GESTrackAudioTestSourceClass * klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GESTrackObjectClass *bg_class = GES_TRACK_OBJECT_CLASS (klass);
GESTrackElementClass *bg_class = GES_TRACK_ELEMENT_CLASS (klass);
g_type_class_add_private (klass, sizeof (GESTrackAudioTestSourcePrivate));
@ -99,7 +99,7 @@ ges_track_audio_test_source_set_property (GObject * object,
}
static GstElement *
ges_track_audio_test_source_create_element (GESTrackObject * trksrc)
ges_track_audio_test_source_create_element (GESTrackElement * trksrc)
{
GESTrackAudioTestSource *self;
GstElement *ret;
@ -123,7 +123,8 @@ void
ges_track_audio_test_source_set_freq (GESTrackAudioTestSource * self,
gdouble freq)
{
GstElement *element = ges_track_object_get_element (GES_TRACK_OBJECT (self));
GstElement *element =
ges_track_element_get_element (GES_TRACK_ELEMENT (self));
self->priv->freq = freq;
if (element)
@ -141,7 +142,8 @@ void
ges_track_audio_test_source_set_volume (GESTrackAudioTestSource * self,
gdouble volume)
{
GstElement *element = ges_track_object_get_element (GES_TRACK_OBJECT (self));
GstElement *element =
ges_track_element_get_element (GES_TRACK_ELEMENT (self));
self->priv->volume = volume;
if (element)

View file

@ -24,7 +24,7 @@
*/
#include "ges-internal.h"
#include "ges-track-object.h"
#include "ges-track-element.h"
#include "ges-track-audio-transition.h"
#include <gst/controller/gstdirectcontrolbinding.h>
@ -51,9 +51,9 @@ enum
#define fast_element_link(a,b) gst_element_link_pads_full((a),"src",(b),"sink",GST_PAD_LINK_CHECK_NOTHING)
static void
ges_track_audio_transition_duration_changed (GESTrackObject * self, guint64);
ges_track_audio_transition_duration_changed (GESTrackElement * self, guint64);
static GstElement *ges_track_audio_transition_create_element (GESTrackObject
static GstElement *ges_track_audio_transition_create_element (GESTrackElement
* self);
static void ges_track_audio_transition_dispose (GObject * object);
@ -70,12 +70,12 @@ static void
ges_track_audio_transition_class_init (GESTrackAudioTransitionClass * klass)
{
GObjectClass *object_class;
GESTrackObjectClass *toclass;
GESTrackElementClass *toclass;
g_type_class_add_private (klass, sizeof (GESTrackAudioTransitionPrivate));
object_class = G_OBJECT_CLASS (klass);
toclass = GES_TRACK_OBJECT_CLASS (klass);
toclass = GES_TRACK_ELEMENT_CLASS (klass);
object_class->get_property = ges_track_audio_transition_get_property;
object_class->set_property = ges_track_audio_transition_set_property;
@ -161,7 +161,7 @@ link_element_to_mixer_with_volume (GstBin * bin, GstElement * element,
}
static GstElement *
ges_track_audio_transition_create_element (GESTrackObject * object)
ges_track_audio_transition_create_element (GESTrackElement * object)
{
GESTrackAudioTransition *self;
GstElement *topbin, *iconva, *iconvb, *oconv;
@ -230,11 +230,11 @@ ges_track_audio_transition_create_element (GESTrackObject * object)
}
static void
ges_track_audio_transition_duration_changed (GESTrackObject * object,
ges_track_audio_transition_duration_changed (GESTrackElement * object,
guint64 duration)
{
GESTrackAudioTransition *self;
GstElement *gnlobj = ges_track_object_get_gnlobject (object);
GstElement *gnlobj = ges_track_element_get_gnlobject (object);
GstTimedValueControlSource *ta, *tb;
self = GES_TRACK_AUDIO_TRANSITION (object);

View file

@ -27,13 +27,14 @@
#include <string.h>
#include "ges-internal.h"
#include "ges-track-object.h"
#include "ges-track-element.h"
#include "ges-track-effect.h"
G_DEFINE_ABSTRACT_TYPE (GESTrackEffect, ges_track_effect,
GES_TYPE_TRACK_OPERATION);
static GHashTable *ges_track_effect_get_props_hashtable (GESTrackObject * self);
static GHashTable *ges_track_effect_get_props_hashtable (GESTrackElement *
self);
guint pspec_hash (gconstpointer key_spec);
static gboolean pspec_equal (gconstpointer key_spec_1,
gconstpointer key_spec_2);
@ -46,7 +47,7 @@ struct _GESTrackEffectPrivate
static void
ges_track_effect_class_init (GESTrackEffectClass * klass)
{
GESTrackObjectClass *obj_bg_class = GES_TRACK_OBJECT_CLASS (klass);
GESTrackElementClass *obj_bg_class = GES_TRACK_ELEMENT_CLASS (klass);
g_type_class_add_private (klass, sizeof (GESTrackEffectPrivate));
@ -86,7 +87,7 @@ pspec_hash (gconstpointer key_spec)
/* Virtual methods */
static GHashTable *
ges_track_effect_get_props_hashtable (GESTrackObject * self)
ges_track_effect_get_props_hashtable (GESTrackElement * self)
{
GValue item = { 0, };
GstIterator *it;
@ -98,7 +99,7 @@ ges_track_effect_get_props_hashtable (GESTrackObject * self)
gboolean done = FALSE;
GHashTable *ret = NULL;
element = ges_track_object_get_element (self);
element = ges_track_element_get_element (self);
if (!element) {
GST_DEBUG
("Can't build the property hashtable until the gnlobject is created");

View file

@ -19,10 +19,10 @@
*/
/**
* SECTION:ges-track-object
* SECTION:ges-track-element
* @short_description: Base Class for objects contained in a GESTrack
*
* #GESTrackObject is the Base Class for any object that can be contained in a
* #GESTrackElement is the Base Class for any object that can be contained in a
* #GESTrack.
*
* It contains the basic information as to the location of the object within
@ -32,15 +32,15 @@
#include "ges-internal.h"
#include "ges-extractable.h"
#include "ges-track-object.h"
#include "ges-track-element.h"
#include "ges-clip.h"
#include "ges-meta-container.h"
#include <gobject/gvaluecollector.h>
G_DEFINE_ABSTRACT_TYPE (GESTrackObject, ges_track_object,
G_DEFINE_ABSTRACT_TYPE (GESTrackElement, ges_track_element,
GES_TYPE_TIMELINE_ELEMENT);
struct _GESTrackObjectPrivate
struct _GESTrackElementPrivate
{
GESTrackType track_type;
@ -86,30 +86,30 @@ enum
LAST_SIGNAL
};
static guint ges_track_object_signals[LAST_SIGNAL] = { 0 };
static guint ges_track_element_signals[LAST_SIGNAL] = { 0 };
static GstElement *ges_track_object_create_gnl_object_func (GESTrackObject *
static GstElement *ges_track_element_create_gnl_object_func (GESTrackElement *
object);
static void gnlobject_start_cb (GstElement * gnlobject, GParamSpec * arg
G_GNUC_UNUSED, GESTrackObject * obj);
G_GNUC_UNUSED, GESTrackElement * obj);
static void gnlobject_media_start_cb (GstElement * gnlobject, GParamSpec * arg
G_GNUC_UNUSED, GESTrackObject * obj);
G_GNUC_UNUSED, GESTrackElement * obj);
static void gnlobject_priority_cb (GstElement * gnlobject, GParamSpec * arg
G_GNUC_UNUSED, GESTrackObject * obj);
G_GNUC_UNUSED, GESTrackElement * obj);
static void gnlobject_duration_cb (GstElement * gnlobject, GParamSpec * arg
G_GNUC_UNUSED, GESTrackObject * obj);
G_GNUC_UNUSED, GESTrackElement * obj);
static void gnlobject_active_cb (GstElement * gnlobject, GParamSpec * arg
G_GNUC_UNUSED, GESTrackObject * obj);
G_GNUC_UNUSED, GESTrackElement * obj);
static void connect_properties_signals (GESTrackObject * object);
static void connect_properties_signals (GESTrackElement * object);
static void connect_signal (gpointer key, gpointer value, gpointer user_data);
static void gst_element_prop_changed_cb (GstElement * element, GParamSpec * arg
G_GNUC_UNUSED, GESTrackObject * obj);
G_GNUC_UNUSED, GESTrackElement * obj);
static gboolean _set_start (GESTimelineElement * element, GstClockTime start);
static gboolean _set_inpoint (GESTimelineElement * element,
@ -121,23 +121,24 @@ static void _deep_copy (GESTimelineElement * element,
GESTimelineElement * copy);
static inline void
ges_track_object_set_locked_internal (GESTrackObject * object, gboolean locked);
ges_track_element_set_locked_internal (GESTrackElement * object,
gboolean locked);
static GParamSpec **default_list_children_properties (GESTrackObject * object,
static GParamSpec **default_list_children_properties (GESTrackElement * object,
guint * n_properties);
static void
ges_track_object_get_property (GObject * object, guint property_id,
ges_track_element_get_property (GObject * object, guint property_id,
GValue * value, GParamSpec * pspec)
{
GESTrackObject *tobj = GES_TRACK_OBJECT (object);
GESTrackElement *tobj = GES_TRACK_ELEMENT (object);
switch (property_id) {
case PROP_ACTIVE:
g_value_set_boolean (value, ges_track_object_is_active (tobj));
g_value_set_boolean (value, ges_track_element_is_active (tobj));
break;
case PROP_LOCKED:
g_value_set_boolean (value, ges_track_object_is_locked (tobj));
g_value_set_boolean (value, ges_track_element_is_locked (tobj));
break;
case PROP_TRACK_TYPE:
g_value_set_flags (value, tobj->priv->track_type);
@ -151,17 +152,17 @@ ges_track_object_get_property (GObject * object, guint property_id,
}
static void
ges_track_object_set_property (GObject * object, guint property_id,
ges_track_element_set_property (GObject * object, guint property_id,
const GValue * value, GParamSpec * pspec)
{
GESTrackObject *tobj = GES_TRACK_OBJECT (object);
GESTrackElement *tobj = GES_TRACK_ELEMENT (object);
switch (property_id) {
case PROP_ACTIVE:
ges_track_object_set_active (tobj, g_value_get_boolean (value));
ges_track_element_set_active (tobj, g_value_get_boolean (value));
break;
case PROP_LOCKED:
ges_track_object_set_locked_internal (tobj, g_value_get_boolean (value));
ges_track_element_set_locked_internal (tobj, g_value_get_boolean (value));
break;
case PROP_TRACK_TYPE:
tobj->priv->track_type = g_value_get_flags (value);
@ -172,9 +173,9 @@ ges_track_object_set_property (GObject * object, guint property_id,
}
static void
ges_track_object_dispose (GObject * object)
ges_track_element_dispose (GObject * object)
{
GESTrackObjectPrivate *priv = GES_TRACK_OBJECT (object)->priv;
GESTrackElementPrivate *priv = GES_TRACK_ELEMENT (object)->priv;
if (priv->properties_hashtable)
g_hash_table_destroy (priv->properties_hashtable);
@ -185,7 +186,7 @@ ges_track_object_dispose (GObject * object)
if (priv->track != NULL) {
GST_ERROR_OBJECT (object, "Still in %p, this means that you forgot"
" to remove it from the GESTrack it is contained in. You always need"
" to remove a GESTrackObject from its track before dropping the last"
" to remove a GESTrackElement from its track before dropping the last"
" reference\n"
"This problem may also be caused by a refcounting bug in"
" the application or GES itself.", priv->track);
@ -198,31 +199,31 @@ ges_track_object_dispose (GObject * object)
priv->gnlobject = NULL;
}
G_OBJECT_CLASS (ges_track_object_parent_class)->dispose (object);
G_OBJECT_CLASS (ges_track_element_parent_class)->dispose (object);
}
static void
ges_track_object_finalize (GObject * object)
ges_track_element_finalize (GObject * object)
{
G_OBJECT_CLASS (ges_track_object_parent_class)->finalize (object);
G_OBJECT_CLASS (ges_track_element_parent_class)->finalize (object);
}
static void
ges_track_object_class_init (GESTrackObjectClass * klass)
ges_track_element_class_init (GESTrackElementClass * klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GESTimelineElementClass *element_class = GES_TIMELINE_ELEMENT_CLASS (klass);
g_type_class_add_private (klass, sizeof (GESTrackObjectPrivate));
g_type_class_add_private (klass, sizeof (GESTrackElementPrivate));
object_class->get_property = ges_track_object_get_property;
object_class->set_property = ges_track_object_set_property;
object_class->dispose = ges_track_object_dispose;
object_class->finalize = ges_track_object_finalize;
object_class->get_property = ges_track_element_get_property;
object_class->set_property = ges_track_element_set_property;
object_class->dispose = ges_track_element_dispose;
object_class->finalize = ges_track_element_finalize;
/**
* GESTrackObject:active:
* GESTrackElement:active:
*
* Whether the object should be taken into account in the #GESTrack output.
* If #FALSE, then its contents will not be used in the resulting track.
@ -234,7 +235,7 @@ ges_track_object_class_init (GESTrackObjectClass * klass)
properties[PROP_ACTIVE]);
/**
* GESTrackObject:locked:
* GESTrackElement:locked:
*
* If %TRUE, then moves in sync with its controlling #GESClip
*/
@ -257,17 +258,17 @@ ges_track_object_class_init (GESTrackObjectClass * klass)
/**
* GESTrackObject::deep-notify:
* @track_object: a #GESTrackObject
* GESTrackElement::deep-notify:
* @track_element: a #GESTrackElement
* @prop_object: the object that originated the signal
* @prop: the property that changed
*
* The deep notify signal is used to be notified of property changes of all
* the childs of @track_object
* the childs of @track_element
*
* Since: 0.10.2
*/
ges_track_object_signals[DEEP_NOTIFY] =
ges_track_element_signals[DEEP_NOTIFY] =
g_signal_new ("deep-notify", G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_FIRST | G_SIGNAL_NO_RECURSE | G_SIGNAL_DETAILED |
G_SIGNAL_NO_HOOKS, 0, NULL, NULL, g_cclosure_marshal_generic,
@ -279,17 +280,17 @@ ges_track_object_class_init (GESTrackObjectClass * klass)
element_class->set_priority = _set_priority;
element_class->deep_copy = _deep_copy;
klass->create_gnl_object = ges_track_object_create_gnl_object_func;
klass->create_gnl_object = ges_track_element_create_gnl_object_func;
/* There is no 'get_props_hashtable' default implementation */
klass->get_props_hastable = NULL;
klass->list_children_properties = default_list_children_properties;
}
static void
ges_track_object_init (GESTrackObject * self)
ges_track_element_init (GESTrackElement * self)
{
GESTrackObjectPrivate *priv = self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
GES_TYPE_TRACK_OBJECT, GESTrackObjectPrivate);
GESTrackElementPrivate *priv = self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
GES_TYPE_TRACK_ELEMENT, GESTrackElementPrivate);
/* Sane default values */
priv->pending_start = 0;
@ -304,7 +305,7 @@ ges_track_object_init (GESTrackObject * self)
static gboolean
_set_start (GESTimelineElement * element, GstClockTime start)
{
GESTrackObject *object = GES_TRACK_OBJECT (element);
GESTrackElement *object = GES_TRACK_ELEMENT (element);
GST_DEBUG ("object:%p, start:%" GST_TIME_FORMAT,
object, GST_TIME_ARGS (start));
@ -323,7 +324,7 @@ _set_start (GESTimelineElement * element, GstClockTime start)
static gboolean
_set_inpoint (GESTimelineElement * element, GstClockTime inpoint)
{
GESTrackObject *object = GES_TRACK_OBJECT (element);
GESTrackElement *object = GES_TRACK_ELEMENT (element);
GST_DEBUG ("object:%p, inpoint:%" GST_TIME_FORMAT,
object, GST_TIME_ARGS (inpoint));
@ -343,8 +344,8 @@ _set_inpoint (GESTimelineElement * element, GstClockTime inpoint)
static gboolean
_set_duration (GESTimelineElement * element, GstClockTime duration)
{
GESTrackObject *object = GES_TRACK_OBJECT (element);
GESTrackObjectPrivate *priv = object->priv;
GESTrackElement *object = GES_TRACK_ELEMENT (element);
GESTrackElementPrivate *priv = object->priv;
GST_DEBUG ("object:%p, duration:%" GST_TIME_FORMAT,
object, GST_TIME_ARGS (duration));
@ -368,7 +369,7 @@ _set_duration (GESTimelineElement * element, GstClockTime duration)
static gboolean
_set_priority (GESTimelineElement * element, guint32 priority)
{
GESTrackObject *object = GES_TRACK_OBJECT (element);
GESTrackElement *object = GES_TRACK_ELEMENT (element);
GST_DEBUG ("object:%p, priority:%" G_GUINT32_FORMAT, object, priority);
@ -384,8 +385,8 @@ _set_priority (GESTimelineElement * element, guint32 priority)
}
/**
* ges_track_object_set_active:
* @object: a #GESTrackObject
* ges_track_element_set_active:
* @object: a #GESTrackElement
* @active: visibility
*
* Sets the usage of the @object. If @active is %TRUE, the object will be used for
@ -394,9 +395,9 @@ _set_priority (GESTimelineElement * element, guint32 priority)
* Returns: %TRUE if the property was toggled, else %FALSE
*/
gboolean
ges_track_object_set_active (GESTrackObject * object, gboolean active)
ges_track_element_set_active (GESTrackElement * object, gboolean active)
{
g_return_val_if_fail (GES_IS_TRACK_OBJECT (object), FALSE);
g_return_val_if_fail (GES_IS_TRACK_ELEMENT (object), FALSE);
GST_DEBUG ("object:%p, active:%d", object, active);
@ -411,9 +412,9 @@ ges_track_object_set_active (GESTrackObject * object, gboolean active)
}
void
ges_track_object_set_track_type (GESTrackObject * object, GESTrackType type)
ges_track_element_set_track_type (GESTrackElement * object, GESTrackType type)
{
g_return_if_fail (GES_IS_TRACK_OBJECT (object));
g_return_if_fail (GES_IS_TRACK_ELEMENT (object));
if (object->priv->track_type != type) {
object->priv->track_type = type;
@ -422,9 +423,9 @@ ges_track_object_set_track_type (GESTrackObject * object, GESTrackType type)
}
GESTrackType
ges_track_object_get_track_type (GESTrackObject * object)
ges_track_element_get_track_type (GESTrackElement * object)
{
g_return_val_if_fail (GES_IS_TRACK_OBJECT (object), GES_TRACK_TYPE_UNKNOWN);
g_return_val_if_fail (GES_IS_TRACK_ELEMENT (object), GES_TRACK_TYPE_UNKNOWN);
return object->priv->track_type;
}
@ -432,7 +433,7 @@ ges_track_object_get_track_type (GESTrackObject * object)
/* Callbacks from the GNonLin object */
static void
gnlobject_start_cb (GstElement * gnlobject, GParamSpec * arg G_GNUC_UNUSED,
GESTrackObject * obj)
GESTrackElement * obj)
{
guint64 start;
@ -449,9 +450,9 @@ gnlobject_start_cb (GstElement * gnlobject, GParamSpec * arg G_GNUC_UNUSED,
static void
gst_element_prop_changed_cb (GstElement * element, GParamSpec * arg
G_GNUC_UNUSED, GESTrackObject * obj)
G_GNUC_UNUSED, GESTrackElement * obj)
{
g_signal_emit (obj, ges_track_object_signals[DEEP_NOTIFY], 0,
g_signal_emit (obj, ges_track_element_signals[DEEP_NOTIFY], 0,
GST_ELEMENT (element), arg);
}
@ -462,13 +463,13 @@ connect_signal (gpointer key, gpointer value, gpointer user_data)
g_signal_connect (G_OBJECT (value),
signame, G_CALLBACK (gst_element_prop_changed_cb),
GES_TRACK_OBJECT (user_data));
GES_TRACK_ELEMENT (user_data));
g_free (signame);
}
static void
connect_properties_signals (GESTrackObject * object)
connect_properties_signals (GESTrackElement * object)
{
if (G_UNLIKELY (!object->priv->properties_hashtable)) {
GST_WARNING ("The properties_hashtable hasn't been set");
@ -483,7 +484,7 @@ connect_properties_signals (GESTrackObject * object)
/* Callbacks from the GNonLin object */
static void
gnlobject_media_start_cb (GstElement * gnlobject,
GParamSpec * arg G_GNUC_UNUSED, GESTrackObject * obj)
GParamSpec * arg G_GNUC_UNUSED, GESTrackElement * obj)
{
guint64 inpoint;
@ -500,7 +501,7 @@ gnlobject_media_start_cb (GstElement * gnlobject,
static void
gnlobject_priority_cb (GstElement * gnlobject, GParamSpec * arg G_GNUC_UNUSED,
GESTrackObject * obj)
GESTrackElement * obj)
{
guint32 priority;
@ -516,12 +517,12 @@ gnlobject_priority_cb (GstElement * gnlobject, GParamSpec * arg G_GNUC_UNUSED,
static void
gnlobject_duration_cb (GstElement * gnlobject, GParamSpec * arg G_GNUC_UNUSED,
GESTrackObject * obj)
GESTrackElement * obj)
{
guint64 duration;
GESTrackObjectClass *klass;
GESTrackElementClass *klass;
klass = GES_TRACK_OBJECT_GET_CLASS (obj);
klass = GES_TRACK_ELEMENT_GET_CLASS (obj);
g_object_get (gnlobject, "duration", &duration, NULL);
@ -539,12 +540,12 @@ gnlobject_duration_cb (GstElement * gnlobject, GParamSpec * arg G_GNUC_UNUSED,
static void
gnlobject_active_cb (GstElement * gnlobject, GParamSpec * arg G_GNUC_UNUSED,
GESTrackObject * obj)
GESTrackElement * obj)
{
gboolean active;
GESTrackObjectClass *klass;
GESTrackElementClass *klass;
klass = GES_TRACK_OBJECT_GET_CLASS (obj);
klass = GES_TRACK_ELEMENT_GET_CLASS (obj);
g_object_get (gnlobject, "active", &active, NULL);
@ -560,13 +561,13 @@ gnlobject_active_cb (GstElement * gnlobject, GParamSpec * arg G_GNUC_UNUSED,
/* default 'create_gnl_object' virtual method implementation */
static GstElement *
ges_track_object_create_gnl_object_func (GESTrackObject * self)
ges_track_element_create_gnl_object_func (GESTrackElement * self)
{
GESTrackObjectClass *klass = NULL;
GESTrackElementClass *klass = NULL;
GstElement *child = NULL;
GstElement *gnlobject;
klass = GES_TRACK_OBJECT_GET_CLASS (self);
klass = GES_TRACK_ELEMENT_GET_CLASS (self);
if (G_UNLIKELY (self->priv->gnlobject != NULL))
goto already_have_gnlobject;
@ -611,7 +612,7 @@ already_have_gnlobject:
no_gnlfactory:
{
GST_ERROR ("No GESTrackObject::gnlobject_factorytype implementation!");
GST_ERROR ("No GESTrackElement::gnlobject_factorytype implementation!");
return NULL;
}
@ -639,9 +640,9 @@ add_failure:
}
static gboolean
ensure_gnl_object (GESTrackObject * object)
ensure_gnl_object (GESTrackElement * object)
{
GESTrackObjectClass *class;
GESTrackElementClass *class;
GstElement *gnlobject;
GHashTable *props_hash;
gboolean res = TRUE;
@ -652,7 +653,7 @@ ensure_gnl_object (GESTrackObject * object)
/* 1. Create the GnlObject */
GST_DEBUG ("Creating GnlObject");
class = GES_TRACK_OBJECT_GET_CLASS (object);
class = GES_TRACK_ELEMENT_GET_CLASS (object);
if (G_UNLIKELY (class->create_gnl_object == NULL)) {
GST_ERROR ("No 'create_gnl_object' implementation !");
@ -678,7 +679,7 @@ ensure_gnl_object (GESTrackObject * object)
object->priv->gnlobject = gst_object_ref (gnlobject);
if (object->priv->timelineobj)
res = ges_clip_fill_track_object (object->priv->timelineobj,
res = ges_clip_fill_track_element (object->priv->timelineobj,
object, object->priv->gnlobject);
else
res = TRUE;
@ -735,7 +736,7 @@ done:
/* INTERNAL USAGE */
gboolean
ges_track_object_set_track (GESTrackObject * object, GESTrack * track)
ges_track_element_set_track (GESTrackElement * object, GESTrack * track)
{
gboolean ret = TRUE;
GST_DEBUG ("object:%p, track:%p", object, track);
@ -757,8 +758,8 @@ ges_track_object_set_track (GESTrackObject * object, GESTrack * track)
}
/**
* ges_track_object_get_track:
* @object: a #GESTrackObject
* ges_track_element_get_track:
* @object: a #GESTrackElement
*
* Get the #GESTrack to which this object belongs.
*
@ -766,22 +767,22 @@ ges_track_object_set_track (GESTrackObject * object, GESTrack * track)
* is not in any track
*/
GESTrack *
ges_track_object_get_track (GESTrackObject * object)
ges_track_element_get_track (GESTrackElement * object)
{
g_return_val_if_fail (GES_IS_TRACK_OBJECT (object), NULL);
g_return_val_if_fail (GES_IS_TRACK_ELEMENT (object), NULL);
return object->priv->track;
}
/**
* ges_track_object_set_clip:
* @object: The #GESTrackObject to set the parent to
* ges_track_element_set_clip:
* @object: The #GESTrackElement to set the parent to
* @clipect: The #GESClip, parent of @clip or %NULL
*
* Set the #GESClip to which @object belongs.
*/
void
ges_track_object_set_clip (GESTrackObject * object, GESClip * clipect)
ges_track_element_set_clip (GESTrackElement * object, GESClip * clipect)
{
GST_DEBUG ("object:%p, clip:%p", object, clipect);
@ -789,8 +790,8 @@ ges_track_object_set_clip (GESTrackObject * object, GESClip * clipect)
}
/**
* ges_track_object_get_clip:
* @object: a #GESTrackObject
* ges_track_element_get_clip:
* @object: a #GESTrackElement
*
* Get the #GESClip which is controlling this track object
*
@ -798,32 +799,32 @@ ges_track_object_set_clip (GESTrackObject * object, GESClip * clipect)
* this track object
*/
GESClip *
ges_track_object_get_clip (GESTrackObject * object)
ges_track_element_get_clip (GESTrackElement * object)
{
g_return_val_if_fail (GES_IS_TRACK_OBJECT (object), NULL);
g_return_val_if_fail (GES_IS_TRACK_ELEMENT (object), NULL);
return object->priv->timelineobj;
}
/**
* ges_track_object_get_gnlobject:
* @object: a #GESTrackObject
* ges_track_element_get_gnlobject:
* @object: a #GESTrackElement
*
* Get the GNonLin object this object is controlling.
*
* Returns: (transfer none): the GNonLin object this object is controlling.
*/
GstElement *
ges_track_object_get_gnlobject (GESTrackObject * object)
ges_track_element_get_gnlobject (GESTrackElement * object)
{
g_return_val_if_fail (GES_IS_TRACK_OBJECT (object), NULL);
g_return_val_if_fail (GES_IS_TRACK_ELEMENT (object), NULL);
return object->priv->gnlobject;
}
/**
* ges_track_object_get_element:
* @object: a #GESTrackObject
* ges_track_element_get_element:
* @object: a #GESTrackElement
*
* Get the #GstElement this track object is controlling within GNonLin.
*
@ -831,22 +832,23 @@ ges_track_object_get_gnlobject (GESTrackObject * object)
* within GNonLin.
*/
GstElement *
ges_track_object_get_element (GESTrackObject * object)
ges_track_element_get_element (GESTrackElement * object)
{
g_return_val_if_fail (GES_IS_TRACK_OBJECT (object), NULL);
g_return_val_if_fail (GES_IS_TRACK_ELEMENT (object), NULL);
return object->priv->element;
}
static inline void
ges_track_object_set_locked_internal (GESTrackObject * object, gboolean locked)
ges_track_element_set_locked_internal (GESTrackElement * object,
gboolean locked)
{
object->priv->locked = locked;
}
/**
* ges_track_object_set_locked:
* @object: a #GESTrackObject
* ges_track_element_set_locked:
* @object: a #GESTrackElement
* @locked: whether the object is lock to its parent
*
* Set the locking status of the @object in relationship to its controlling
@ -854,20 +856,20 @@ ges_track_object_set_locked_internal (GESTrackObject * object, gboolean locked)
* with its controlling #GESClip.
*/
void
ges_track_object_set_locked (GESTrackObject * object, gboolean locked)
ges_track_element_set_locked (GESTrackElement * object, gboolean locked)
{
g_return_if_fail (GES_IS_TRACK_OBJECT (object));
g_return_if_fail (GES_IS_TRACK_ELEMENT (object));
GST_DEBUG_OBJECT (object, "%s object", locked ? "Locking" : "Unlocking");
ges_track_object_set_locked_internal (object, locked);
ges_track_element_set_locked_internal (object, locked);
g_object_notify_by_pspec (G_OBJECT (object), properties[PROP_LOCKED]);
}
/**
* ges_track_object_is_locked:
* @object: a #GESTrackObject
* ges_track_element_is_locked:
* @object: a #GESTrackElement
*
* Let you know if object us locked or not (moving synchronously).
*
@ -875,17 +877,17 @@ ges_track_object_set_locked (GESTrackObject * object, gboolean locked)
* #GESClip, else %FALSE.
*/
gboolean
ges_track_object_is_locked (GESTrackObject * object)
ges_track_element_is_locked (GESTrackElement * object)
{
g_return_val_if_fail (GES_IS_TRACK_OBJECT (object), FALSE);
g_return_val_if_fail (GES_IS_TRACK_ELEMENT (object), FALSE);
return object->priv->locked;
}
/**
* ges_track_object_is_active:
* @object: a #GESTrackObject
* ges_track_element_is_active:
* @object: a #GESTrackElement
*
* Lets you know if @object will be used for playback and rendering,
* or not.
@ -895,9 +897,9 @@ ges_track_object_is_locked (GESTrackObject * object)
* Since: 0.10.2
*/
gboolean
ges_track_object_is_active (GESTrackObject * object)
ges_track_element_is_active (GESTrackElement * object)
{
g_return_val_if_fail (GES_IS_TRACK_OBJECT (object), FALSE);
g_return_val_if_fail (GES_IS_TRACK_ELEMENT (object), FALSE);
if (G_UNLIKELY (object->priv->gnlobject == NULL))
return object->priv->pending_active;
@ -906,7 +908,7 @@ ges_track_object_is_active (GESTrackObject * object)
}
/**
* ges_track_object_lookup_child:
* ges_track_element_lookup_child:
* @object: object to lookup the property in
* @prop_name: name of the property to look up. You can specify the name of the
* class as such: "ClassName::property-name", to guarantee that you get the
@ -929,16 +931,16 @@ ges_track_object_is_active (GESTrackObject * object)
* Since: 0.10.2
*/
gboolean
ges_track_object_lookup_child (GESTrackObject * object, const gchar * prop_name,
GstElement ** element, GParamSpec ** pspec)
ges_track_element_lookup_child (GESTrackElement * object,
const gchar * prop_name, GstElement ** element, GParamSpec ** pspec)
{
GHashTableIter iter;
gpointer key, value;
gchar **names, *name, *classename;
gboolean res;
GESTrackObjectPrivate *priv;
GESTrackElementPrivate *priv;
g_return_val_if_fail (GES_IS_TRACK_OBJECT (object), FALSE);
g_return_val_if_fail (GES_IS_TRACK_ELEMENT (object), FALSE);
priv = object->priv;
@ -982,8 +984,8 @@ prop_hash_not_set:
}
/**
* ges_track_object_set_child_property_by_pspec:
* @object: a #GESTrackObject
* ges_track_element_set_child_property_by_pspec:
* @object: a #GESTrackElement
* @pspec: The #GParamSpec that specifies the property you want to set
* @value: the value
*
@ -992,13 +994,13 @@ prop_hash_not_set:
* Since: 0.10.2
*/
void
ges_track_object_set_child_property_by_pspec (GESTrackObject * object,
ges_track_element_set_child_property_by_pspec (GESTrackElement * object,
GParamSpec * pspec, GValue * value)
{
GstElement *element;
GESTrackObjectPrivate *priv;
GESTrackElementPrivate *priv;
g_return_if_fail (GES_IS_TRACK_OBJECT (object));
g_return_if_fail (GES_IS_TRACK_ELEMENT (object));
priv = object->priv;
@ -1026,8 +1028,8 @@ prop_hash_not_set:
}
/**
* ges_track_object_set_child_property_valist:
* @object: The #GESTrackObject parent object
* ges_track_element_set_child_property_valist:
* @object: The #GESTrackElement parent object
* @first_property_name: The name of the first property to set
* @var_args: value for the first property, followed optionally by more
* name/return location pairs, followed by NULL
@ -1040,7 +1042,7 @@ prop_hash_not_set:
* Since: 0.10.2
*/
void
ges_track_object_set_child_property_valist (GESTrackObject * object,
ges_track_element_set_child_property_valist (GESTrackElement * object,
const gchar * first_property_name, va_list var_args)
{
const gchar *name;
@ -1050,7 +1052,7 @@ ges_track_object_set_child_property_valist (GESTrackObject * object,
gchar *error = NULL;
GValue value = { 0, };
g_return_if_fail (GES_IS_TRACK_OBJECT (object));
g_return_if_fail (GES_IS_TRACK_ELEMENT (object));
name = first_property_name;
@ -1059,7 +1061,7 @@ ges_track_object_set_child_property_valist (GESTrackObject * object,
/* iterate over pairs */
while (name) {
if (!ges_track_object_lookup_child (object, name, &element, &pspec))
if (!ges_track_element_lookup_child (object, name, &element, &pspec))
goto not_found;
#if GLIB_CHECK_VERSION(2,23,3)
@ -1097,8 +1099,8 @@ cant_copy:
}
/**
* ges_track_object_set_child_properties:
* @object: The #GESTrackObject parent object
* ges_track_element_set_child_properties:
* @object: The #GESTrackElement parent object
* @first_property_name: The name of the first property to set
* @...: value for the first property, followed optionally by more
* name/return location pairs, followed by NULL
@ -1111,22 +1113,22 @@ cant_copy:
* Since: 0.10.2
*/
void
ges_track_object_set_child_properties (GESTrackObject * object,
ges_track_element_set_child_properties (GESTrackElement * object,
const gchar * first_property_name, ...)
{
va_list var_args;
g_return_if_fail (GES_IS_TRACK_OBJECT (object));
g_return_if_fail (GES_IS_TRACK_ELEMENT (object));
va_start (var_args, first_property_name);
ges_track_object_set_child_property_valist (object, first_property_name,
ges_track_element_set_child_property_valist (object, first_property_name,
var_args);
va_end (var_args);
}
/**
* ges_track_object_get_child_property_valist:
* @object: The #GESTrackObject parent object
* ges_track_element_get_child_property_valist:
* @object: The #GESTrackElement parent object
* @first_property_name: The name of the first property to get
* @var_args: value for the first property, followed optionally by more
* name/return location pairs, followed by NULL
@ -1139,7 +1141,7 @@ ges_track_object_set_child_properties (GESTrackObject * object,
* Since: 0.10.2
*/
void
ges_track_object_get_child_property_valist (GESTrackObject * object,
ges_track_element_get_child_property_valist (GESTrackElement * object,
const gchar * first_property_name, va_list var_args)
{
const gchar *name;
@ -1154,7 +1156,7 @@ ges_track_object_get_child_property_valist (GESTrackObject * object,
/* This part is in big part copied from the gst_child_object_get_valist method */
while (name) {
if (!ges_track_object_lookup_child (object, name, &element, &pspec))
if (!ges_track_element_lookup_child (object, name, &element, &pspec))
goto not_found;
g_value_init (&value, pspec->value_type);
@ -1184,8 +1186,8 @@ cant_copy:
}
/**
* ges_track_object_list_children_properties:
* @object: The #GESTrackObject to get the list of children properties from
* ges_track_element_list_children_properties:
* @object: The #GESTrackElement to get the list of children properties from
* @n_properties: (out): return location for the length of the returned array
*
* Gets an array of #GParamSpec* for all configurable properties of the
@ -1197,21 +1199,21 @@ cant_copy:
* Since: 0.10.2
*/
GParamSpec **
ges_track_object_list_children_properties (GESTrackObject * object,
ges_track_element_list_children_properties (GESTrackElement * object,
guint * n_properties)
{
GESTrackObjectClass *class;
GESTrackElementClass *class;
g_return_val_if_fail (GES_IS_TRACK_OBJECT (object), NULL);
g_return_val_if_fail (GES_IS_TRACK_ELEMENT (object), NULL);
class = GES_TRACK_OBJECT_GET_CLASS (object);
class = GES_TRACK_ELEMENT_GET_CLASS (object);
return class->list_children_properties (object, n_properties);
}
/**
* ges_track_object_get_child_properties:
* @object: The origin #GESTrackObject
* ges_track_element_get_child_properties:
* @object: The origin #GESTrackElement
* @first_property_name: The name of the first property to get
* @...: return location for the first property, followed optionally by more
* name/return location pairs, followed by NULL
@ -1221,22 +1223,22 @@ ges_track_object_list_children_properties (GESTrackObject * object,
* Since: 0.10.2
*/
void
ges_track_object_get_child_properties (GESTrackObject * object,
ges_track_element_get_child_properties (GESTrackElement * object,
const gchar * first_property_name, ...)
{
va_list var_args;
g_return_if_fail (GES_IS_TRACK_OBJECT (object));
g_return_if_fail (GES_IS_TRACK_ELEMENT (object));
va_start (var_args, first_property_name);
ges_track_object_get_child_property_valist (object, first_property_name,
ges_track_element_get_child_property_valist (object, first_property_name,
var_args);
va_end (var_args);
}
/**
* ges_track_object_get_child_property_by_pspec:
* @object: a #GESTrackObject
* ges_track_element_get_child_property_by_pspec:
* @object: a #GESTrackElement
* @pspec: The #GParamSpec that specifies the property you want to get
* @value: (out): return location for the value
*
@ -1245,13 +1247,13 @@ ges_track_object_get_child_properties (GESTrackObject * object,
* Since: 0.10.2
*/
void
ges_track_object_get_child_property_by_pspec (GESTrackObject * object,
ges_track_element_get_child_property_by_pspec (GESTrackElement * object,
GParamSpec * pspec, GValue * value)
{
GstElement *element;
GESTrackObjectPrivate *priv;
GESTrackElementPrivate *priv;
g_return_if_fail (GES_IS_TRACK_OBJECT (object));
g_return_if_fail (GES_IS_TRACK_ELEMENT (object));
priv = object->priv;
@ -1279,29 +1281,29 @@ prop_hash_not_set:
}
/**
* ges_track_object_set_child_property:
* @object: The origin #GESTrackObject
* ges_track_element_set_child_property:
* @object: The origin #GESTrackElement
* @property_name: The name of the property
* @value: the value
*
* Sets a property of a GstElement contained in @object.
*
* Note that #ges_track_object_set_child_property is really
* intended for language bindings, #ges_track_object_set_child_properties
* Note that #ges_track_element_set_child_property is really
* intended for language bindings, #ges_track_element_set_child_properties
* is much more convenient for C programming.
*
* Returns: %TRUE if the property was set, %FALSE otherwize
*/
gboolean
ges_track_object_set_child_property (GESTrackObject * object,
ges_track_element_set_child_property (GESTrackElement * object,
const gchar * property_name, GValue * value)
{
GParamSpec *pspec;
GstElement *element;
g_return_val_if_fail (GES_IS_TRACK_OBJECT (object), FALSE);
g_return_val_if_fail (GES_IS_TRACK_ELEMENT (object), FALSE);
if (!ges_track_object_lookup_child (object, property_name, &element, &pspec))
if (!ges_track_element_lookup_child (object, property_name, &element, &pspec))
goto not_found;
g_object_set_property (G_OBJECT (element), pspec->name, value);
@ -1320,8 +1322,8 @@ not_found:
}
/**
* ges_track_object_get_child_property:
* @object: The origin #GESTrackObject
* ges_track_element_get_child_property:
* @object: The origin #GESTrackElement
* @property_name: The name of the property
* @value: (out): return location for the property value, it will
* be initialized if it is initialized with 0
@ -1332,22 +1334,22 @@ not_found:
*
* Gets a property of a GstElement contained in @object.
*
* Note that #ges_track_object_get_child_property is really
* intended for language bindings, #ges_track_object_get_child_properties
* Note that #ges_track_element_get_child_property is really
* intended for language bindings, #ges_track_element_get_child_properties
* is much more convenient for C programming.
*
* Returns: %TRUE if the property was found, %FALSE otherwize
*/
gboolean
ges_track_object_get_child_property (GESTrackObject * object,
ges_track_element_get_child_property (GESTrackElement * object,
const gchar * property_name, GValue * value)
{
GParamSpec *pspec;
GstElement *element;
g_return_val_if_fail (GES_IS_TRACK_OBJECT (object), FALSE);
g_return_val_if_fail (GES_IS_TRACK_ELEMENT (object), FALSE);
if (!ges_track_object_lookup_child (object, property_name, &element, &pspec))
if (!ges_track_element_lookup_child (object, property_name, &element, &pspec))
goto not_found;
if (G_VALUE_TYPE (value) == G_TYPE_INVALID)
@ -1369,7 +1371,8 @@ not_found:
}
static GParamSpec **
default_list_children_properties (GESTrackObject * object, guint * n_properties)
default_list_children_properties (GESTrackElement * object,
guint * n_properties)
{
GParamSpec **pspec, *spec;
GHashTableIter iter;
@ -1406,16 +1409,16 @@ _deep_copy (GESTimelineElement * element, GESTimelineElement * elementcopy)
GParamSpec **specs;
guint n, n_specs;
GValue val = { 0 };
GESTrackObject *copy = GES_TRACK_OBJECT (elementcopy);
GESTrackElement *copy = GES_TRACK_ELEMENT (elementcopy);
ensure_gnl_object (copy);
specs =
ges_track_object_list_children_properties (GES_TRACK_OBJECT (element),
ges_track_element_list_children_properties (GES_TRACK_ELEMENT (element),
&n_specs);
for (n = 0; n < n_specs; ++n) {
g_value_init (&val, specs[n]->value_type);
g_object_get_property (G_OBJECT (element), specs[n]->name, &val);
ges_track_object_set_child_property_by_pspec (copy, specs[n], &val);
ges_track_element_set_child_property_by_pspec (copy, specs[n], &val);
g_value_unset (&val);
}
@ -1423,8 +1426,8 @@ _deep_copy (GESTimelineElement * element, GESTimelineElement * elementcopy)
}
/**
* ges_track_object_edit:
* @object: the #GESTrackObject to edit
* ges_track_element_edit:
* @object: the #GESTrackElement to edit
* @layers: (element-type GESTimelineLayer): The layers you want the edit to
* happen in, %NULL means that the edition is done in all the
* #GESTimelineLayers contained in the current timeline.
@ -1442,13 +1445,13 @@ _deep_copy (GESTimelineElement * element, GESTimelineElement * elementcopy)
* Since: 0.10.XX
*/
gboolean
ges_track_object_edit (GESTrackObject * object,
ges_track_element_edit (GESTrackElement * object,
GList * layers, GESEditMode mode, GESEdge edge, guint64 position)
{
GESTrack *track = ges_track_object_get_track (object);
GESTrack *track = ges_track_element_get_track (object);
GESTimeline *timeline;
g_return_val_if_fail (GES_IS_TRACK_OBJECT (object), FALSE);
g_return_val_if_fail (GES_IS_TRACK_ELEMENT (object), FALSE);
if (G_UNLIKELY (!track)) {
GST_WARNING_OBJECT (object, "Trying to edit in %d mode but not in"

View file

@ -18,8 +18,8 @@
* Boston, MA 02110-1301, USA.
*/
#ifndef _GES_TRACK_OBJECT
#define _GES_TRACK_OBJECT
#ifndef _GES_TRACK_ELEMENT
#define _GES_TRACK_ELEMENT
#include <glib-object.h>
#include <gst/gst.h>
@ -29,37 +29,37 @@
G_BEGIN_DECLS
#define GES_TYPE_TRACK_OBJECT ges_track_object_get_type()
#define GES_TYPE_TRACK_ELEMENT ges_track_element_get_type()
#define GES_TRACK_OBJECT(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GES_TYPE_TRACK_OBJECT, GESTrackObject))
#define GES_TRACK_ELEMENT(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GES_TYPE_TRACK_ELEMENT, GESTrackElement))
#define GES_TRACK_OBJECT_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), GES_TYPE_TRACK_OBJECT, GESTrackObjectClass))
#define GES_TRACK_ELEMENT_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), GES_TYPE_TRACK_ELEMENT, GESTrackElementClass))
#define GES_IS_TRACK_OBJECT(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GES_TYPE_TRACK_OBJECT))
#define GES_IS_TRACK_ELEMENT(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GES_TYPE_TRACK_ELEMENT))
#define GES_IS_TRACK_OBJECT_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE ((klass), GES_TYPE_TRACK_OBJECT))
#define GES_IS_TRACK_ELEMENT_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE ((klass), GES_TYPE_TRACK_ELEMENT))
#define GES_TRACK_OBJECT_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_TRACK_OBJECT, GESTrackObjectClass))
#define GES_TRACK_ELEMENT_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_TRACK_ELEMENT, GESTrackElementClass))
typedef struct _GESTrackObjectPrivate GESTrackObjectPrivate;
typedef struct _GESTrackElementPrivate GESTrackElementPrivate;
/**
* GESTrackObject:
* GESTrackElement:
*
* The GESTrackObject base class.
* The GESTrackElement base class.
*/
struct _GESTrackObject {
struct _GESTrackElement {
GESTimelineElement parent;
/*< private >*/
gboolean active;
GESTrackObjectPrivate *priv;
GESTrackElementPrivate *priv;
GESAsset *asset;
@ -68,7 +68,7 @@ struct _GESTrackObject {
};
/**
* GESTrackObjectClass:
* GESTrackElementClass:
* @gnlobject_factorytype: name of the GNonLin GStElementFactory type to use.
* @create_gnl_object: method to create the GNonLin container object.
* @create_element: method to return the GstElement to put in the gnlobject.
@ -85,111 +85,111 @@ struct _GESTrackObject {
* Subclasses can override the @create_gnl_object method to override what type
* of GNonLin object will be created.
*/
struct _GESTrackObjectClass {
struct _GESTrackElementClass {
/*< private >*/
GESTimelineElementClass parent_class;
/*< public >*/
/* virtual methods for subclasses */
const gchar *gnlobject_factorytype;
GstElement* (*create_gnl_object) (GESTrackObject * object);
GstElement* (*create_element) (GESTrackObject * object);
GstElement* (*create_gnl_object) (GESTrackElement * object);
GstElement* (*create_element) (GESTrackElement * object);
void (*duration_changed) (GESTrackObject *object, guint64 duration);
void (*active_changed) (GESTrackObject *object, gboolean active);
void (*duration_changed) (GESTrackElement *object, guint64 duration);
void (*active_changed) (GESTrackElement *object, gboolean active);
/*< private >*/
/* signals (currently unused) */
void (*changed) (GESTrackObject * object);
void (*changed) (GESTrackElement * object);
/*< public >*/
/* virtual methods for subclasses */
GHashTable* (*get_props_hastable) (GESTrackObject * object);
GParamSpec** (*list_children_properties) (GESTrackObject * object,
GHashTable* (*get_props_hastable) (GESTrackElement * object);
GParamSpec** (*list_children_properties) (GESTrackElement * object,
guint *n_properties);
/*< private >*/
/* Padding for API extension */
gpointer _ges_reserved[GES_PADDING_LARGE];
};
GType ges_track_object_get_type (void);
GType ges_track_element_get_type (void);
gboolean ges_track_object_set_track (GESTrackObject * object,
gboolean ges_track_element_set_track (GESTrackElement * object,
GESTrack * track);
GESTrack* ges_track_object_get_track (GESTrackObject * object);
GESTrack* ges_track_element_get_track (GESTrackElement * object);
GESTrackType ges_track_object_get_track_type (GESTrackObject * object);
void ges_track_object_set_track_type (GESTrackObject * object,
GESTrackType ges_track_element_get_track_type (GESTrackElement * object);
void ges_track_element_set_track_type (GESTrackElement * object,
GESTrackType type);
void ges_track_object_set_clip (GESTrackObject * object,
void ges_track_element_set_clip (GESTrackElement * object,
GESClip * clipect);
GESClip *
ges_track_object_get_clip (GESTrackObject* object);
ges_track_element_get_clip (GESTrackElement* object);
GstElement * ges_track_object_get_gnlobject (GESTrackObject * object);
GstElement * ges_track_element_get_gnlobject (GESTrackElement * object);
GstElement * ges_track_object_get_element (GESTrackObject * object);
GstElement * ges_track_element_get_element (GESTrackElement * object);
void ges_track_object_set_locked (GESTrackObject * object,
void ges_track_element_set_locked (GESTrackElement * object,
gboolean locked);
gboolean ges_track_object_is_locked (GESTrackObject * object);
gboolean ges_track_element_is_locked (GESTrackElement * object);
gboolean ges_track_object_set_active (GESTrackObject * object,
gboolean ges_track_element_set_active (GESTrackElement * object,
gboolean active);
gboolean ges_track_object_is_active (GESTrackObject * object);
gboolean ges_track_element_is_active (GESTrackElement * object);
GParamSpec **
ges_track_object_list_children_properties (GESTrackObject *object,
ges_track_element_list_children_properties (GESTrackElement *object,
guint *n_properties);
gboolean ges_track_object_lookup_child (GESTrackObject *object,
gboolean ges_track_element_lookup_child (GESTrackElement *object,
const gchar *prop_name,
GstElement **element,
GParamSpec **pspec);
void
ges_track_object_get_child_property_by_pspec (GESTrackObject * object,
ges_track_element_get_child_property_by_pspec (GESTrackElement * object,
GParamSpec * pspec,
GValue * value);
void
ges_track_object_get_child_property_valist (GESTrackObject * object,
ges_track_element_get_child_property_valist (GESTrackElement * object,
const gchar * first_property_name,
va_list var_args);
void ges_track_object_get_child_properties (GESTrackObject *object,
void ges_track_element_get_child_properties (GESTrackElement *object,
const gchar * first_property_name,
...) G_GNUC_NULL_TERMINATED;
void
ges_track_object_set_child_property_valist (GESTrackObject * object,
ges_track_element_set_child_property_valist (GESTrackElement * object,
const gchar * first_property_name,
va_list var_args);
void
ges_track_object_set_child_property_by_pspec (GESTrackObject * object,
ges_track_element_set_child_property_by_pspec (GESTrackElement * object,
GParamSpec * pspec,
GValue * value);
void ges_track_object_set_child_properties (GESTrackObject * object,
void ges_track_element_set_child_properties (GESTrackElement * object,
const gchar * first_property_name,
...) G_GNUC_NULL_TERMINATED;
gboolean ges_track_object_set_child_property (GESTrackObject *object,
gboolean ges_track_element_set_child_property (GESTrackElement *object,
const gchar *property_name,
GValue * value);
gboolean ges_track_object_get_child_property (GESTrackObject *object,
gboolean ges_track_element_get_child_property (GESTrackElement *object,
const gchar *property_name,
GValue * value);
gboolean
ges_track_object_edit (GESTrackObject * object,
ges_track_element_edit (GESTrackElement * object,
GList *layers, GESEditMode mode,
GESEdge edge, guint64 position);
G_END_DECLS
#endif /* _GES_TRACK_OBJECT */
#endif /* _GES_TRACK_ELEMENT */

View file

@ -27,7 +27,7 @@
*/
#include "ges-internal.h"
#include "ges-track-object.h"
#include "ges-track-element.h"
#include "ges-track-filesource.h"
#include "ges-uri-asset.h"
#include "ges-extractable.h"
@ -41,13 +41,14 @@ ges_extractable_check_id (GType type, const gchar * id, GError ** error)
static void
extractable_set_asset (GESExtractable * self, GESAsset * asset)
{
/* FIXME That should go into #GESTrackObject, but
/* FIXME That should go into #GESTrackElement, but
* some work is needed to make sure it works properly */
if (ges_track_object_get_track_type (GES_TRACK_OBJECT (self)) ==
if (ges_track_element_get_track_type (GES_TRACK_ELEMENT (self)) ==
GES_TRACK_TYPE_UNKNOWN) {
ges_track_object_set_track_type (GES_TRACK_OBJECT (self),
ges_asset_track_object_get_track_type (GES_ASSET_TRACK_OBJECT (asset)));
ges_track_element_set_track_type (GES_TRACK_ELEMENT (self),
ges_asset_track_element_get_track_type (GES_ASSET_TRACK_ELEMENT
(asset)));
}
}
@ -117,7 +118,7 @@ ges_track_filesource_dispose (GObject * object)
}
static GstElement *
ges_track_filesource_create_gnl_object (GESTrackObject * object)
ges_track_filesource_create_gnl_object (GESTrackElement * object)
{
GstElement *gnlobject;
@ -131,7 +132,7 @@ static void
ges_track_filesource_class_init (GESTrackFileSourceClass * klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GESTrackObjectClass *track_class = GES_TRACK_OBJECT_CLASS (klass);
GESTrackElementClass *track_class = GES_TRACK_ELEMENT_CLASS (klass);
g_type_class_add_private (klass, sizeof (GESTrackFileSourcePrivate));

View file

@ -29,7 +29,7 @@
*/
#include "ges-internal.h"
#include "ges-track-object.h"
#include "ges-track-element.h"
#include "ges-track-image-source.h"
G_DEFINE_TYPE (GESTrackImageSource, ges_track_image_source,
@ -111,7 +111,7 @@ pad_added_cb (GstElement * timeline, GstPad * pad, GstElement * scale)
}
static GstElement *
ges_track_image_source_create_element (GESTrackObject * object)
ges_track_image_source_create_element (GESTrackElement * object)
{
GstElement *bin, *source, *scale, *freeze, *iconv;
GstPad *src, *target;
@ -151,7 +151,7 @@ static void
ges_track_image_source_class_init (GESTrackImageSourceClass * klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GESTrackObjectClass *gesobj_class = GES_TRACK_OBJECT_CLASS (klass);
GESTrackElementClass *gesobj_class = GES_TRACK_ELEMENT_CLASS (klass);
g_type_class_add_private (klass, sizeof (GESTrackImageSourcePrivate));

View file

@ -24,11 +24,11 @@
*/
#include "ges-internal.h"
#include "ges-track-object.h"
#include "ges-track-element.h"
#include "ges-track-operation.h"
G_DEFINE_ABSTRACT_TYPE (GESTrackOperation, ges_track_operation,
GES_TYPE_TRACK_OBJECT);
GES_TYPE_TRACK_ELEMENT);
struct _GESTrackOperationPrivate
{
@ -39,7 +39,7 @@ struct _GESTrackOperationPrivate
static void
ges_track_operation_class_init (GESTrackOperationClass * klass)
{
GESTrackObjectClass *track_class = GES_TRACK_OBJECT_CLASS (klass);
GESTrackElementClass *track_class = GES_TRACK_ELEMENT_CLASS (klass);
g_type_class_add_private (klass, sizeof (GESTrackOperationPrivate));

View file

@ -24,7 +24,7 @@
#include <glib-object.h>
#include <gst/gst.h>
#include <ges/ges-types.h>
#include <ges/ges-track-object.h>
#include <ges/ges-track-element.h>
G_BEGIN_DECLS
@ -55,7 +55,7 @@ typedef struct _GESTrackOperationPrivate GESTrackOperationPrivate;
struct _GESTrackOperation {
/*< private >*/
GESTrackObject parent;
GESTrackElement parent;
GESTrackOperationPrivate *priv;
@ -69,7 +69,7 @@ struct _GESTrackOperation {
struct _GESTrackOperationClass {
/*< private >*/
GESTrackObjectClass parent_class;
GESTrackElementClass parent_class;
/*< private >*/
/* Padding for API extension */

View file

@ -25,7 +25,7 @@
#include "ges-internal.h"
#include "ges-extractable.h"
#include "ges-track-object.h"
#include "ges-track-element.h"
#include "ges-track-effect.h"
#include "ges-track-parse-launch-effect.h"
@ -38,7 +38,7 @@ G_DEFINE_TYPE_WITH_CODE (GESTrackParseLaunchEffect,
static void ges_track_parse_launch_effect_dispose (GObject * object);
static void ges_track_parse_launch_effect_finalize (GObject * object);
static GstElement *ges_track_parse_launch_effect_create_element (GESTrackObject
static GstElement *ges_track_parse_launch_effect_create_element (GESTrackElement
* self);
struct _GESTrackParseLaunchEffectPrivate
@ -128,10 +128,10 @@ ges_track_parse_launch_effect_class_init (GESTrackParseLaunchEffectClass *
klass)
{
GObjectClass *object_class;
GESTrackObjectClass *obj_bg_class;
GESTrackElementClass *obj_bg_class;
object_class = G_OBJECT_CLASS (klass);
obj_bg_class = GES_TRACK_OBJECT_CLASS (klass);
obj_bg_class = GES_TRACK_ELEMENT_CLASS (klass);
g_type_class_add_private (klass, sizeof (GESTrackParseLaunchEffectPrivate));
@ -184,14 +184,14 @@ ges_track_parse_launch_effect_finalize (GObject * object)
}
static GstElement *
ges_track_parse_launch_effect_create_element (GESTrackObject * object)
ges_track_parse_launch_effect_create_element (GESTrackElement * object)
{
GstElement *effect;
gchar *bin_desc;
GError *error = NULL;
GESTrackParseLaunchEffect *self = GES_TRACK_PARSE_LAUNCH_EFFECT (object);
GESTrack *track = ges_track_object_get_track (object);
GESTrack *track = ges_track_element_get_track (object);
if (!track) {
GST_WARNING

View file

@ -24,10 +24,10 @@
*/
#include "ges-internal.h"
#include "ges-track-object.h"
#include "ges-track-element.h"
#include "ges-track-source.h"
G_DEFINE_TYPE (GESTrackSource, ges_track_source, GES_TYPE_TRACK_OBJECT);
G_DEFINE_TYPE (GESTrackSource, ges_track_source, GES_TYPE_TRACK_ELEMENT);
struct _GESTrackSourcePrivate
{
@ -38,7 +38,7 @@ struct _GESTrackSourcePrivate
static void
ges_track_source_class_init (GESTrackSourceClass * klass)
{
GESTrackObjectClass *track_class = GES_TRACK_OBJECT_CLASS (klass);
GESTrackElementClass *track_class = GES_TRACK_ELEMENT_CLASS (klass);
g_type_class_add_private (klass, sizeof (GESTrackSourcePrivate));

View file

@ -24,7 +24,7 @@
#include <glib-object.h>
#include <gst/gst.h>
#include <ges/ges-types.h>
#include <ges/ges-track-object.h>
#include <ges/ges-track-element.h>
G_BEGIN_DECLS
@ -55,7 +55,7 @@ typedef struct _GESTrackSourcePrivate GESTrackSourcePrivate;
struct _GESTrackSource {
/*< private >*/
GESTrackObject parent;
GESTrackElement parent;
GESTrackSourcePrivate *priv;
@ -69,7 +69,7 @@ struct _GESTrackSource {
struct _GESTrackSourceClass {
/*< private >*/
GESTrackObjectClass parent_class;
GESTrackElementClass parent_class;
/*< private >*/
/* Padding for API extension */

View file

@ -26,7 +26,7 @@
*/
#include "ges-internal.h"
#include "ges-track-object.h"
#include "ges-track-element.h"
#include "ges-track-title-source.h"
#include "ges-track-text-overlay.h"
@ -60,14 +60,14 @@ static void ges_track_text_overlay_get_property (GObject * object, guint
static void ges_track_text_overlay_set_property (GObject * object, guint
property_id, const GValue * value, GParamSpec * pspec);
static GstElement *ges_track_text_overlay_create_element (GESTrackObject
static GstElement *ges_track_text_overlay_create_element (GESTrackElement
* self);
static void
ges_track_text_overlay_class_init (GESTrackTextOverlayClass * klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GESTrackObjectClass *bg_class = GES_TRACK_OBJECT_CLASS (klass);
GESTrackElementClass *bg_class = GES_TRACK_ELEMENT_CLASS (klass);
g_type_class_add_private (klass, sizeof (GESTrackTextOverlayPrivate));
@ -142,7 +142,7 @@ ges_track_text_overlay_set_property (GObject * object,
}
static GstElement *
ges_track_text_overlay_create_element (GESTrackObject * object)
ges_track_text_overlay_create_element (GESTrackElement * object)
{
GstElement *ret, *text, *iconv, *oconv;
GstPad *src_target, *sink_target;

View file

@ -25,7 +25,7 @@
*/
#include "ges-internal.h"
#include "ges-track-object.h"
#include "ges-track-element.h"
#include "ges-track-title-source.h"
#include "ges-track-video-test-source.h"
@ -59,14 +59,14 @@ static void ges_track_title_source_get_property (GObject * object, guint
static void ges_track_title_source_set_property (GObject * object, guint
property_id, const GValue * value, GParamSpec * pspec);
static GstElement *ges_track_title_source_create_element (GESTrackObject *
static GstElement *ges_track_title_source_create_element (GESTrackElement *
self);
static void
ges_track_title_source_class_init (GESTrackTitleSourceClass * klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GESTrackObjectClass *bg_class = GES_TRACK_OBJECT_CLASS (klass);
GESTrackElementClass *bg_class = GES_TRACK_ELEMENT_CLASS (klass);
g_type_class_add_private (klass, sizeof (GESTrackTitleSourcePrivate));
@ -141,7 +141,7 @@ ges_track_title_source_set_property (GObject * object,
}
static GstElement *
ges_track_title_source_create_element (GESTrackObject * object)
ges_track_title_source_create_element (GESTrackElement * object)
{
GESTrackTitleSource *self = GES_TRACK_TITLE_SOURCE (object);
GESTrackTitleSourcePrivate *priv = self->priv;

View file

@ -24,7 +24,7 @@
*/
#include "ges-internal.h"
#include "ges-track-object.h"
#include "ges-track-element.h"
#include "ges-track-video-test-source.h"
G_DEFINE_TYPE (GESTrackVideoTestSource, ges_track_video_test_source,
@ -35,17 +35,17 @@ struct _GESTrackVideoTestSourcePrivate
GESVideoTestPattern pattern;
};
static GstElement *ges_track_video_test_source_create_element (GESTrackObject *
static GstElement *ges_track_video_test_source_create_element (GESTrackElement *
self);
static void
ges_track_video_test_source_class_init (GESTrackVideoTestSourceClass * klass)
{
GESTrackObjectClass *track_object_class = GES_TRACK_OBJECT_CLASS (klass);
GESTrackElementClass *track_element_class = GES_TRACK_ELEMENT_CLASS (klass);
g_type_class_add_private (klass, sizeof (GESTrackVideoTestSourcePrivate));
track_object_class->create_element =
track_element_class->create_element =
ges_track_video_test_source_create_element;
}
@ -59,7 +59,7 @@ ges_track_video_test_source_init (GESTrackVideoTestSource * self)
}
static GstElement *
ges_track_video_test_source_create_element (GESTrackObject * self)
ges_track_video_test_source_create_element (GESTrackElement * self)
{
GstElement *ret;
gint pattern;
@ -83,7 +83,8 @@ void
ges_track_video_test_source_set_pattern (GESTrackVideoTestSource
* self, GESVideoTestPattern pattern)
{
GstElement *element = ges_track_object_get_element (GES_TRACK_OBJECT (self));
GstElement *element =
ges_track_element_get_element (GES_TRACK_ELEMENT (self));
self->priv->pattern = pattern;

View file

@ -89,10 +89,10 @@ static GObject *link_element_to_mixer_with_smpte (GstBin * bin,
GstElement ** smpteref);
static void
ges_track_video_transition_duration_changed (GESTrackObject * self,
ges_track_video_transition_duration_changed (GESTrackElement * self,
guint64 duration);
static GstElement *ges_track_video_transition_create_element (GESTrackObject
static GstElement *ges_track_video_transition_create_element (GESTrackElement
* self);
static void ges_track_video_transition_dispose (GObject * object);
@ -109,7 +109,7 @@ static void
ges_track_video_transition_class_init (GESTrackVideoTransitionClass * klass)
{
GObjectClass *object_class;
GESTrackObjectClass *toclass;
GESTrackElementClass *toclass;
g_type_class_add_private (klass, sizeof (GESTrackVideoTransitionPrivate));
@ -157,7 +157,7 @@ ges_track_video_transition_class_init (GESTrackVideoTransitionClass * klass)
g_object_class_install_property (object_class, PROP_INVERT,
properties[PROP_INVERT]);
toclass = GES_TRACK_OBJECT_CLASS (klass);
toclass = GES_TRACK_ELEMENT_CLASS (klass);
toclass->duration_changed = ges_track_video_transition_duration_changed;
toclass->create_element = ges_track_video_transition_create_element;
}
@ -333,7 +333,7 @@ set_interpolation (GstObject * element, GESTrackVideoTransitionPrivate * priv,
}
static GstElement *
ges_track_video_transition_create_element (GESTrackObject * object)
ges_track_video_transition_create_element (GESTrackElement * object)
{
GstElement *topbin, *iconva, *iconvb, *scalea, *scaleb, *capsfilt, *oconv;
GstObject *target = NULL;
@ -507,7 +507,7 @@ switch_to_smpte_cb (GstPad * sink, gboolean blocked,
priv->end_value = 0.0;
set_interpolation (GST_OBJECT (smptealphab), priv, (gchar *) "position");
ges_track_video_transition_duration_changed (GES_TRACK_OBJECT (transition),
ges_track_video_transition_duration_changed (GES_TRACK_ELEMENT (transition),
priv->dur);
@ -585,7 +585,7 @@ switch_to_crossfade_cb (GstPad * sink, gboolean blocked,
priv->start_value = 0.0;
priv->end_value = 1.0;
set_interpolation (GST_OBJECT (priv->sinkb), priv, (gchar *) "alpha");
ges_track_video_transition_duration_changed (GES_TRACK_OBJECT (transition),
ges_track_video_transition_duration_changed (GES_TRACK_ELEMENT (transition),
priv->dur);
priv->smpte = NULL;
@ -642,10 +642,10 @@ link_element_to_mixer_with_smpte (GstBin * bin, GstElement * element,
}
static void
ges_track_video_transition_duration_changed (GESTrackObject * object,
ges_track_video_transition_duration_changed (GESTrackElement * object,
guint64 duration)
{
GstElement *gnlobj = ges_track_object_get_gnlobject (object);
GstElement *gnlobj = ges_track_element_get_gnlobject (object);
GESTrackVideoTransition *self = GES_TRACK_VIDEO_TRANSITION (object);
GESTrackVideoTransitionPrivate *priv = self->priv;
GstTimedValueControlSource *ts;

View file

@ -24,14 +24,14 @@
*
* Corresponds to one output format (i.e. audio OR video).
*
* Contains the compatible TrackObject(s).
* Contains the compatible TrackElement(s).
*
* Wraps GNonLin's 'gnlcomposition' element.
*/
#include "ges-internal.h"
#include "ges-track.h"
#include "ges-track-object.h"
#include "ges-track-element.h"
#include "ges-meta-container.h"
G_DEFINE_TYPE_WITH_CODE (GESTrack, ges_track, GST_TYPE_BIN,
@ -52,8 +52,8 @@ struct _GESTrackPrivate
{
/*< private > */
GESTimeline *timeline;
GSequence *tckobjs_by_start;
GHashTable *tckobjs_iter;
GSequence *trackelements_by_start;
GHashTable *trackelements_iter;
GList *gaps;
guint64 duration;
@ -76,8 +76,8 @@ enum
ARG_TYPE,
ARG_DURATION,
ARG_LAST,
TRACK_OBJECT_ADDED,
TRACK_OBJECT_REMOVED,
TRACK_ELEMENT_ADDED,
TRACK_ELEMENT_REMOVED,
LAST_SIGNAL
};
@ -93,10 +93,10 @@ static void composition_duration_cb (GstElement * composition, GParamSpec * arg
/* Private methods/functions/callbacks */
static void
add_trackobj_to_list_foreach (GESTrackObject * trackobj, GList ** list)
add_trackelement_to_list_foreach (GESTrackElement * trackelement, GList ** list)
{
g_object_ref (trackobj);
*list = g_list_prepend (*list, trackobj);
g_object_ref (trackelement);
*list = g_list_prepend (*list, trackelement);
}
static Gap *
@ -172,7 +172,7 @@ update_gaps (GESTrack * track)
Gap *gap;
GSequenceIter *it;
GESTrackObject *tckobj;
GESTrackElement *trackelement;
GstClockTime start, end, duration = 0, timeline_duration;
GESTrackPrivate *priv = track->priv;
@ -188,12 +188,12 @@ update_gaps (GESTrack * track)
priv->gaps = NULL;
/* 2- And recalculate gaps */
for (it = g_sequence_get_begin_iter (priv->tckobjs_by_start);
for (it = g_sequence_get_begin_iter (priv->trackelements_by_start);
g_sequence_iter_is_end (it) == FALSE; it = g_sequence_iter_next (it)) {
tckobj = g_sequence_get (it);
trackelement = g_sequence_get (it);
start = _START (tckobj);
end = start + _DURATION (tckobj);
start = _START (trackelement);
end = start + _DURATION (trackelement);
if (start > duration) {
/* 3- Fill gap */
@ -226,7 +226,7 @@ update_gaps (GESTrack * track)
static inline void
resort_and_fill_gaps (GESTrack * track)
{
g_sequence_sort (track->priv->tckobjs_by_start,
g_sequence_sort (track->priv->trackelements_by_start,
(GCompareDataFunc) element_start_compare, NULL);
if (track->priv->updating == TRUE) {
@ -254,7 +254,7 @@ timeline_duration_changed_cb (GESTimeline * timeline,
}
static void
sort_track_objects_cb (GESTrackObject * child,
sort_track_elements_cb (GESTrackElement * child,
GParamSpec * arg G_GNUC_UNUSED, GESTrack * track)
{
resort_and_fill_gaps (track);
@ -338,7 +338,7 @@ create_element_for_raw_video_gap (GESTrack * track)
* accessing it
*/
static gboolean
remove_object_internal (GESTrack * track, GESTrackObject * object)
remove_object_internal (GESTrack * track, GESTrackElement * object)
{
GESTrackPrivate *priv;
GstElement *gnlobject;
@ -347,12 +347,12 @@ remove_object_internal (GESTrack * track, GESTrackObject * object)
priv = track->priv;
if (G_UNLIKELY (ges_track_object_get_track (object) != track)) {
if (G_UNLIKELY (ges_track_element_get_track (object) != track)) {
GST_WARNING ("Object belongs to another track");
return FALSE;
}
if ((gnlobject = ges_track_object_get_gnlobject (object))) {
if ((gnlobject = ges_track_element_get_gnlobject (object))) {
GST_DEBUG ("Removing GnlObject '%s' from composition '%s'",
GST_ELEMENT_NAME (gnlobject), GST_ELEMENT_NAME (priv->composition));
@ -364,12 +364,12 @@ remove_object_internal (GESTrack * track, GESTrackObject * object)
gst_element_set_state (gnlobject, GST_STATE_NULL);
}
g_signal_handlers_disconnect_by_func (object, sort_track_objects_cb, NULL);
g_signal_handlers_disconnect_by_func (object, sort_track_elements_cb, NULL);
ges_track_object_set_track (object, NULL);
ges_track_element_set_track (object, NULL);
g_signal_emit (track, ges_track_signals[TRACK_OBJECT_REMOVED], 0,
GES_TRACK_OBJECT (object));
g_signal_emit (track, ges_track_signals[TRACK_ELEMENT_REMOVED], 0,
GES_TRACK_ELEMENT (object));
g_object_unref (object);
@ -377,14 +377,14 @@ remove_object_internal (GESTrack * track, GESTrackObject * object)
}
static void
dispose_tckobjs_foreach (GESTrackObject * tckobj, GESTrack * track)
dispose_trackelements_foreach (GESTrackElement * trackelement, GESTrack * track)
{
GESClip *clip;
clip = ges_track_object_get_clip (tckobj);
clip = ges_track_element_get_clip (trackelement);
remove_object_internal (track, tckobj);
ges_clip_release_track_object (clip, tckobj);
remove_object_internal (track, trackelement);
ges_clip_release_track_element (clip, trackelement);
}
/* GObject virtual methods */
@ -433,11 +433,11 @@ ges_track_dispose (GObject * object)
GESTrack *track = (GESTrack *) object;
GESTrackPrivate *priv = track->priv;
/* Remove all TrackObjects and drop our reference */
g_hash_table_unref (priv->tckobjs_iter);
g_sequence_foreach (track->priv->tckobjs_by_start,
(GFunc) dispose_tckobjs_foreach, track);
g_sequence_free (priv->tckobjs_by_start);
/* Remove all TrackElements and drop our reference */
g_hash_table_unref (priv->trackelements_iter);
g_sequence_foreach (track->priv->trackelements_by_start,
(GFunc) dispose_trackelements_foreach, track);
g_sequence_free (priv->trackelements_by_start);
g_list_free_full (priv->gaps, (GDestroyNotify) free_gap);
if (priv->composition) {
@ -518,30 +518,30 @@ ges_track_class_init (GESTrackClass * klass)
/**
* GESTrack::track-object-added:
* @object: the #GESTrack
* @effect: the #GESTrackObject that was added.
* @effect: the #GESTrackElement that was added.
*
* Will be emitted after a track object was added to the track.
*
* Since: 0.10.2
*/
ges_track_signals[TRACK_OBJECT_ADDED] =
ges_track_signals[TRACK_ELEMENT_ADDED] =
g_signal_new ("track-object-added", G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_FIRST, 0, NULL, NULL, g_cclosure_marshal_generic,
G_TYPE_NONE, 1, GES_TYPE_TRACK_OBJECT);
G_TYPE_NONE, 1, GES_TYPE_TRACK_ELEMENT);
/**
* GESTrack::track-object-removed:
* @object: the #GESTrack
* @effect: the #GESTrackObject that was removed.
* @effect: the #GESTrackElement that was removed.
*
* Will be emitted after a track object was removed from the track.
*
* Since: 0.10.2
*/
ges_track_signals[TRACK_OBJECT_REMOVED] =
ges_track_signals[TRACK_ELEMENT_REMOVED] =
g_signal_new ("track-object-removed", G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_FIRST, 0, NULL, NULL, g_cclosure_marshal_generic,
G_TYPE_NONE, 1, GES_TYPE_TRACK_OBJECT);
G_TYPE_NONE, 1, GES_TYPE_TRACK_ELEMENT);
}
static void
@ -552,8 +552,9 @@ ges_track_init (GESTrack * self)
self->priv->composition = gst_element_factory_make ("gnlcomposition", NULL);
self->priv->updating = TRUE;
self->priv->tckobjs_by_start = g_sequence_new (NULL);
self->priv->tckobjs_iter = g_hash_table_new (g_direct_hash, g_direct_equal);
self->priv->trackelements_by_start = g_sequence_new (NULL);
self->priv->trackelements_iter =
g_hash_table_new (g_direct_hash, g_direct_equal);
self->priv->create_element_for_gaps = NULL;
self->priv->gaps = NULL;
@ -702,13 +703,13 @@ ges_track_set_caps (GESTrack * track, const GstCaps * caps)
priv->caps = gst_caps_copy (caps);
g_object_set (priv->composition, "caps", caps, NULL);
/* FIXME : update all trackobjects ? */
/* FIXME : update all trackelements ? */
}
/**
* ges_track_add_object:
* @track: a #GESTrack
* @object: (transfer full): the #GESTrackObject to add
* @object: (transfer full): the #GESTrackElement to add
*
* Adds the given object to the track. Sets the object's controlling track,
* and thus takes ownership of the @object.
@ -719,49 +720,49 @@ ges_track_set_caps (GESTrack * track, const GstCaps * caps)
* want to accept the object.
*/
gboolean
ges_track_add_object (GESTrack * track, GESTrackObject * object)
ges_track_add_object (GESTrack * track, GESTrackElement * object)
{
g_return_val_if_fail (GES_IS_TRACK (track), FALSE);
g_return_val_if_fail (GES_IS_TRACK_OBJECT (object), FALSE);
g_return_val_if_fail (GES_IS_TRACK_ELEMENT (object), FALSE);
GST_DEBUG ("track:%p, object:%p", track, object);
if (G_UNLIKELY (ges_track_object_get_track (object) != NULL)) {
if (G_UNLIKELY (ges_track_element_get_track (object) != NULL)) {
GST_WARNING ("Object already belongs to another track");
return FALSE;
}
if (G_UNLIKELY (!ges_track_object_set_track (object, track))) {
if (G_UNLIKELY (!ges_track_element_set_track (object, track))) {
GST_ERROR ("Couldn't properly add the object to the Track");
return FALSE;
}
GST_DEBUG ("Adding object %s to ourself %s",
GST_OBJECT_NAME (ges_track_object_get_gnlobject (object)),
GST_OBJECT_NAME (ges_track_element_get_gnlobject (object)),
GST_OBJECT_NAME (track->priv->composition));
if (G_UNLIKELY (!gst_bin_add (GST_BIN (track->priv->composition),
ges_track_object_get_gnlobject (object)))) {
ges_track_element_get_gnlobject (object)))) {
GST_WARNING ("Couldn't add object to the GnlComposition");
return FALSE;
}
g_object_ref_sink (object);
g_hash_table_insert (track->priv->tckobjs_iter, object,
g_sequence_insert_sorted (track->priv->tckobjs_by_start, object,
g_hash_table_insert (track->priv->trackelements_iter, object,
g_sequence_insert_sorted (track->priv->trackelements_by_start, object,
(GCompareDataFunc) element_start_compare, NULL));
g_signal_emit (track, ges_track_signals[TRACK_OBJECT_ADDED], 0,
GES_TRACK_OBJECT (object));
g_signal_emit (track, ges_track_signals[TRACK_ELEMENT_ADDED], 0,
GES_TRACK_ELEMENT (object));
g_signal_connect (GES_TRACK_OBJECT (object), "notify::start",
G_CALLBACK (sort_track_objects_cb), track);
g_signal_connect (GES_TRACK_ELEMENT (object), "notify::start",
G_CALLBACK (sort_track_elements_cb), track);
g_signal_connect (GES_TRACK_OBJECT (object), "notify::duration",
G_CALLBACK (sort_track_objects_cb), track);
g_signal_connect (GES_TRACK_ELEMENT (object), "notify::duration",
G_CALLBACK (sort_track_elements_cb), track);
g_signal_connect (GES_TRACK_OBJECT (object), "notify::priority",
G_CALLBACK (sort_track_objects_cb), track);
g_signal_connect (GES_TRACK_ELEMENT (object), "notify::priority",
G_CALLBACK (sort_track_elements_cb), track);
resort_and_fill_gaps (track);
@ -772,10 +773,10 @@ ges_track_add_object (GESTrack * track, GESTrackObject * object)
* ges_track_get_objects:
* @track: a #GESTrack
*
* Gets the #GESTrackObject contained in @track
* Gets the #GESTrackElement contained in @track
*
* Returns: (transfer full) (element-type GESTrackObject): the list of
* #GESTrackObject present in the Track sorted by priority and start.
* Returns: (transfer full) (element-type GESTrackElement): the list of
* #GESTrackElement present in the Track sorted by priority and start.
*/
GList *
ges_track_get_objects (GESTrack * track)
@ -784,8 +785,8 @@ ges_track_get_objects (GESTrack * track)
g_return_val_if_fail (GES_IS_TRACK (track), NULL);
g_sequence_foreach (track->priv->tckobjs_by_start,
(GFunc) add_trackobj_to_list_foreach, &ret);
g_sequence_foreach (track->priv->trackelements_by_start,
(GFunc) add_trackelement_to_list_foreach, &ret);
ret = g_list_reverse (ret);
return ret;
@ -794,7 +795,7 @@ ges_track_get_objects (GESTrack * track)
/**
* ges_track_remove_object:
* @track: a #GESTrack
* @object: the #GESTrackObject to remove
* @object: the #GESTrackElement to remove
*
* Removes the object from the track and unparents it.
* Unparenting it means the reference owned by @track on the @object will be
@ -805,18 +806,18 @@ ges_track_get_objects (GESTrack * track)
* could not remove the object (like if it didn't belong to the track).
*/
gboolean
ges_track_remove_object (GESTrack * track, GESTrackObject * object)
ges_track_remove_object (GESTrack * track, GESTrackElement * object)
{
GSequenceIter *it;
GESTrackPrivate *priv;
g_return_val_if_fail (GES_IS_TRACK (track), FALSE);
g_return_val_if_fail (GES_IS_TRACK_OBJECT (object), FALSE);
g_return_val_if_fail (GES_IS_TRACK_ELEMENT (object), FALSE);
priv = track->priv;
if (remove_object_internal (track, object) == TRUE) {
it = g_hash_table_lookup (priv->tckobjs_iter, object);
it = g_hash_table_lookup (priv->trackelements_iter, object);
g_sequence_remove (it);
resort_and_fill_gaps (track);

View file

@ -106,10 +106,10 @@ const GstCaps * ges_track_get_caps (GESTrack *track);
const GESTimeline *ges_track_get_timeline (GESTrack *track);
gboolean ges_track_add_object (GESTrack * track,
GESTrackObject * object);
GESTrackElement * object);
gboolean ges_track_remove_object (GESTrack * track,
GESTrackObject * object);
GESTrackElement * object);
GESTrack *ges_track_video_raw_new (void);
GESTrack *ges_track_audio_raw_new (void);

View file

@ -56,13 +56,13 @@ enum
PROP_VTYPE = 5,
};
static GESTrackObject *ges_tl_transition_create_track_object (GESClip
static GESTrackElement *ges_tl_transition_create_track_element (GESClip
* self, GESTrackType type);
static void
ges_transition_clip_track_object_added (GESClip * obj, GESTrackObject * tckobj);
static void
ges_transition_clip_track_object_released (GESClip * obj,
GESTrackObject * tckobj);
ges_transition_clip_track_element_added (GESClip * obj,
GESTrackElement * trackelement);
static void ges_transition_clip_track_element_released (GESClip * obj,
GESTrackElement * trackelement);
/* Internal methods */
static void
@ -249,11 +249,11 @@ ges_transition_clip_class_init (GESTransitionClipClass * klass)
G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
timobj_class->create_track_object = ges_tl_transition_create_track_object;
timobj_class->create_track_element = ges_tl_transition_create_track_element;
timobj_class->need_fill_track = FALSE;
timobj_class->track_object_added = ges_transition_clip_track_object_added;
timobj_class->track_object_released =
ges_transition_clip_track_object_released;
timobj_class->track_element_added = ges_transition_clip_track_element_added;
timobj_class->track_element_released =
ges_transition_clip_track_element_released;
}
static void
@ -268,37 +268,40 @@ ges_transition_clip_init (GESTransitionClip * self)
}
static void
ges_transition_clip_track_object_released (GESClip * obj,
GESTrackObject * tckobj)
ges_transition_clip_track_element_released (GESClip * obj,
GESTrackElement * trackelement)
{
GESTransitionClipPrivate *priv = GES_TRANSITION_CLIP (obj)->priv;
/* If this is called, we should be sure the tckobj exists */
if (GES_IS_TRACK_VIDEO_TRANSITION (tckobj)) {
GST_DEBUG ("GESTrackVideoTransition %p released from %p", tckobj, obj);
/* If this is called, we should be sure the trackelement exists */
if (GES_IS_TRACK_VIDEO_TRANSITION (trackelement)) {
GST_DEBUG ("GESTrackVideoTransition %p released from %p", trackelement,
obj);
priv->track_video_transitions =
g_slist_remove (priv->track_video_transitions, tckobj);
g_object_unref (tckobj);
g_slist_remove (priv->track_video_transitions, trackelement);
g_object_unref (trackelement);
}
}
static void
ges_transition_clip_track_object_added (GESClip * obj, GESTrackObject * tckobj)
ges_transition_clip_track_element_added (GESClip * obj,
GESTrackElement * trackelement)
{
GESTransitionClipPrivate *priv = GES_TRANSITION_CLIP (obj)->priv;
if (GES_IS_TRACK_VIDEO_TRANSITION (tckobj)) {
GST_DEBUG ("GESTrackVideoTransition %p added to %p", tckobj, obj);
if (GES_IS_TRACK_VIDEO_TRANSITION (trackelement)) {
GST_DEBUG ("GESTrackVideoTransition %p added to %p", trackelement, obj);
priv->track_video_transitions =
g_slist_prepend (priv->track_video_transitions, g_object_ref (tckobj));
g_slist_prepend (priv->track_video_transitions,
g_object_ref (trackelement));
}
}
static GESTrackObject *
ges_tl_transition_create_track_object (GESClip * obj, GESTrackType type)
static GESTrackElement *
ges_tl_transition_create_track_element (GESClip * obj, GESTrackType type)
{
GESTransitionClip *transition = (GESTransitionClip *) obj;
GESTrackObject *res = NULL;
GESTrackElement *res = NULL;
GESTrackType supportedformats;
GST_DEBUG ("Creating a GESTrackTransition");
@ -312,7 +315,7 @@ ges_tl_transition_create_track_object (GESClip * obj, GESTrackType type)
trans = ges_track_video_transition_new ();
ges_track_video_transition_set_transition_type (trans, transition->vtype);
res = GES_TRACK_OBJECT (trans);
res = GES_TRACK_ELEMENT (trans);
} else {
GST_DEBUG ("Not creating transition as video track not on"
" supportedformats");
@ -322,7 +325,7 @@ ges_tl_transition_create_track_object (GESClip * obj, GESTrackType type)
if (supportedformats == GES_TRACK_TYPE_UNKNOWN ||
supportedformats & GES_TRACK_TYPE_AUDIO)
res = GES_TRACK_OBJECT (ges_track_audio_transition_new ());
res = GES_TRACK_ELEMENT (ges_track_audio_transition_new ());
else
GST_DEBUG ("Not creating transition as audio track"
" not on supportedformats");

View file

@ -86,8 +86,8 @@ typedef struct _GESEffectClipClass GESEffectClipClass;
typedef struct _GESTrack GESTrack;
typedef struct _GESTrackClass GESTrackClass;
typedef struct _GESTrackObject GESTrackObject;
typedef struct _GESTrackObjectClass GESTrackObjectClass;
typedef struct _GESTrackElement GESTrackElement;
typedef struct _GESTrackElementClass GESTrackElementClass;
typedef struct _GESTrackSource GESTrackSource;
typedef struct _GESTrackSourceClass GESTrackSourceClass;
@ -149,8 +149,8 @@ typedef struct _GESAssetClipClass GESAssetClipClass;
typedef struct _GESUriClipAsset GESUriClipAsset;
typedef struct _GESUriClipAssetClass GESUriClipAssetClass;
typedef struct _GESAssetTrackObject GESAssetTrackObject;
typedef struct _GESAssetTrackObjectClass GESAssetTrackObjectClass;
typedef struct _GESAssetTrackElement GESAssetTrackElement;
typedef struct _GESAssetTrackElementClass GESAssetTrackElementClass;
typedef struct _GESAssetTrackFileSource GESAssetTrackFileSource;
typedef struct _GESAssetTrackFileSourceClass GESAssetTrackFileSourceClass;

View file

@ -247,7 +247,7 @@ _create_track_file_source_asset (GESUriClipAsset * asset,
priv_tckasset->uri = ges_asset_get_id (GES_ASSET (asset));
priv_tckasset->sinfo = g_object_ref (sinfo);
priv_tckasset->parent_asset = asset;
ges_asset_track_object_set_track_type (GES_ASSET_TRACK_OBJECT
ges_asset_track_element_set_track_type (GES_ASSET_TRACK_ELEMENT
(tck_filesource_asset), type);
priv->asset_trackfilesources = g_list_append (priv->asset_trackfilesources,
@ -470,12 +470,12 @@ ges_uri_clip_asset_get_stream_assets (GESUriClipAsset * self)
*/
G_DEFINE_TYPE (GESAssetTrackFileSource, ges_asset_track_filesource,
GES_TYPE_ASSET_TRACK_OBJECT);
GES_TYPE_ASSET_TRACK_ELEMENT);
static GESExtractable *
_extract (GESAsset * asset, GError ** error)
{
GESTrackObject *tckobj;
GESTrackElement *trackelement;
GESAssetTrackFileSourcePrivate *priv =
GES_ASSET_TRACK_FILESOURCE (asset)->priv;
@ -491,10 +491,11 @@ _extract (GESAsset * asset, GError ** error)
return NULL;
}
tckobj = GES_TRACK_OBJECT (ges_track_filesource_new (g_strdup (priv->uri)));
ges_track_object_set_track_type (tckobj, priv->type);
trackelement =
GES_TRACK_ELEMENT (ges_track_filesource_new (g_strdup (priv->uri)));
ges_track_element_set_track_type (trackelement, priv->type);
return GES_EXTRACTABLE (tckobj);
return GES_EXTRACTABLE (trackelement);
}
static void

View file

@ -95,7 +95,7 @@ GType ges_asset_track_filesource_get_type (void);
struct _GESAssetTrackFileSource
{
GESAssetTrackObject parent;
GESAssetTrackElement parent;
/* <private> */
GESAssetTrackFileSourcePrivate *priv;
@ -106,7 +106,7 @@ struct _GESAssetTrackFileSource
struct _GESAssetTrackFileSourceClass
{
GESAssetTrackObjectClass parent_class;
GESAssetTrackElementClass parent_class;
gpointer _ges_reserved[GES_PADDING];
};

View file

@ -65,10 +65,10 @@ enum
};
static GList *ges_uri_clip_create_track_objects (GESClip *
static GList *ges_uri_clip_create_track_elements (GESClip *
obj, GESTrackType type);
static GESTrackObject
* ges_uri_clip_create_track_object (GESClip * obj, GESTrackType type);
static GESTrackElement
* ges_uri_clip_create_track_element (GESClip * obj, GESTrackType type);
void ges_uri_clip_set_uri (GESUriClip * self, gchar * uri);
gboolean
@ -171,7 +171,7 @@ ges_uri_clip_class_init (GESUriClipClass * klass)
* GESUriClip:is-image:
*
* Whether this filesource represents a still image or not. This must be set
* before create_track_objects is called.
* before create_track_elements is called.
*/
g_object_class_install_property (object_class, PROP_IS_IMAGE,
g_param_spec_boolean ("is-image", "Is still image",
@ -188,8 +188,8 @@ ges_uri_clip_class_init (GESUriClipClass * klass)
element_class->set_max_duration = filesource_set_max_duration;
timobj_class->create_track_objects = ges_uri_clip_create_track_objects;
timobj_class->create_track_object = ges_uri_clip_create_track_object;
timobj_class->create_track_elements = ges_uri_clip_create_track_elements;
timobj_class->create_track_element = ges_uri_clip_create_track_element;
timobj_class->need_fill_track = FALSE;
}
@ -280,7 +280,7 @@ ges_uri_clip_init (GESUriClip * self)
void
ges_uri_clip_set_mute (GESUriClip * self, gboolean mute)
{
GList *tmp, *trackobjects;
GList *tmp, *trackelements;
GESClip *object = (GESClip *) self;
GST_DEBUG ("self:%p, mute:%d", self, mute);
@ -288,16 +288,17 @@ ges_uri_clip_set_mute (GESUriClip * self, gboolean mute)
self->priv->mute = mute;
/* Go over tracked objects, and update 'active' status on all audio objects */
trackobjects = ges_clip_get_track_objects (object);
for (tmp = trackobjects; tmp; tmp = tmp->next) {
GESTrackObject *trackobject = (GESTrackObject *) tmp->data;
trackelements = ges_clip_get_track_elements (object);
for (tmp = trackelements; tmp; tmp = tmp->next) {
GESTrackElement *trackelement = (GESTrackElement *) tmp->data;
if (ges_track_object_get_track (trackobject)->type == GES_TRACK_TYPE_AUDIO)
ges_track_object_set_active (trackobject, !mute);
if (ges_track_element_get_track (trackelement)->type ==
GES_TRACK_TYPE_AUDIO)
ges_track_element_set_active (trackelement, !mute);
g_object_unref (GES_TRACK_OBJECT (tmp->data));
g_object_unref (GES_TRACK_ELEMENT (tmp->data));
}
g_list_free (trackobjects);
g_list_free (trackelements);
}
gboolean
@ -369,7 +370,7 @@ ges_uri_clip_get_uri (GESUriClip * self)
}
static GList *
ges_uri_clip_create_track_objects (GESClip * obj, GESTrackType type)
ges_uri_clip_create_track_elements (GESClip * obj, GESTrackType type)
{
GList *res = NULL;
const GList *tmp, *stream_assets;
@ -380,20 +381,20 @@ ges_uri_clip_create_track_objects (GESClip * obj, GESTrackType type)
ges_uri_clip_asset_get_stream_assets (GES_URI_CLIP_ASSET
(GES_TIMELINE_ELEMENT (obj)->asset));
for (tmp = stream_assets; tmp; tmp = tmp->next) {
GESAssetTrackObject *asset = GES_ASSET_TRACK_OBJECT (tmp->data);
GESAssetTrackElement *asset = GES_ASSET_TRACK_ELEMENT (tmp->data);
if (ges_asset_track_object_get_track_type (asset) == type)
if (ges_asset_track_element_get_track_type (asset) == type)
res = g_list_prepend (res, ges_asset_extract (GES_ASSET (asset), NULL));
}
return res;
}
static GESTrackObject *
ges_uri_clip_create_track_object (GESClip * obj, GESTrackType type)
static GESTrackElement *
ges_uri_clip_create_track_element (GESClip * obj, GESTrackType type)
{
GESUriClipPrivate *priv = GES_URI_CLIP (obj)->priv;
GESTrackObject *res;
GESTrackElement *res;
if (priv->is_image) {
if (type != GES_TRACK_TYPE_VIDEO) {
@ -401,22 +402,22 @@ ges_uri_clip_create_track_object (GESClip * obj, GESTrackType type)
return NULL;
} else {
GST_DEBUG ("Creating a GESTrackImageSource");
res = (GESTrackObject *) ges_track_image_source_new (priv->uri);
res = (GESTrackElement *) ges_track_image_source_new (priv->uri);
}
} else {
GST_DEBUG ("Creating a GESTrackFileSource");
/* FIXME : Implement properly ! */
res = (GESTrackObject *) ges_track_filesource_new (priv->uri);
res = (GESTrackElement *) ges_track_filesource_new (priv->uri);
/* If mute and track is audio, deactivate the track object */
if (type == GES_TRACK_TYPE_AUDIO && priv->mute)
ges_track_object_set_active (res, FALSE);
ges_track_element_set_active (res, FALSE);
}
if (res)
ges_track_object_set_track_type (res, type);
ges_track_element_set_track_type (res, type);
return res;
}
@ -445,12 +446,12 @@ void
ges_uri_clip_set_uri (GESUriClip * self, gchar * uri)
{
GESClip *clip = GES_CLIP (self);
GList *tckobjs = ges_clip_get_track_objects (clip);
GList *trackelements = ges_clip_get_track_elements (clip);
if (tckobjs) {
if (trackelements) {
/* FIXME handle this case properly */
GST_WARNING_OBJECT (clip, "Can not change uri when already"
"containing TrackObjects");
"containing TrackElements");
return;
}

View file

@ -555,7 +555,7 @@ _parse_effect (GMarkupParseContext * context, const gchar * element_name,
goto wrong_properties;
}
ges_base_xml_formatter_add_track_object (GES_BASE_XML_FORMATTER (self),
ges_base_xml_formatter_add_track_element (GES_BASE_XML_FORMATTER (self),
type, asset_id, track_id, clip_id, children_props, props, metadatas,
error);
@ -768,7 +768,7 @@ _save_tracks (GString * str, GESTimeline * timeline)
}
static inline void
_save_effect (GString * str, guint clip_id, GESTrackObject * tckobj,
_save_effect (GString * str, guint clip_id, GESTrackElement * trackelement,
GESTimeline * timeline)
{
GESTrack *tck;
@ -778,9 +778,9 @@ _save_effect (GString * str, guint clip_id, GESTrackObject * tckobj,
GParamSpec **pspecs, *spec;
guint j, n_props = 0, track_id = 0;
tck = ges_track_object_get_track (tckobj);
tck = ges_track_element_get_track (trackelement);
if (tck == NULL) {
GST_WARNING_OBJECT (tckobj, " Not in any track, can not save it");
GST_WARNING_OBJECT (trackelement, " Not in any track, can not save it");
return;
}
@ -793,18 +793,20 @@ _save_effect (GString * str, guint clip_id, GESTrackObject * tckobj,
}
g_list_free_full (tracks, gst_object_unref);
properties = _serialize_properties (G_OBJECT (tckobj), "start",
properties = _serialize_properties (G_OBJECT (trackelement), "start",
"in-point", "duration", "locked", "max-duration", "name", NULL);
metas = ges_meta_container_metas_to_string (GES_META_CONTAINER (tckobj));
append_printf_escaped (str, "<effect asset-id='%s' clip-id='%u'"
metas =
ges_meta_container_metas_to_string (GES_META_CONTAINER (trackelement));
append_printf_escaped (str,
"<effect asset-id='%s' clip-id='%u'"
" type-name='%s' track-type='%i' track-id='%i' properties='%s' metadatas='%s'",
ges_extractable_get_id (GES_EXTRACTABLE (tckobj)), clip_id,
g_type_name (G_OBJECT_TYPE (tckobj)), tck->type, track_id, properties,
metas);
ges_extractable_get_id (GES_EXTRACTABLE (trackelement)), clip_id,
g_type_name (G_OBJECT_TYPE (trackelement)), tck->type, track_id,
properties, metas);
g_free (properties);
g_free (metas);
pspecs = ges_track_object_list_children_properties (tckobj, &n_props);
pspecs = ges_track_element_list_children_properties (trackelement, &n_props);
structure = gst_structure_new_empty ("properties");
for (j = 0; j < n_props; j++) {
GValue val = { 0 };
@ -812,7 +814,7 @@ _save_effect (GString * str, guint clip_id, GESTrackObject * tckobj,
spec = pspecs[j];
if (_can_serialize_spec (spec)) {
_init_value_from_spec_for_serialization (&val, spec);
ges_track_object_get_child_property_by_pspec (tckobj, spec, &val);
ges_track_element_get_child_property_by_pspec (trackelement, spec, &val);
gst_structure_set_value (structure, spec->name, &val);
g_value_unset (&val);
}
@ -872,7 +874,7 @@ _save_layers (GString * str, GESTimeline * timeline)
g_free (properties);
for (tmpeffect = effects; tmpeffect; tmpeffect = tmpeffect->next)
_save_effect (str, nbclips, GES_TRACK_OBJECT (tmpeffect->data),
_save_effect (str, nbclips, GES_TRACK_ELEMENT (tmpeffect->data),
timeline);
g_string_append (str, "</clip>\n");
nbclips++;

View file

@ -56,7 +56,7 @@
#include <ges/ges-xml-formatter.h>
#include <ges/ges-track.h>
#include <ges/ges-track-object.h>
#include <ges/ges-track-element.h>
#include <ges/ges-track-source.h>
#include <ges/ges-track-operation.h>

View file

@ -38,7 +38,7 @@ GST_END_TEST;
GST_START_TEST (test_test_source_properties)
{
GESTrack *track;
GESTrackObject *trackobject;
GESTrackElement *trackelement;
GESClip *object;
ges_init ();
@ -57,18 +57,18 @@ GST_START_TEST (test_test_source_properties)
assert_equals_uint64 (_DURATION (object), 51);
assert_equals_uint64 (_INPOINT (object), 12);
trackobject = ges_clip_create_track_object (object, track->type);
ges_clip_add_track_object (object, trackobject);
fail_unless (trackobject != NULL);
fail_unless (ges_track_object_set_track (trackobject, track));
trackelement = ges_clip_create_track_element (object, track->type);
ges_clip_add_track_element (object, trackelement);
fail_unless (trackelement != NULL);
fail_unless (ges_track_element_set_track (trackelement, track));
/* Check that trackobject has the same properties */
assert_equals_uint64 (_START (trackobject), 42);
assert_equals_uint64 (_DURATION (trackobject), 51);
assert_equals_uint64 (_INPOINT (trackobject), 12);
/* Check that trackelement has the same properties */
assert_equals_uint64 (_START (trackelement), 42);
assert_equals_uint64 (_DURATION (trackelement), 51);
assert_equals_uint64 (_INPOINT (trackelement), 12);
/* And let's also check that it propagated correctly to GNonLin */
gnl_object_check (ges_track_object_get_gnlobject (trackobject), 42, 51, 12,
gnl_object_check (ges_track_element_get_gnlobject (trackelement), 42, 51, 12,
51, 0, TRUE);
/* Change more properties, see if they propagate */
@ -77,23 +77,23 @@ GST_START_TEST (test_test_source_properties)
assert_equals_uint64 (_START (object), 420);
assert_equals_uint64 (_DURATION (object), 510);
assert_equals_uint64 (_INPOINT (object), 120);
assert_equals_uint64 (_START (trackobject), 420);
assert_equals_uint64 (_DURATION (trackobject), 510);
assert_equals_uint64 (_INPOINT (trackobject), 120);
assert_equals_uint64 (_START (trackelement), 420);
assert_equals_uint64 (_DURATION (trackelement), 510);
assert_equals_uint64 (_INPOINT (trackelement), 120);
/* And let's also check that it propagated correctly to GNonLin */
gnl_object_check (ges_track_object_get_gnlobject (trackobject), 420, 510, 120,
510, 0, TRUE);
gnl_object_check (ges_track_element_get_gnlobject (trackelement), 420, 510,
120, 510, 0, TRUE);
/* Test mute support */
g_object_set (object, "mute", TRUE, NULL);
gnl_object_check (ges_track_object_get_gnlobject (trackobject), 420, 510, 120,
510, 0, FALSE);
gnl_object_check (ges_track_element_get_gnlobject (trackelement), 420, 510,
120, 510, 0, FALSE);
g_object_set (object, "mute", FALSE, NULL);
gnl_object_check (ges_track_object_get_gnlobject (trackobject), 420, 510, 120,
510, 0, TRUE);
gnl_object_check (ges_track_element_get_gnlobject (trackelement), 420, 510,
120, 510, 0, TRUE);
ges_clip_release_track_object (object, trackobject);
ges_clip_release_track_element (object, trackelement);
g_object_unref (object);
}
@ -104,7 +104,7 @@ GST_START_TEST (test_test_source_in_layer)
GESTimeline *timeline;
GESTimelineLayer *layer;
GESTrack *a, *v;
GESTrackObject *trobj;
GESTrackElement *trobj;
GESTestClip *source;
GESVideoTestPattern ptrn;
gdouble freq, volume;
@ -135,7 +135,7 @@ GST_START_TEST (test_test_source_in_layer)
assert_equals_int (ptrn, GES_VIDEO_TEST_PATTERN_WHITE);
trobj =
ges_clip_find_track_object (GES_CLIP (source), v,
ges_clip_find_track_element (GES_CLIP (source), v,
GES_TYPE_TRACK_VIDEO_TEST_SOURCE);
g_assert (GES_IS_TRACK_VIDEO_TEST_SOURCE (trobj));
@ -147,7 +147,7 @@ GST_START_TEST (test_test_source_in_layer)
/* test audio properties as well */
trobj = ges_clip_find_track_object (GES_CLIP (source),
trobj = ges_clip_find_track_element (GES_CLIP (source),
a, GES_TYPE_TRACK_AUDIO_TEST_SOURCE);
g_assert (GES_IS_TRACK_AUDIO_TEST_SOURCE (trobj));
assert_equals_float (ges_test_clip_get_frequency (source), 440);
@ -236,7 +236,7 @@ find_composition (GESTrack * track)
GST_START_TEST (test_gap_filling_basic)
{
GESTrack *track;
GESTrackObject *trackobject, *trackobject1, *trackobject2;
GESTrackElement *trackelement, *trackelement1, *trackelement2;
/*GESTimelineLayer *layer; */
GESClip *object, *object1, *object2;
GstElement *gnlsrc, *gnlsrc1, *gap = NULL;
@ -259,17 +259,17 @@ GST_START_TEST (test_gap_filling_basic)
assert_equals_uint64 (_START (object), 0);
assert_equals_uint64 (_DURATION (object), 5);
trackobject = ges_clip_create_track_object (object, track->type);
ges_clip_add_track_object (object, trackobject);
trackelement = ges_clip_create_track_element (object, track->type);
ges_clip_add_track_element (object, trackelement);
fail_unless (ges_track_add_object (track, trackobject));
fail_unless (trackobject != NULL);
gnlsrc = ges_track_object_get_gnlobject (trackobject);
fail_unless (ges_track_add_object (track, trackelement));
fail_unless (trackelement != NULL);
gnlsrc = ges_track_element_get_gnlobject (trackelement);
fail_unless (gnlsrc != NULL);
/* Check that trackobject has the same properties */
assert_equals_uint64 (_START (trackobject), 0);
assert_equals_uint64 (_DURATION (trackobject), 5);
/* Check that trackelement has the same properties */
assert_equals_uint64 (_START (trackelement), 0);
assert_equals_uint64 (_DURATION (trackelement), 5);
/* Check no gap were wrongly added */
assert_equals_int (g_list_length (GST_BIN_CHILDREN (composition)), 1);
@ -281,16 +281,16 @@ GST_START_TEST (test_gap_filling_basic)
assert_equals_uint64 (_START (object1), 15);
assert_equals_uint64 (_DURATION (object1), 5);
trackobject1 = ges_clip_create_track_object (object1, track->type);
ges_clip_add_track_object (object1, trackobject1);
fail_unless (ges_track_add_object (track, trackobject1));
fail_unless (trackobject1 != NULL);
gnlsrc1 = ges_track_object_get_gnlobject (trackobject1);
trackelement1 = ges_clip_create_track_element (object1, track->type);
ges_clip_add_track_element (object1, trackelement1);
fail_unless (ges_track_add_object (track, trackelement1));
fail_unless (trackelement1 != NULL);
gnlsrc1 = ges_track_element_get_gnlobject (trackelement1);
fail_unless (gnlsrc1 != NULL);
/* Check that trackobject1 has the same properties */
assert_equals_uint64 (_START (trackobject1), 15);
assert_equals_uint64 (_DURATION (trackobject1), 5);
/* Check that trackelement1 has the same properties */
assert_equals_uint64 (_START (trackelement1), 15);
assert_equals_uint64 (_DURATION (trackelement1), 5);
/* Check the gap as properly been added */
assert_equals_int (g_list_length (GST_BIN_CHILDREN (composition)), 3);
@ -308,12 +308,12 @@ GST_START_TEST (test_gap_filling_basic)
object2 = GES_CLIP (ges_test_clip_new ());
fail_unless (object2 != NULL);
g_object_set (object2, "start", (guint64) 35, "duration", (guint64) 5, NULL);
trackobject2 = ges_clip_create_track_object (object2, track->type);
ges_clip_add_track_object (object2, trackobject2);
fail_unless (ges_track_add_object (track, trackobject2));
fail_unless (trackobject2 != NULL);
assert_equals_uint64 (_START (trackobject2), 35);
assert_equals_uint64 (_DURATION (trackobject2), 5);
trackelement2 = ges_clip_create_track_element (object2, track->type);
ges_clip_add_track_element (object2, trackelement2);
fail_unless (ges_track_add_object (track, trackelement2));
fail_unless (trackelement2 != NULL);
assert_equals_uint64 (_START (trackelement2), 35);
assert_equals_uint64 (_DURATION (trackelement2), 5);
assert_equals_int (g_list_length (GST_BIN_CHILDREN (composition)), 5);
gst_object_unref (track);

View file

@ -32,11 +32,11 @@ GST_END_TEST;
static gboolean
my_fill_track_func (GESClip * object,
GESTrackObject * trobject, GstElement * gnlobj, gpointer user_data)
GESTrackElement * trobject, GstElement * gnlobj, gpointer user_data)
{
GstElement *src;
GST_DEBUG ("timelineobj:%p, trackobject:%p, gnlobj:%p",
GST_DEBUG ("timelineobj:%p, trackelement:%p, gnlobj:%p",
object, trobject, gnlobj);
/* Let's just put a fakesource in for the time being */
@ -55,8 +55,8 @@ GST_START_TEST (test_ges_scenario)
GESTimelineLayer *layer, *tmp_layer;
GESTrack *track;
GESCustomSourceClip *source;
GESTrackObject *trackobject;
GList *trackobjects, *tmp, *layers, *tracks;
GESTrackElement *trackelement;
GList *trackelements, *tmp, *layers, *tracks;
ges_init ();
/* This is the simplest scenario ever */
@ -111,25 +111,25 @@ GST_START_TEST (test_ges_scenario)
g_object_unref (tmp_layer);
ASSERT_OBJECT_REFCOUNT (layer, "layer", 1);
/* Make sure the associated TrackObject is in the Track */
trackobjects = ges_clip_get_track_objects (GES_CLIP (source));
fail_unless (trackobjects != NULL);
trackobject = GES_TRACK_OBJECT (trackobjects->data);
/* Make sure the associated TrackElement is in the Track */
trackelements = ges_clip_get_track_elements (GES_CLIP (source));
fail_unless (trackelements != NULL);
trackelement = GES_TRACK_ELEMENT (trackelements->data);
/* There are 4 references:
* 1 by the clip
* 1 by the track
* 1 by the timeline
* 1 added by the call to _get_track_objects() above */
ASSERT_OBJECT_REFCOUNT (trackobject, "trackobject", 4);
for (tmp = trackobjects; tmp; tmp = tmp->next) {
g_object_unref (GES_TRACK_OBJECT (tmp->data));
* 1 added by the call to _get_track_elements() above */
ASSERT_OBJECT_REFCOUNT (trackelement, "trackelement", 4);
for (tmp = trackelements; tmp; tmp = tmp->next) {
g_object_unref (GES_TRACK_ELEMENT (tmp->data));
}
g_list_free (trackobjects);
g_list_free (trackelements);
/* There are 3 references:
* 1 by the clip
* 1 by the timeline
* 1 by the track */
ASSERT_OBJECT_REFCOUNT (trackobject, "trackobject", 3);
ASSERT_OBJECT_REFCOUNT (trackelement, "trackelement", 3);
GST_DEBUG ("Remove the Clip from the layer");
@ -141,8 +141,8 @@ GST_START_TEST (test_ges_scenario)
ASSERT_OBJECT_REFCOUNT (layer, "layer", 1);
tmp_layer = ges_clip_get_layer (GES_CLIP (source));
fail_unless (tmp_layer == NULL);
trackobjects = ges_clip_get_track_objects (GES_CLIP (source));
fail_unless (trackobjects == NULL); /* No unreffing then */
trackelements = ges_clip_get_track_elements (GES_CLIP (source));
fail_unless (trackelements == NULL); /* No unreffing then */
g_object_unref (source);
GST_DEBUG ("Removing track from the timeline");
@ -184,8 +184,8 @@ GST_START_TEST (test_ges_timeline_add_layer)
GESTimelineLayer *layer, *tmp_layer;
GESTrack *track;
GESCustomSourceClip *s1, *s2, *s3;
GList *trackobjects, *tmp, *layers;
GESTrackObject *trackobject;
GList *trackelements, *tmp, *layers;
GESTrackElement *trackelement;
ges_init ();
@ -247,51 +247,51 @@ GST_START_TEST (test_ges_timeline_add_layer)
g_list_foreach (layers, (GFunc) g_object_unref, NULL);
g_list_free (layers);
/* Make sure the associated TrackObjects are in the Track */
trackobjects = ges_clip_get_track_objects (GES_CLIP (s1));
fail_unless (trackobjects != NULL);
trackobject = GES_TRACK_OBJECT (trackobjects->data);
/* Make sure the associated TrackElements are in the Track */
trackelements = ges_clip_get_track_elements (GES_CLIP (s1));
fail_unless (trackelements != NULL);
trackelement = GES_TRACK_ELEMENT (trackelements->data);
/* There are 4 references:
* 1 by the clip
* 1 by the trackobject
* 1 by the trackelement
* 1 by the timeline
* 1 added by the call to _get_track_objects() above */
ASSERT_OBJECT_REFCOUNT (trackobject, "trackobject", 4);
for (tmp = trackobjects; tmp; tmp = tmp->next) {
g_object_unref (GES_TRACK_OBJECT (tmp->data));
* 1 added by the call to _get_track_elements() above */
ASSERT_OBJECT_REFCOUNT (trackelement, "trackelement", 4);
for (tmp = trackelements; tmp; tmp = tmp->next) {
g_object_unref (GES_TRACK_ELEMENT (tmp->data));
}
g_list_free (trackobjects);
g_list_free (trackelements);
/* There are 3 references:
* 1 by the clip
* 1 by the timeline
* 1 by the trackobject */
ASSERT_OBJECT_REFCOUNT (trackobject, "trackobject", 3);
* 1 by the trackelement */
ASSERT_OBJECT_REFCOUNT (trackelement, "trackelement", 3);
trackobjects = ges_clip_get_track_objects (GES_CLIP (s2));
trackobject = GES_TRACK_OBJECT (trackobjects->data);
fail_unless (trackobjects != NULL);
for (tmp = trackobjects; tmp; tmp = tmp->next) {
g_object_unref (GES_TRACK_OBJECT (tmp->data));
trackelements = ges_clip_get_track_elements (GES_CLIP (s2));
trackelement = GES_TRACK_ELEMENT (trackelements->data);
fail_unless (trackelements != NULL);
for (tmp = trackelements; tmp; tmp = tmp->next) {
g_object_unref (GES_TRACK_ELEMENT (tmp->data));
}
g_list_free (trackobjects);
g_list_free (trackelements);
/* There are 3 references:
* 1 by the clip
* 1 by the timeline
* 1 by the trackobject */
ASSERT_OBJECT_REFCOUNT (GES_TRACK_OBJECT (trackobject), "trackobject", 3);
* 1 by the trackelement */
ASSERT_OBJECT_REFCOUNT (GES_TRACK_ELEMENT (trackelement), "trackelement", 3);
trackobjects = ges_clip_get_track_objects (GES_CLIP (s3));
trackobject = GES_TRACK_OBJECT (trackobjects->data);
fail_unless (trackobjects != NULL);
for (tmp = trackobjects; tmp; tmp = tmp->next) {
g_object_unref (GES_TRACK_OBJECT (tmp->data));
trackelements = ges_clip_get_track_elements (GES_CLIP (s3));
trackelement = GES_TRACK_ELEMENT (trackelements->data);
fail_unless (trackelements != NULL);
for (tmp = trackelements; tmp; tmp = tmp->next) {
g_object_unref (GES_TRACK_ELEMENT (tmp->data));
}
g_list_free (trackobjects);
g_list_free (trackelements);
/* There are 3 references:
* 1 by the clip
* 1 by the timeline
* 1 by the trackobject */
ASSERT_OBJECT_REFCOUNT (trackobject, "trackobject", 3);
* 1 by the trackelement */
ASSERT_OBJECT_REFCOUNT (trackelement, "trackelement", 3);
/* theoretically this is all we need to do to ensure cleanup */
g_object_unref (timeline);
@ -307,7 +307,7 @@ GST_START_TEST (test_ges_timeline_add_layer_first)
GESTimelineLayer *layer, *tmp_layer;
GESTrack *track;
GESCustomSourceClip *s1, *s2, *s3;
GList *trackobjects, *tmp, *layers;
GList *trackelements, *tmp, *layers;
ges_init ();
@ -365,45 +365,45 @@ GST_START_TEST (test_ges_timeline_add_layer_first)
fail_unless (ges_track_get_timeline (track) == timeline);
fail_unless ((gpointer) GST_ELEMENT_PARENT (track) == (gpointer) timeline);
/* Make sure the associated TrackObjects are in the Track */
trackobjects = ges_clip_get_track_objects (GES_CLIP (s1));
fail_unless (trackobjects != NULL);
for (tmp = trackobjects; tmp; tmp = tmp->next) {
/* Make sure the associated TrackElements are in the Track */
trackelements = ges_clip_get_track_elements (GES_CLIP (s1));
fail_unless (trackelements != NULL);
for (tmp = trackelements; tmp; tmp = tmp->next) {
/* Each object has 4 references:
* 1 by the clip
* 1 by the track
* 1 by the timeline
* 1 added by _get_track_object() above */
ASSERT_OBJECT_REFCOUNT (GES_TRACK_OBJECT (tmp->data), "trackobject", 4);
g_object_unref (GES_TRACK_OBJECT (tmp->data));
* 1 added by _get_track_element() above */
ASSERT_OBJECT_REFCOUNT (GES_TRACK_ELEMENT (tmp->data), "trackelement", 4);
g_object_unref (GES_TRACK_ELEMENT (tmp->data));
}
g_list_free (trackobjects);
g_list_free (trackelements);
trackobjects = ges_clip_get_track_objects (GES_CLIP (s2));
fail_unless (trackobjects != NULL);
for (tmp = trackobjects; tmp; tmp = tmp->next) {
trackelements = ges_clip_get_track_elements (GES_CLIP (s2));
fail_unless (trackelements != NULL);
for (tmp = trackelements; tmp; tmp = tmp->next) {
/* Each object has 4 references:
* 1 by the clip
* 1 by the track
* 1 by the timeline
* 1 added by _get_track_object() above */
ASSERT_OBJECT_REFCOUNT (GES_TRACK_OBJECT (tmp->data), "trackobject", 4);
g_object_unref (GES_TRACK_OBJECT (tmp->data));
* 1 added by _get_track_element() above */
ASSERT_OBJECT_REFCOUNT (GES_TRACK_ELEMENT (tmp->data), "trackelement", 4);
g_object_unref (GES_TRACK_ELEMENT (tmp->data));
}
g_list_free (trackobjects);
g_list_free (trackelements);
trackobjects = ges_clip_get_track_objects (GES_CLIP (s3));
fail_unless (trackobjects != NULL);
for (tmp = trackobjects; tmp; tmp = tmp->next) {
trackelements = ges_clip_get_track_elements (GES_CLIP (s3));
fail_unless (trackelements != NULL);
for (tmp = trackelements; tmp; tmp = tmp->next) {
/* Each object has 4 references:
* 1 by the clip
* 1 by the track
* 1 by the timeline
* 1 added by _get_track_object() above */
ASSERT_OBJECT_REFCOUNT (GES_TRACK_OBJECT (tmp->data), "trackobject", 4);
g_object_unref (GES_TRACK_OBJECT (tmp->data));
* 1 added by _get_track_element() above */
ASSERT_OBJECT_REFCOUNT (GES_TRACK_ELEMENT (tmp->data), "trackelement", 4);
g_object_unref (GES_TRACK_ELEMENT (tmp->data));
}
g_list_free (trackobjects);
g_list_free (trackelements);
/* theoretically this is all we need to do to ensure cleanup */
g_object_unref (timeline);
@ -417,8 +417,8 @@ GST_START_TEST (test_ges_timeline_remove_track)
GESTimelineLayer *layer, *tmp_layer;
GESTrack *track;
GESCustomSourceClip *s1, *s2, *s3;
GESTrackObject *t1, *t2, *t3;
GList *trackobjects, *tmp, *layers;
GESTrackElement *t1, *t2, *t3;
GList *trackelements, *tmp, *layers;
ges_init ();
@ -477,42 +477,42 @@ GST_START_TEST (test_ges_timeline_remove_track)
fail_unless (ges_track_get_timeline (track) == timeline);
fail_unless ((gpointer) GST_ELEMENT_PARENT (track) == (gpointer) timeline);
/* Make sure the associated TrackObjects are in the Track */
trackobjects = ges_clip_get_track_objects (GES_CLIP (s1));
fail_unless (trackobjects != NULL);
t1 = GES_TRACK_OBJECT ((trackobjects)->data);
for (tmp = trackobjects; tmp; tmp = tmp->next) {
/* Make sure the associated TrackElements are in the Track */
trackelements = ges_clip_get_track_elements (GES_CLIP (s1));
fail_unless (trackelements != NULL);
t1 = GES_TRACK_ELEMENT ((trackelements)->data);
for (tmp = trackelements; tmp; tmp = tmp->next) {
/* There are 4 references held:
* 1 by the clip
* 1 by the track
* 1 by the timeline
* 1 added by the call to _get_track_objects() above */
ASSERT_OBJECT_REFCOUNT (GES_TRACK_OBJECT (tmp->data), "trackobject", 4);
g_object_unref (GES_TRACK_OBJECT (tmp->data));
* 1 added by the call to _get_track_elements() above */
ASSERT_OBJECT_REFCOUNT (GES_TRACK_ELEMENT (tmp->data), "trackelement", 4);
g_object_unref (GES_TRACK_ELEMENT (tmp->data));
}
g_object_ref (t1);
g_list_free (trackobjects);
g_list_free (trackelements);
/* There are 4 references held:
* 1 by the timelinobject
* 1 by the track
* 1 by the timeline
* 1 added by ourselves above (g_object_ref (t1)) */
ASSERT_OBJECT_REFCOUNT (t1, "trackobject", 4);
ASSERT_OBJECT_REFCOUNT (t1, "trackelement", 4);
trackobjects = ges_clip_get_track_objects (GES_CLIP (s2));
fail_unless (trackobjects != NULL);
t2 = GES_TRACK_OBJECT (trackobjects->data);
for (tmp = trackobjects; tmp; tmp = tmp->next) {
trackelements = ges_clip_get_track_elements (GES_CLIP (s2));
fail_unless (trackelements != NULL);
t2 = GES_TRACK_ELEMENT (trackelements->data);
for (tmp = trackelements; tmp; tmp = tmp->next) {
/* There are 4 references held:
* 1 by the clip
* 1 by the track
* 1 by the timeline
* 1 added by the call to _get_track_objects() above */
ASSERT_OBJECT_REFCOUNT (GES_TRACK_OBJECT (tmp->data), "trackobject", 4);
g_object_unref (GES_TRACK_OBJECT (tmp->data));
* 1 added by the call to _get_track_elements() above */
ASSERT_OBJECT_REFCOUNT (GES_TRACK_ELEMENT (tmp->data), "trackelement", 4);
g_object_unref (GES_TRACK_ELEMENT (tmp->data));
}
g_object_ref (t2);
g_list_free (trackobjects);
g_list_free (trackelements);
/* There are 4 references held:
* 1 by the timelinobject
* 1 by the track
@ -520,20 +520,20 @@ GST_START_TEST (test_ges_timeline_remove_track)
* 1 added by ourselves above (g_object_ref (t1)) */
ASSERT_OBJECT_REFCOUNT (t2, "t2", 4);
trackobjects = ges_clip_get_track_objects (GES_CLIP (s3));
fail_unless (trackobjects != NULL);
t3 = GES_TRACK_OBJECT (trackobjects->data);
for (tmp = trackobjects; tmp; tmp = tmp->next) {
trackelements = ges_clip_get_track_elements (GES_CLIP (s3));
fail_unless (trackelements != NULL);
t3 = GES_TRACK_ELEMENT (trackelements->data);
for (tmp = trackelements; tmp; tmp = tmp->next) {
/* There are 4 references held:
* 1 by the clip
* 1 by the track
* 1 by the timeline
* 1 added by the call to _get_track_objects() above */
ASSERT_OBJECT_REFCOUNT (GES_TRACK_OBJECT (tmp->data), "trackobject", 4);
g_object_unref (GES_TRACK_OBJECT (tmp->data));
* 1 added by the call to _get_track_elements() above */
ASSERT_OBJECT_REFCOUNT (GES_TRACK_ELEMENT (tmp->data), "trackelement", 4);
g_object_unref (GES_TRACK_ELEMENT (tmp->data));
}
g_object_ref (t3);
g_list_free (trackobjects);
g_list_free (trackelements);
/* There are 4 references held:
* 1 by the timelinobject
* 1 by the track
@ -544,9 +544,9 @@ GST_START_TEST (test_ges_timeline_remove_track)
/* remove the track and check that the track objects have been released */
fail_unless (ges_timeline_remove_track (timeline, track));
ASSERT_OBJECT_REFCOUNT (t1, "trackobject", 2);
ASSERT_OBJECT_REFCOUNT (t2, "trackobject", 2);
ASSERT_OBJECT_REFCOUNT (t3, "trackobject", 2);
ASSERT_OBJECT_REFCOUNT (t1, "trackelement", 2);
ASSERT_OBJECT_REFCOUNT (t2, "trackelement", 2);
ASSERT_OBJECT_REFCOUNT (t3, "trackelement", 2);
g_object_unref (t1);
g_object_unref (t2);
@ -565,7 +565,7 @@ typedef struct
static GPtrArray *
select_tracks_cb (GESTimeline * timeline, GESClip * tobj,
GESTrackObject * trobj, SelectTracksData * st_data)
GESTrackElement * trobj, SelectTracksData * st_data)
{
GESTrack *track;
@ -585,8 +585,8 @@ GST_START_TEST (test_ges_timeline_multiple_tracks)
GESTimelineLayer *layer, *tmp_layer;
GESTrack *track1, *track2;
GESCustomSourceClip *s1, *s2, *s3;
GESTrackObject *t1, *t2, *t3;
GList *trackobjects, *tmp, *layers;
GESTrackElement *t1, *t2, *t3;
GList *trackelements, *tmp, *layers;
SelectTracksData st_data = { &s1, &s2, &s3, &track1, &track2 };
ges_init ();
@ -658,44 +658,44 @@ GST_START_TEST (test_ges_timeline_multiple_tracks)
g_list_foreach (layers, (GFunc) g_object_unref, NULL);
g_list_free (layers);
/* Make sure the associated TrackObjects are in the Track */
trackobjects = ges_clip_get_track_objects (GES_CLIP (s1));
fail_unless (trackobjects != NULL);
t1 = GES_TRACK_OBJECT ((trackobjects)->data);
for (tmp = trackobjects; tmp; tmp = tmp->next) {
/* Make sure the associated TrackElements are in the Track */
trackelements = ges_clip_get_track_elements (GES_CLIP (s1));
fail_unless (trackelements != NULL);
t1 = GES_TRACK_ELEMENT ((trackelements)->data);
for (tmp = trackelements; tmp; tmp = tmp->next) {
/* There are 4 references held:
* 1 by the clip
* 1 by the track
* 1 by the timeline
* 1 added by the call to _get_track_objects() above */
ASSERT_OBJECT_REFCOUNT (GES_TRACK_OBJECT (tmp->data), "trackobject", 4);
fail_unless (ges_track_object_get_track (tmp->data) == track1);
g_object_unref (GES_TRACK_OBJECT (tmp->data));
* 1 added by the call to _get_track_elements() above */
ASSERT_OBJECT_REFCOUNT (GES_TRACK_ELEMENT (tmp->data), "trackelement", 4);
fail_unless (ges_track_element_get_track (tmp->data) == track1);
g_object_unref (GES_TRACK_ELEMENT (tmp->data));
}
g_object_ref (t1);
g_list_free (trackobjects);
g_list_free (trackelements);
/* There are 4 references held:
* 1 by the timelinobject
* 1 by the track
* 1 by the timeline
* 1 added by ourselves above (g_object_ref (t1)) */
ASSERT_OBJECT_REFCOUNT (t1, "trackobject", 4);
ASSERT_OBJECT_REFCOUNT (t1, "trackelement", 4);
trackobjects = ges_clip_get_track_objects (GES_CLIP (s2));
fail_unless (trackobjects != NULL);
t2 = GES_TRACK_OBJECT (trackobjects->data);
for (tmp = trackobjects; tmp; tmp = tmp->next) {
trackelements = ges_clip_get_track_elements (GES_CLIP (s2));
fail_unless (trackelements != NULL);
t2 = GES_TRACK_ELEMENT (trackelements->data);
for (tmp = trackelements; tmp; tmp = tmp->next) {
/* There are 4 references held:
* 1 by the clip
* 1 by the track
* 1 by the timeline
* 1 added by the call to _get_track_objects() above */
ASSERT_OBJECT_REFCOUNT (GES_TRACK_OBJECT (tmp->data), "trackobject", 4);
fail_unless (ges_track_object_get_track (tmp->data) == track2);
g_object_unref (GES_TRACK_OBJECT (tmp->data));
* 1 added by the call to _get_track_elements() above */
ASSERT_OBJECT_REFCOUNT (GES_TRACK_ELEMENT (tmp->data), "trackelement", 4);
fail_unless (ges_track_element_get_track (tmp->data) == track2);
g_object_unref (GES_TRACK_ELEMENT (tmp->data));
}
g_object_ref (t2);
g_list_free (trackobjects);
g_list_free (trackelements);
/* There are 4 references held:
* 1 by the timelinobject
* 1 by the track
@ -703,21 +703,21 @@ GST_START_TEST (test_ges_timeline_multiple_tracks)
* 1 added by ourselves above (g_object_ref (t1)) */
ASSERT_OBJECT_REFCOUNT (t2, "t2", 4);
trackobjects = ges_clip_get_track_objects (GES_CLIP (s3));
fail_unless (trackobjects != NULL);
t3 = GES_TRACK_OBJECT (trackobjects->data);
for (tmp = trackobjects; tmp; tmp = tmp->next) {
trackelements = ges_clip_get_track_elements (GES_CLIP (s3));
fail_unless (trackelements != NULL);
t3 = GES_TRACK_ELEMENT (trackelements->data);
for (tmp = trackelements; tmp; tmp = tmp->next) {
/* There are 4 references held:
* 1 by the clip
* 1 by the track
* 1 by the timeline
* 1 added by the call to _get_track_objects() above */
ASSERT_OBJECT_REFCOUNT (GES_TRACK_OBJECT (tmp->data), "trackobject", 4);
fail_unless (ges_track_object_get_track (tmp->data) == track1);
g_object_unref (GES_TRACK_OBJECT (tmp->data));
* 1 added by the call to _get_track_elements() above */
ASSERT_OBJECT_REFCOUNT (GES_TRACK_ELEMENT (tmp->data), "trackelement", 4);
fail_unless (ges_track_element_get_track (tmp->data) == track1);
g_object_unref (GES_TRACK_ELEMENT (tmp->data));
}
g_object_ref (t3);
g_list_free (trackobjects);
g_list_free (trackelements);
/* There are 4 references held:
* 1 by the timelinobject
* 1 by the track

View file

@ -23,11 +23,11 @@
static gboolean
my_fill_track_func (GESClip * object,
GESTrackObject * trobject, GstElement * gnlobj, gpointer user_data)
GESTrackElement * trobject, GstElement * gnlobj, gpointer user_data)
{
GstElement *src;
GST_DEBUG ("timelineobj:%p, trackobjec:%p, gnlobj:%p",
GST_DEBUG ("timelineobj:%p, trackelementec:%p, gnlobj:%p",
object, trobject, gnlobj);
/* Let's just put a fakesource in for the time being */
@ -42,7 +42,7 @@ my_fill_track_func (GESClip * object,
GST_START_TEST (test_object_properties)
{
GESTrack *track;
GESTrackObject *trackobject;
GESTrackElement *trackelement;
GESClip *object;
ges_init ();
@ -60,18 +60,18 @@ GST_START_TEST (test_object_properties)
assert_equals_uint64 (_DURATION (object), 51);
assert_equals_uint64 (_INPOINT (object), 12);
trackobject = ges_clip_create_track_object (object, track->type);
ges_clip_add_track_object (object, trackobject);
fail_unless (trackobject != NULL);
fail_unless (ges_track_object_set_track (trackobject, track));
trackelement = ges_clip_create_track_element (object, track->type);
ges_clip_add_track_element (object, trackelement);
fail_unless (trackelement != NULL);
fail_unless (ges_track_element_set_track (trackelement, track));
/* Check that trackobject has the same properties */
assert_equals_uint64 (_START (trackobject), 42);
assert_equals_uint64 (_DURATION (trackobject), 51);
assert_equals_uint64 (_INPOINT (trackobject), 12);
/* Check that trackelement has the same properties */
assert_equals_uint64 (_START (trackelement), 42);
assert_equals_uint64 (_DURATION (trackelement), 51);
assert_equals_uint64 (_INPOINT (trackelement), 12);
/* And let's also check that it propagated correctly to GNonLin */
gnl_object_check (ges_track_object_get_gnlobject (trackobject), 42, 51, 12,
gnl_object_check (ges_track_element_get_gnlobject (trackelement), 42, 51, 12,
51, 0, TRUE);
/* Change more properties, see if they propagate */
@ -80,24 +80,24 @@ GST_START_TEST (test_object_properties)
assert_equals_uint64 (_START (object), 420);
assert_equals_uint64 (_DURATION (object), 510);
assert_equals_uint64 (_INPOINT (object), 120);
assert_equals_uint64 (_START (trackobject), 420);
assert_equals_uint64 (_DURATION (trackobject), 510);
assert_equals_uint64 (_INPOINT (trackobject), 120);
assert_equals_uint64 (_START (trackelement), 420);
assert_equals_uint64 (_DURATION (trackelement), 510);
assert_equals_uint64 (_INPOINT (trackelement), 120);
/* And let's also check that it propagated correctly to GNonLin */
gnl_object_check (ges_track_object_get_gnlobject (trackobject), 420, 510, 120,
510, 0, TRUE);
gnl_object_check (ges_track_element_get_gnlobject (trackelement), 420, 510,
120, 510, 0, TRUE);
/* This time, we move the trackobject to see if the changes move
/* This time, we move the trackelement to see if the changes move
* along to the parent and the gnonlin object */
g_object_set (trackobject, "start", (guint64) 400, NULL);
g_object_set (trackelement, "start", (guint64) 400, NULL);
assert_equals_uint64 (_START (object), 400);
assert_equals_uint64 (_START (trackobject), 400);
gnl_object_check (ges_track_object_get_gnlobject (trackobject), 400, 510, 120,
510, 0, TRUE);
assert_equals_uint64 (_START (trackelement), 400);
gnl_object_check (ges_track_element_get_gnlobject (trackelement), 400, 510,
120, 510, 0, TRUE);
ges_clip_release_track_object (object, trackobject);
ges_clip_release_track_element (object, trackelement);
g_object_unref (object);
g_object_unref (track);
@ -108,7 +108,7 @@ GST_END_TEST;
GST_START_TEST (test_object_properties_unlocked)
{
GESTrack *track;
GESTrackObject *trackobject;
GESTrackElement *trackelement;
GESClip *object;
ges_init ();
@ -126,22 +126,22 @@ GST_START_TEST (test_object_properties_unlocked)
assert_equals_uint64 (_DURATION (object), 51);
assert_equals_uint64 (_INPOINT (object), 12);
trackobject = ges_clip_create_track_object (object, track->type);
ges_clip_add_track_object (object, trackobject);
fail_unless (trackobject != NULL);
fail_unless (ges_track_object_set_track (trackobject, track));
trackelement = ges_clip_create_track_element (object, track->type);
ges_clip_add_track_element (object, trackelement);
fail_unless (trackelement != NULL);
fail_unless (ges_track_element_set_track (trackelement, track));
/* Check that trackobject has the same properties */
assert_equals_uint64 (_START (trackobject), 42);
assert_equals_uint64 (_DURATION (trackobject), 51);
assert_equals_uint64 (_INPOINT (trackobject), 12);
/* Check that trackelement has the same properties */
assert_equals_uint64 (_START (trackelement), 42);
assert_equals_uint64 (_DURATION (trackelement), 51);
assert_equals_uint64 (_INPOINT (trackelement), 12);
/* And let's also check that it propagated correctly to GNonLin */
gnl_object_check (ges_track_object_get_gnlobject (trackobject), 42, 51, 12,
gnl_object_check (ges_track_element_get_gnlobject (trackelement), 42, 51, 12,
51, 0, TRUE);
/* This time we unlock the trackobject and make sure it doesn't propagate */
ges_track_object_set_locked (trackobject, FALSE);
/* This time we unlock the trackelement and make sure it doesn't propagate */
ges_track_element_set_locked (trackelement, FALSE);
/* Change more properties, they will be set on the GESClip */
g_object_set (object, "start", (guint64) 420, "duration", (guint64) 510,
@ -149,26 +149,26 @@ GST_START_TEST (test_object_properties_unlocked)
assert_equals_uint64 (_START (object), 420);
assert_equals_uint64 (_DURATION (object), 510);
assert_equals_uint64 (_INPOINT (object), 120);
/* ... but not on the GESTrackObject since it was unlocked... */
assert_equals_uint64 (_START (trackobject), 42);
assert_equals_uint64 (_DURATION (trackobject), 51);
assert_equals_uint64 (_INPOINT (trackobject), 12);
/* ... but not on the GESTrackElement since it was unlocked... */
assert_equals_uint64 (_START (trackelement), 42);
assert_equals_uint64 (_DURATION (trackelement), 51);
assert_equals_uint64 (_INPOINT (trackelement), 12);
/* ... and neither on the GNonLin object */
gnl_object_check (ges_track_object_get_gnlobject (trackobject), 42, 51, 12,
gnl_object_check (ges_track_element_get_gnlobject (trackelement), 42, 51, 12,
51, 0, TRUE);
/* When unlocked, moving the GESTrackObject won't move the GESClip
/* When unlocked, moving the GESTrackElement won't move the GESClip
* either */
/* This time, we move the trackobject to see if the changes move
/* This time, we move the trackelement to see if the changes move
* along to the parent and the gnonlin object */
g_object_set (trackobject, "start", (guint64) 400, NULL);
g_object_set (trackelement, "start", (guint64) 400, NULL);
assert_equals_uint64 (_START (object), 420);
assert_equals_uint64 (_START (trackobject), 400);
gnl_object_check (ges_track_object_get_gnlobject (trackobject), 400, 51, 12,
assert_equals_uint64 (_START (trackelement), 400);
gnl_object_check (ges_track_element_get_gnlobject (trackelement), 400, 51, 12,
51, 0, TRUE);
ges_clip_release_track_object (object, trackobject);
ges_clip_release_track_element (object, trackelement);
g_object_unref (object);
g_object_unref (track);
@ -179,9 +179,9 @@ GST_END_TEST;
GST_START_TEST (test_split_object)
{
GESTrack *track;
GESTrackObject *trackobject, *splittckobj;
GESTrackElement *trackelement, *splittrackelement;
GESClip *object, *splitobj;
GList *splittckobjs;
GList *splittrackelements;
ges_init ();
@ -198,18 +198,18 @@ GST_START_TEST (test_split_object)
assert_equals_uint64 (_DURATION (object), 50);
assert_equals_uint64 (_INPOINT (object), 12);
trackobject = ges_clip_create_track_object (object, track->type);
ges_clip_add_track_object (object, trackobject);
fail_unless (trackobject != NULL);
fail_unless (ges_track_object_set_track (trackobject, track));
trackelement = ges_clip_create_track_element (object, track->type);
ges_clip_add_track_element (object, trackelement);
fail_unless (trackelement != NULL);
fail_unless (ges_track_element_set_track (trackelement, track));
/* Check that trackobject has the same properties */
assert_equals_uint64 (_START (trackobject), 42);
assert_equals_uint64 (_DURATION (trackobject), 50);
assert_equals_uint64 (_INPOINT (trackobject), 12);
/* Check that trackelement has the same properties */
assert_equals_uint64 (_START (trackelement), 42);
assert_equals_uint64 (_DURATION (trackelement), 50);
assert_equals_uint64 (_INPOINT (trackelement), 12);
/* And let's also check that it propagated correctly to GNonLin */
gnl_object_check (ges_track_object_get_gnlobject (trackobject), 42, 50, 12,
gnl_object_check (ges_track_element_get_gnlobject (trackelement), 42, 50, 12,
50, 0, TRUE);
splitobj = ges_clip_split (object, 67);
@ -223,29 +223,29 @@ GST_START_TEST (test_split_object)
assert_equals_uint64 (_DURATION (splitobj), 25);
assert_equals_uint64 (_INPOINT (splitobj), 37);
splittckobjs = ges_clip_get_track_objects (splitobj);
fail_unless_equals_int (g_list_length (splittckobjs), 1);
splittrackelements = ges_clip_get_track_elements (splitobj);
fail_unless_equals_int (g_list_length (splittrackelements), 1);
splittckobj = GES_TRACK_OBJECT (splittckobjs->data);
fail_unless (GES_IS_TRACK_OBJECT (splittckobj));
assert_equals_uint64 (_START (splittckobj), 67);
assert_equals_uint64 (_DURATION (splittckobj), 25);
assert_equals_uint64 (_INPOINT (splittckobj), 37);
splittrackelement = GES_TRACK_ELEMENT (splittrackelements->data);
fail_unless (GES_IS_TRACK_ELEMENT (splittrackelement));
assert_equals_uint64 (_START (splittrackelement), 67);
assert_equals_uint64 (_DURATION (splittrackelement), 25);
assert_equals_uint64 (_INPOINT (splittrackelement), 37);
fail_unless (splittckobj != trackobject);
fail_unless (splittrackelement != trackelement);
fail_unless (splitobj != object);
/* We own the only ref */
ASSERT_OBJECT_REFCOUNT (splitobj, "splitobj", 1);
/* 1 ref for the Clip, 1 ref for the Track and 1 in splittckobjs */
ASSERT_OBJECT_REFCOUNT (splittckobj, "splittckobj", 3);
/* 1 ref for the Clip, 1 ref for the Track and 1 in splittrackelements */
ASSERT_OBJECT_REFCOUNT (splittrackelement, "splittrackelement", 3);
g_object_unref (track);
g_object_unref (splitobj);
g_object_unref (object);
ASSERT_OBJECT_REFCOUNT (splittckobj, "splittckobj", 1);
g_list_free_full (splittckobjs, g_object_unref);
ASSERT_OBJECT_REFCOUNT (splittrackelement, "splittrackelement", 1);
g_list_free_full (splittrackelements, g_object_unref);
}
GST_END_TEST;

View file

@ -23,7 +23,7 @@
void effect_added_cb (GESClip * obj, GESTrackEffect * trop, gpointer data);
void
deep_prop_changed_cb (GESTrackObject * obj, GstElement * element,
deep_prop_changed_cb (GESTrackElement * obj, GstElement * element,
GParamSpec * spec);
GST_START_TEST (test_effect_basic)
@ -72,12 +72,12 @@ GST_START_TEST (test_add_effect_to_clip)
fail_unless (GES_IS_TRACK_EFFECT (track_effect));
fail_unless (ges_clip_add_track_object (GES_CLIP
(source), GES_TRACK_OBJECT (track_effect)));
fail_unless (ges_clip_add_track_element (GES_CLIP
(source), GES_TRACK_ELEMENT (track_effect)));
fail_unless (ges_track_add_object (track_video,
GES_TRACK_OBJECT (track_effect)));
GES_TRACK_ELEMENT (track_effect)));
assert_equals_int (GES_TRACK_OBJECT (track_effect)->active, TRUE);
assert_equals_int (GES_TRACK_ELEMENT (track_effect)->active, TRUE);
ges_timeline_layer_remove_object (layer, (GESClip *) source);
@ -123,20 +123,20 @@ GST_START_TEST (test_get_effects_from_tl)
fail_unless (GES_IS_TRACK_EFFECT (track_effect1));
fail_unless (GES_IS_TRACK_EFFECT (track_effect2));
fail_unless (ges_clip_add_track_object (GES_CLIP
(source), GES_TRACK_OBJECT (track_effect)));
fail_unless (ges_clip_add_track_element (GES_CLIP
(source), GES_TRACK_ELEMENT (track_effect)));
fail_unless (ges_track_add_object (track_video,
GES_TRACK_OBJECT (track_effect)));
GES_TRACK_ELEMENT (track_effect)));
fail_unless (ges_clip_add_track_object (GES_CLIP
(source), GES_TRACK_OBJECT (track_effect1)));
fail_unless (ges_clip_add_track_element (GES_CLIP
(source), GES_TRACK_ELEMENT (track_effect1)));
fail_unless (ges_track_add_object (track_video,
GES_TRACK_OBJECT (track_effect1)));
GES_TRACK_ELEMENT (track_effect1)));
fail_unless (ges_clip_add_track_object (GES_CLIP
(source), GES_TRACK_OBJECT (track_effect2)));
fail_unless (ges_clip_add_track_element (GES_CLIP
(source), GES_TRACK_ELEMENT (track_effect2)));
fail_unless (ges_track_add_object (track_video,
GES_TRACK_OBJECT (track_effect2)));
GES_TRACK_ELEMENT (track_effect2)));
g_object_get (G_OBJECT (source), "height", &clip_height, NULL);
fail_unless (clip_height == 4);
@ -197,19 +197,19 @@ GST_START_TEST (test_effect_clip)
(GESClip *) effect_clip, 0);
tck_effect = ges_track_parse_launch_effect_new ("identity");
fail_unless (ges_clip_add_track_object (GES_CLIP
(effect_clip), GES_TRACK_OBJECT (tck_effect)));
fail_unless (ges_clip_add_track_element (GES_CLIP
(effect_clip), GES_TRACK_ELEMENT (tck_effect)));
fail_unless (ges_track_add_object (track_video,
GES_TRACK_OBJECT (tck_effect)));
GES_TRACK_ELEMENT (tck_effect)));
g_object_get (effect_clip, "height", &clip_height, NULL);
assert_equals_int (clip_height, 3);
tck_effect1 = ges_track_parse_launch_effect_new ("identity");
fail_unless (ges_clip_add_track_object (GES_CLIP
(effect_clip), GES_TRACK_OBJECT (tck_effect1)));
fail_unless (ges_clip_add_track_element (GES_CLIP
(effect_clip), GES_TRACK_ELEMENT (tck_effect1)));
fail_unless (ges_track_add_object (track_audio,
GES_TRACK_OBJECT (tck_effect1)));
GES_TRACK_ELEMENT (tck_effect1)));
g_object_get (effect_clip, "height", &clip_height, NULL);
assert_equals_int (clip_height, 4);
@ -220,7 +220,7 @@ GST_START_TEST (test_effect_clip)
GES_TRACK_EFFECT (tmp->data));
fail_unless (priority > effect_prio);
fail_unless (GES_IS_TRACK_EFFECT (tmp->data));
fail_unless (ges_track_object_get_track (GES_TRACK_OBJECT (tmp->
fail_unless (ges_track_element_get_track (GES_TRACK_ELEMENT (tmp->
data))->type == track_type[i]);
effect_prio = priority;
@ -266,19 +266,19 @@ GST_START_TEST (test_priorities_clip)
(GESClip *) effect_clip, 0);
tck_effect = ges_track_parse_launch_effect_new ("identity");
fail_unless (ges_clip_add_track_object (GES_CLIP
(effect_clip), GES_TRACK_OBJECT (tck_effect)));
fail_unless (ges_clip_add_track_element (GES_CLIP
(effect_clip), GES_TRACK_ELEMENT (tck_effect)));
fail_unless (ges_track_add_object (track_video,
GES_TRACK_OBJECT (tck_effect)));
GES_TRACK_ELEMENT (tck_effect)));
g_object_get (effect_clip, "height", &clip_height, NULL);
fail_unless (clip_height == 3);
tck_effect1 = ges_track_parse_launch_effect_new ("identity");
fail_unless (ges_clip_add_track_object (GES_CLIP
(effect_clip), GES_TRACK_OBJECT (tck_effect1)));
fail_unless (ges_clip_add_track_element (GES_CLIP
(effect_clip), GES_TRACK_ELEMENT (tck_effect1)));
fail_unless (ges_track_add_object (track_audio,
GES_TRACK_OBJECT (tck_effect1)));
GES_TRACK_ELEMENT (tck_effect1)));
fail_unless (ges_clip_set_top_effect_priority (GES_CLIP
(effect_clip), GES_TRACK_EFFECT (tck_effect1), 0));
@ -317,7 +317,7 @@ GST_START_TEST (test_track_effect_set_properties)
GESTimelineLayer *layer;
GESTrack *track_video;
GESEffectClip *effect_clip;
GESTrackObject *tck_effect;
GESTrackElement *tck_effect;
guint scratch_line, n_props, i;
gboolean color_aging;
GParamSpec **pspecs, *spec;
@ -341,19 +341,20 @@ GST_START_TEST (test_track_effect_set_properties)
ges_simple_timeline_layer_add_object ((GESSimpleTimelineLayer *) (layer),
(GESClip *) effect_clip, 0);
tck_effect = GES_TRACK_OBJECT (ges_track_parse_launch_effect_new ("agingtv"));
fail_unless (ges_clip_add_track_object (GES_CLIP (effect_clip), tck_effect));
tck_effect =
GES_TRACK_ELEMENT (ges_track_parse_launch_effect_new ("agingtv"));
fail_unless (ges_clip_add_track_element (GES_CLIP (effect_clip), tck_effect));
fail_unless (ges_track_add_object (track_video, tck_effect));
ges_track_object_set_child_properties (tck_effect,
ges_track_element_set_child_properties (tck_effect,
"GstAgingTV::scratch-lines", 17, "color-aging", FALSE, NULL);
ges_track_object_get_child_properties (tck_effect,
ges_track_element_get_child_properties (tck_effect,
"GstAgingTV::scratch-lines", &scratch_line,
"color-aging", &color_aging, NULL);
fail_unless (scratch_line == 17);
fail_unless (color_aging == FALSE);
pspecs = ges_track_object_list_children_properties (tck_effect, &n_props);
pspecs = ges_track_element_list_children_properties (tck_effect, &n_props);
fail_unless (n_props == 7);
spec = pspecs[0];
@ -366,8 +367,8 @@ GST_START_TEST (test_track_effect_set_properties)
g_value_init (&nval, G_TYPE_UINT);
g_value_set_uint (&val, 10);
ges_track_object_set_child_property_by_pspec (tck_effect, spec, &val);
ges_track_object_get_child_property_by_pspec (tck_effect, spec, &nval);
ges_track_element_set_child_property_by_pspec (tck_effect, spec, &val);
ges_track_element_get_child_property_by_pspec (tck_effect, spec, &nval);
fail_unless (g_value_get_uint (&nval) == 10);
for (i = 0; i < n_props; i++) {
@ -391,11 +392,11 @@ effect_added_cb (GESClip * obj, GESTrackEffect * trop, gpointer data)
}
void
deep_prop_changed_cb (GESTrackObject * obj, GstElement * element,
deep_prop_changed_cb (GESTrackElement * obj, GstElement * element,
GParamSpec * spec)
{
GST_DEBUG ("%s property changed", g_param_spec_get_name (spec));
fail_unless (GES_IS_TRACK_OBJECT (obj));
fail_unless (GES_IS_TRACK_ELEMENT (obj));
fail_unless (GST_IS_ELEMENT (element));
}
@ -428,18 +429,18 @@ GST_START_TEST (test_clip_signals)
(GESClip *) effect_clip, 0);
tck_effect = ges_track_parse_launch_effect_new ("agingtv");
fail_unless (ges_clip_add_track_object (GES_CLIP
(effect_clip), GES_TRACK_OBJECT (tck_effect)));
fail_unless (ges_clip_add_track_element (GES_CLIP
(effect_clip), GES_TRACK_ELEMENT (tck_effect)));
fail_unless (ges_track_add_object (track_video,
GES_TRACK_OBJECT (tck_effect)));
GES_TRACK_ELEMENT (tck_effect)));
g_signal_connect (tck_effect, "deep-notify", (GCallback) deep_prop_changed_cb,
tck_effect);
ges_track_object_set_child_properties (GES_TRACK_OBJECT (tck_effect),
ges_track_element_set_child_properties (GES_TRACK_ELEMENT (tck_effect),
"GstAgingTV::scratch-lines", 17, NULL);
g_value_init (&val, G_TYPE_UINT);
ges_track_object_get_child_property (GES_TRACK_OBJECT (tck_effect),
ges_track_element_get_child_property (GES_TRACK_ELEMENT (tck_effect),
"GstAgingTV::scratch-lines", &val);
fail_unless (G_VALUE_HOLDS_UINT (&val));
g_value_unset (&val);

View file

@ -25,11 +25,11 @@
static gboolean
my_fill_track_func (GESClip * object,
GESTrackObject * trobject, GstElement * gnlobj, gpointer user_data)
GESTrackElement * trobject, GstElement * gnlobj, gpointer user_data)
{
GstElement *src;
GST_DEBUG ("timelineobj:%p, trackobjec:%p, gnlobj:%p",
GST_DEBUG ("timelineobj:%p, trackelementec:%p, gnlobj:%p",
object, trobject, gnlobj);
/* Let's just put a fakesource in for the time being */
@ -47,7 +47,7 @@ GST_START_TEST (test_layer_properties)
GESTimeline *timeline;
GESTimelineLayer *layer;
GESTrack *track;
GESTrackObject *trackobject;
GESTrackElement *trackelement;
GESClip *object;
ges_init ();
@ -84,39 +84,39 @@ GST_START_TEST (test_layer_properties)
fail_unless (g_object_is_floating (object));
fail_unless (ges_timeline_layer_add_object (layer, GES_CLIP (object)));
fail_if (g_object_is_floating (object));
trackobject = ges_clip_find_track_object (object, track, G_TYPE_NONE);
fail_unless (trackobject != NULL);
trackelement = ges_clip_find_track_element (object, track, G_TYPE_NONE);
fail_unless (trackelement != NULL);
/* This is not a SimpleLayer, therefore the properties shouldn't have changed */
assert_equals_uint64 (_START (object), 42);
assert_equals_uint64 (_DURATION (object), 51);
assert_equals_uint64 (_INPOINT (object), 12);
assert_equals_uint64 (_PRIORITY (object), 0);
gnl_object_check (ges_track_object_get_gnlobject (trackobject), 42, 51, 12,
gnl_object_check (ges_track_element_get_gnlobject (trackelement), 42, 51, 12,
51, 0, TRUE);
/* Change the priority of the layer */
g_object_set (layer, "priority", 1, NULL);
assert_equals_int (ges_timeline_layer_get_priority (layer), 1);
assert_equals_uint64 (_PRIORITY (object), 0);
gnl_object_check (ges_track_object_get_gnlobject (trackobject), 42, 51, 12,
gnl_object_check (ges_track_element_get_gnlobject (trackelement), 42, 51, 12,
51, LAYER_HEIGHT, TRUE);
/* Change it to an insanely high value */
g_object_set (layer, "priority", 31, NULL);
assert_equals_int (ges_timeline_layer_get_priority (layer), 31);
assert_equals_uint64 (_PRIORITY (object), 0);
gnl_object_check (ges_track_object_get_gnlobject (trackobject), 42, 51, 12,
gnl_object_check (ges_track_element_get_gnlobject (trackelement), 42, 51, 12,
51, LAYER_HEIGHT * 31, TRUE);
/* and back to 0 */
g_object_set (layer, "priority", 0, NULL);
assert_equals_int (ges_timeline_layer_get_priority (layer), 0);
assert_equals_uint64 (_PRIORITY (object), 0);
gnl_object_check (ges_track_object_get_gnlobject (trackobject), 42, 51, 12,
gnl_object_check (ges_track_element_get_gnlobject (trackelement), 42, 51, 12,
51, 0, TRUE);
g_object_unref (trackobject);
g_object_unref (trackelement);
fail_unless (ges_timeline_layer_remove_object (layer, object));
fail_unless (ges_timeline_remove_track (timeline, track));
fail_unless (ges_timeline_remove_layer (timeline, layer));
@ -130,7 +130,7 @@ GST_START_TEST (test_layer_priorities)
GESTrack *track;
GESTimeline *timeline;
GESTimelineLayer *layer1, *layer2, *layer3;
GESTrackObject *tckobj1, *tckobj2, *tckobj3;
GESTrackElement *trackelement1, *trackelement2, *trackelement3;
GESClip *object1, *object2, *object3;
GstElement *gnlobj1, *gnlobj2, *gnlobj3;
guint prio1, prio2, prio3;
@ -181,32 +181,32 @@ GST_START_TEST (test_layer_priorities)
/* Add objects to the timeline */
fail_unless (ges_timeline_layer_add_object (layer1, object1));
tckobj1 = ges_clip_find_track_object (object1, track, G_TYPE_NONE);
fail_unless (tckobj1 != NULL);
trackelement1 = ges_clip_find_track_element (object1, track, G_TYPE_NONE);
fail_unless (trackelement1 != NULL);
fail_unless (ges_timeline_layer_add_object (layer2, object2));
tckobj2 = ges_clip_find_track_object (object2, track, G_TYPE_NONE);
fail_unless (tckobj2 != NULL);
trackelement2 = ges_clip_find_track_element (object2, track, G_TYPE_NONE);
fail_unless (trackelement2 != NULL);
fail_unless (ges_timeline_layer_add_object (layer3, object3));
tckobj3 = ges_clip_find_track_object (object3, track, G_TYPE_NONE);
fail_unless (tckobj3 != NULL);
trackelement3 = ges_clip_find_track_element (object3, track, G_TYPE_NONE);
fail_unless (trackelement3 != NULL);
assert_equals_int (_PRIORITY (object1), 0);
gnlobj1 = ges_track_object_get_gnlobject (tckobj1);
gnlobj1 = ges_track_element_get_gnlobject (trackelement1);
fail_unless (gnlobj1 != NULL);
g_object_get (gnlobj1, "priority", &prio1, NULL);
assert_equals_int (prio1, 0);
assert_equals_int (_PRIORITY (object2), 1);
gnlobj2 = ges_track_object_get_gnlobject (tckobj2);
gnlobj2 = ges_track_element_get_gnlobject (trackelement2);
fail_unless (gnlobj2 != NULL);
g_object_get (gnlobj2, "priority", &prio2, NULL);
/* object2 is on the second layer and has a priority of 1 */
assert_equals_int (prio2, LAYER_HEIGHT + 1);
assert_equals_int (_PRIORITY (object3), LAYER_HEIGHT - 1);
gnlobj3 = ges_track_object_get_gnlobject (tckobj3);
gnlobj3 = ges_track_element_get_gnlobject (trackelement3);
fail_unless (gnlobj3 != NULL);
/* object3 is on the third layer and has a priority of LAYER_HEIGHT + 1
* it priority must have the maximum priority of this layer*/
@ -257,17 +257,17 @@ GST_START_TEST (test_layer_priorities)
assert_equals_int (prio2, 2 * LAYER_HEIGHT + 1);
assert_equals_int (prio3, LAYER_HEIGHT * 3 - 1);
/* And change TrackObject-s priorities and check that changes are well
/* And change TrackElement-s priorities and check that changes are well
* refected on it containing Clip */
ges_timeline_element_set_priority (GES_TIMELINE_ELEMENT (tckobj3),
ges_timeline_element_set_priority (GES_TIMELINE_ELEMENT (trackelement3),
LAYER_HEIGHT * 2);
g_object_get (gnlobj3, "priority", &prio3, NULL);
assert_equals_int (prio3, 2 * LAYER_HEIGHT);
assert_equals_int (_PRIORITY (object3), 0);
g_object_unref (tckobj1);
g_object_unref (tckobj2);
g_object_unref (tckobj3);
g_object_unref (trackelement1);
g_object_unref (trackelement2);
g_object_unref (trackelement3);
g_object_unref (timeline);
}
@ -1230,7 +1230,7 @@ GST_START_TEST (test_layer_activate_automatic_transition)
GES_CLIP (ges_timeline_layer_add_asset (layer,
transition_asset, 1000, 0, 500, 1, GES_TRACK_TYPE_VIDEO));
fail_unless (GES_IS_TRANSITION_CLIP (transition));
objects = ges_clip_get_track_objects (transition);
objects = ges_clip_get_track_elements (transition);
assert_equals_int (g_list_length (objects), 1);
g_list_free_full (objects, gst_object_unref);

View file

@ -38,7 +38,7 @@ GST_END_TEST;
GST_START_TEST (test_overlay_properties)
{
GESTrack *track;
GESTrackObject *trackobject;
GESTrackElement *trackelement;
GESClip *object;
ges_init ();
@ -57,18 +57,18 @@ GST_START_TEST (test_overlay_properties)
assert_equals_uint64 (_DURATION (object), 51);
assert_equals_uint64 (_INPOINT (object), 12);
trackobject = ges_clip_create_track_object (object, track->type);
ges_clip_add_track_object (object, trackobject);
fail_unless (trackobject != NULL);
fail_unless (ges_track_object_set_track (trackobject, track));
trackelement = ges_clip_create_track_element (object, track->type);
ges_clip_add_track_element (object, trackelement);
fail_unless (trackelement != NULL);
fail_unless (ges_track_element_set_track (trackelement, track));
/* Check that trackobject has the same properties */
assert_equals_uint64 (_START (trackobject), 42);
assert_equals_uint64 (_DURATION (trackobject), 51);
assert_equals_uint64 (_INPOINT (trackobject), 12);
/* Check that trackelement has the same properties */
assert_equals_uint64 (_START (trackelement), 42);
assert_equals_uint64 (_DURATION (trackelement), 51);
assert_equals_uint64 (_INPOINT (trackelement), 12);
/* And let's also check that it propagated correctly to GNonLin */
gnl_object_check (ges_track_object_get_gnlobject (trackobject), 42, 51, 12,
gnl_object_check (ges_track_element_get_gnlobject (trackelement), 42, 51, 12,
51, 0, TRUE);
/* Change more properties, see if they propagate */
@ -77,15 +77,15 @@ GST_START_TEST (test_overlay_properties)
assert_equals_uint64 (_START (object), 420);
assert_equals_uint64 (_DURATION (object), 510);
assert_equals_uint64 (_INPOINT (object), 120);
assert_equals_uint64 (_START (trackobject), 420);
assert_equals_uint64 (_DURATION (trackobject), 510);
assert_equals_uint64 (_INPOINT (trackobject), 120);
assert_equals_uint64 (_START (trackelement), 420);
assert_equals_uint64 (_DURATION (trackelement), 510);
assert_equals_uint64 (_INPOINT (trackelement), 120);
/* And let's also check that it propagated correctly to GNonLin */
gnl_object_check (ges_track_object_get_gnlobject (trackobject), 420, 510, 120,
510, 0, TRUE);
gnl_object_check (ges_track_element_get_gnlobject (trackelement), 420, 510,
120, 510, 0, TRUE);
ges_clip_release_track_object (object, trackobject);
ges_clip_release_track_element (object, trackelement);
g_object_unref (object);
}
@ -96,7 +96,7 @@ GST_START_TEST (test_overlay_in_layer)
GESTimeline *timeline;
GESTimelineLayer *layer;
GESTrack *a, *v;
GESTrackObject *trobj;
GESTrackElement *trobj;
GESTextOverlayClip *source;
gchar *text;
gint halign, valign;
@ -128,7 +128,7 @@ GST_START_TEST (test_overlay_in_layer)
assert_equals_string ("some text", text);
g_free (text);
trobj = ges_clip_find_track_object (GES_CLIP (source), v, G_TYPE_NONE);
trobj = ges_clip_find_track_element (GES_CLIP (source), v, G_TYPE_NONE);
/* test the font-desc property */
g_object_set (source, "font-desc", (gchar *) "sans 72", NULL);

View file

@ -198,7 +198,7 @@ _test_project (GESProject * project, GESTimeline * timeline)
GESTrack *track;
const GList *profiles;
GstEncodingContainerProfile *profile;
GList *tracks, *tmp, *tmptckobj, *clips;
GList *tracks, *tmp, *tmptrackelement, *clips;
fail_unless (GES_IS_TIMELINE (timeline));
assert_equals_int (g_list_length (timeline->layers), 2);
@ -222,40 +222,42 @@ _test_project (GESProject * project, GESTimeline * timeline)
tracks = ges_timeline_get_tracks (timeline);
assert_equals_int (g_list_length (tracks), 2);
for (tmp = tracks; tmp; tmp = tmp->next) {
GList *trackobjs;
GList *trackelements;
track = GES_TRACK (tmp->data);
trackobjs = ges_track_get_objects (track);
trackelements = ges_track_get_objects (track);
GST_DEBUG_OBJECT (track, "Testing track");
switch (track->type) {
case GES_TRACK_TYPE_VIDEO:
assert_equals_int (g_list_length (trackobjs), 2);
for (tmptckobj = trackobjs; tmptckobj; tmptckobj = tmptckobj->next) {
GESTrackObject *tckobj = GES_TRACK_OBJECT (tmptckobj->data);
assert_equals_int (g_list_length (trackelements), 2);
for (tmptrackelement = trackelements; tmptrackelement;
tmptrackelement = tmptrackelement->next) {
GESTrackElement *trackelement =
GES_TRACK_ELEMENT (tmptrackelement->data);
if (GES_IS_TRACK_EFFECT (tckobj)) {
if (GES_IS_TRACK_EFFECT (trackelement)) {
guint nb_scratch_lines;
ges_track_object_get_child_properties (tckobj, "scratch-lines",
&nb_scratch_lines, NULL);
ges_track_element_get_child_properties (trackelement,
"scratch-lines", &nb_scratch_lines, NULL);
assert_equals_int (nb_scratch_lines, 12);
gnl_object_check (ges_track_object_get_gnlobject (tckobj),
gnl_object_check (ges_track_element_get_gnlobject (trackelement),
0, 1000000000, 0, 1000000000, 0, TRUE);
} else {
gnl_object_check (ges_track_object_get_gnlobject (tckobj),
gnl_object_check (ges_track_element_get_gnlobject (trackelement),
0, 1000000000, 0, 1000000000, 1, TRUE);
}
}
break;
case GES_TRACK_TYPE_AUDIO:
assert_equals_int (g_list_length (trackobjs), 2);
assert_equals_int (g_list_length (trackelements), 2);
break;
default:
g_assert (1);
}
g_list_free_full (trackobjs, gst_object_unref);
g_list_free_full (trackelements, gst_object_unref);
}
g_list_free_full (tracks, gst_object_unref);

View file

@ -23,11 +23,11 @@
static gboolean
my_fill_track_func (GESClip * object,
GESTrackObject * trobject, GstElement * gnlobj, gpointer user_data)
GESTrackElement * trobject, GstElement * gnlobj, gpointer user_data)
{
GstElement *src;
GST_DEBUG ("timelineobj:%p, trackobjec:%p, gnlobj:%p",
GST_DEBUG ("timelineobj:%p, trackelementec:%p, gnlobj:%p",
object, trobject, gnlobj);
/* Let's just put a fakesource in for the time being */
@ -42,13 +42,13 @@ my_fill_track_func (GESClip * object,
static gboolean
arbitrary_fill_track_func (GESClip * object,
GESTrackObject * trobject, GstElement * gnlobj, gpointer user_data)
GESTrackElement * trobject, GstElement * gnlobj, gpointer user_data)
{
GstElement *src;
g_assert (user_data);
GST_DEBUG ("element:%s, timelineobj:%p, trackobjects:%p, gnlobj:%p,",
GST_DEBUG ("element:%s, timelineobj:%p, trackelements:%p, gnlobj:%p,",
(const gchar *) user_data, object, trobject, gnlobj);
/* interpret user_data as name of element to create */

View file

@ -26,7 +26,7 @@ GST_START_TEST (test_text_properties_in_layer)
GESTimeline *timeline;
GESTimelineLayer *layer;
GESTrack *a, *v;
GESTrackObject *trobj;
GESTrackElement *trobj;
GESTestClip *source;
gchar *text;
gint halign, valign;
@ -50,7 +50,7 @@ GST_START_TEST (test_text_properties_in_layer)
(GESClip *) source, 0);
trobj =
ges_clip_find_track_object (GES_CLIP (source), v,
ges_clip_find_track_element (GES_CLIP (source), v,
GES_TYPE_TRACK_TEXT_OVERLAY);
fail_unless (trobj != NULL);

View file

@ -24,11 +24,11 @@
static gboolean
my_fill_track_func (GESClip * object,
GESTrackObject * trobject, GstElement * gnlobj, gpointer user_data)
GESTrackElement * trobject, GstElement * gnlobj, gpointer user_data)
{
GstElement *src;
GST_DEBUG ("timelineobj:%p, trackobjec:%p, gnlobj:%p",
GST_DEBUG ("timelineobj:%p, trackelementec:%p, gnlobj:%p",
object, trobject, gnlobj);
/* Let's just put a fakesource in for the time being */
@ -56,7 +56,7 @@ GST_START_TEST (test_basic_timeline_edition)
{
GESTrack *track;
GESTimeline *timeline;
GESTrackObject *tckobj, *tckobj1, *tckobj2;
GESTrackElement *trackelement, *trackelement1, *trackelement2;
GESClip *obj, *obj1, *obj2;
ges_init ();
@ -90,23 +90,23 @@ GST_START_TEST (test_basic_timeline_edition)
g_object_set (obj2, "start", (guint64) 50, "duration", (guint64) 60,
"in-point", (guint64) 0, NULL);
tckobj = ges_clip_create_track_object (obj, track->type);
fail_unless (tckobj != NULL);
fail_unless (ges_clip_add_track_object (obj, tckobj));
fail_unless (ges_track_add_object (track, tckobj));
assert_equals_uint64 (_DURATION (tckobj), 10);
trackelement = ges_clip_create_track_element (obj, track->type);
fail_unless (trackelement != NULL);
fail_unless (ges_clip_add_track_element (obj, trackelement));
fail_unless (ges_track_add_object (track, trackelement));
assert_equals_uint64 (_DURATION (trackelement), 10);
tckobj1 = ges_clip_create_track_object (obj1, track->type);
fail_unless (tckobj1 != NULL);
fail_unless (ges_clip_add_track_object (obj1, tckobj1));
fail_unless (ges_track_add_object (track, tckobj1));
assert_equals_uint64 (_DURATION (tckobj1), 10);
trackelement1 = ges_clip_create_track_element (obj1, track->type);
fail_unless (trackelement1 != NULL);
fail_unless (ges_clip_add_track_element (obj1, trackelement1));
fail_unless (ges_track_add_object (track, trackelement1));
assert_equals_uint64 (_DURATION (trackelement1), 10);
tckobj2 = ges_clip_create_track_object (obj2, track->type);
fail_unless (ges_clip_add_track_object (obj2, tckobj2));
fail_unless (tckobj2 != NULL);
fail_unless (ges_track_add_object (track, tckobj2));
assert_equals_uint64 (_DURATION (tckobj2), 60);
trackelement2 = ges_clip_create_track_element (obj2, track->type);
fail_unless (ges_clip_add_track_element (obj2, trackelement2));
fail_unless (trackelement2 != NULL);
fail_unless (ges_track_add_object (track, trackelement2));
assert_equals_uint64 (_DURATION (trackelement2), 60);
/**
* Simple rippling obj to: 10
@ -120,27 +120,27 @@ GST_START_TEST (test_basic_timeline_edition)
*/
fail_unless (ges_clip_edit (obj, NULL, -1, GES_EDIT_MODE_RIPPLE,
GES_EDGE_NONE, 10) == TRUE);
CHECK_OBJECT_PROPS (tckobj, 10, 0, 10);
CHECK_OBJECT_PROPS (tckobj1, 20, 0, 10);
CHECK_OBJECT_PROPS (tckobj2, 60, 0, 60);
CHECK_OBJECT_PROPS (trackelement, 10, 0, 10);
CHECK_OBJECT_PROPS (trackelement1, 20, 0, 10);
CHECK_OBJECT_PROPS (trackelement2, 60, 0, 60);
/* FIXME find a way to check that we are using the same MovingContext
* inside the GESTrack */
fail_unless (ges_clip_edit (obj1, NULL, -1, GES_EDIT_MODE_RIPPLE,
GES_EDGE_NONE, 40) == TRUE);
CHECK_OBJECT_PROPS (tckobj, 10, 0, 10);
CHECK_OBJECT_PROPS (tckobj1, 40, 0, 10);
CHECK_OBJECT_PROPS (tckobj2, 80, 0, 60);
CHECK_OBJECT_PROPS (trackelement, 10, 0, 10);
CHECK_OBJECT_PROPS (trackelement1, 40, 0, 10);
CHECK_OBJECT_PROPS (trackelement2, 80, 0, 60);
/**
* Rippling obj1 back to: 20 (getting to the exact same timeline as before
*/
fail_unless (ges_clip_edit (obj1, NULL, -1, GES_EDIT_MODE_RIPPLE,
GES_EDGE_NONE, 20) == TRUE);
CHECK_OBJECT_PROPS (tckobj, 10, 0, 10);
CHECK_OBJECT_PROPS (tckobj1, 20, 0, 10);
CHECK_OBJECT_PROPS (tckobj2, 60, 0, 60);
CHECK_OBJECT_PROPS (trackelement, 10, 0, 10);
CHECK_OBJECT_PROPS (trackelement1, 20, 0, 10);
CHECK_OBJECT_PROPS (trackelement2, 60, 0, 60);
/**
* Simple move obj to: 27 and obj2 to 35
@ -156,9 +156,9 @@ GST_START_TEST (test_basic_timeline_edition)
GES_EDGE_NONE, 27) == TRUE);
fail_unless (ges_clip_edit (obj2, NULL, -1, GES_EDIT_MODE_NORMAL,
GES_EDGE_NONE, 35) == TRUE);
CHECK_OBJECT_PROPS (tckobj, 27, 0, 10);
CHECK_OBJECT_PROPS (tckobj1, 20, 0, 10);
CHECK_OBJECT_PROPS (tckobj2, 35, 0, 60);
CHECK_OBJECT_PROPS (trackelement, 27, 0, 10);
CHECK_OBJECT_PROPS (trackelement1, 20, 0, 10);
CHECK_OBJECT_PROPS (trackelement2, 35, 0, 60);
/**
* Trim start obj to: 32 and obj2 to 35
@ -172,9 +172,9 @@ GST_START_TEST (test_basic_timeline_edition)
*/
fail_unless (ges_clip_edit (obj, NULL, -1, GES_EDIT_MODE_TRIM,
GES_EDGE_START, 32) == TRUE);
CHECK_OBJECT_PROPS (tckobj, 32, 5, 5);
CHECK_OBJECT_PROPS (tckobj1, 20, 0, 10);
CHECK_OBJECT_PROPS (tckobj2, 35, 0, 60);
CHECK_OBJECT_PROPS (trackelement, 32, 5, 5);
CHECK_OBJECT_PROPS (trackelement1, 20, 0, 10);
CHECK_OBJECT_PROPS (trackelement2, 35, 0, 60);
/* Ripple end obj to 42
* New timeline:
@ -186,9 +186,9 @@ GST_START_TEST (test_basic_timeline_edition)
*/
fail_unless (ges_clip_edit (obj, NULL, -1, GES_EDIT_MODE_RIPPLE,
GES_EDGE_END, 42) == TRUE);
CHECK_OBJECT_PROPS (tckobj, 32, 5, 10);
CHECK_OBJECT_PROPS (tckobj1, 20, 0, 10);
CHECK_OBJECT_PROPS (tckobj2, 35, 0, 60);
CHECK_OBJECT_PROPS (trackelement, 32, 5, 10);
CHECK_OBJECT_PROPS (trackelement1, 20, 0, 10);
CHECK_OBJECT_PROPS (trackelement2, 35, 0, 60);
/**
* New timeline:
@ -201,9 +201,9 @@ GST_START_TEST (test_basic_timeline_edition)
GES_EDGE_NONE, 42) == TRUE);
fail_unless (ges_clip_edit (obj, NULL, -1, GES_EDIT_MODE_RIPPLE,
GES_EDGE_END, 52) == TRUE);
CHECK_OBJECT_PROPS (tckobj, 32, 5, 20);
CHECK_OBJECT_PROPS (tckobj1, 20, 0, 10);
CHECK_OBJECT_PROPS (tckobj2, 52, 0, 60);
CHECK_OBJECT_PROPS (trackelement, 32, 5, 20);
CHECK_OBJECT_PROPS (trackelement1, 20, 0, 10);
CHECK_OBJECT_PROPS (trackelement2, 52, 0, 60);
/**
* New timeline:
@ -214,9 +214,9 @@ GST_START_TEST (test_basic_timeline_edition)
*/
fail_unless (ges_clip_edit (obj1, NULL, -1, GES_EDIT_MODE_RIPPLE,
GES_EDGE_END, 40) == TRUE);
CHECK_OBJECT_PROPS (tckobj, 42, 5, 20);
CHECK_OBJECT_PROPS (tckobj1, 20, 0, 20);
CHECK_OBJECT_PROPS (tckobj2, 62, 0, 60);
CHECK_OBJECT_PROPS (trackelement, 42, 5, 20);
CHECK_OBJECT_PROPS (trackelement1, 20, 0, 20);
CHECK_OBJECT_PROPS (trackelement2, 62, 0, 60);
/**
* New timeline:
@ -229,18 +229,18 @@ GST_START_TEST (test_basic_timeline_edition)
GES_EDGE_START, 40) == TRUE);
fail_unless (ges_clip_edit (obj, NULL, -1, GES_EDIT_MODE_ROLL,
GES_EDGE_START, 25) == TRUE);
CHECK_OBJECT_PROPS (tckobj, 25, 0, 37);
CHECK_OBJECT_PROPS (tckobj1, 20, 0, 5);
CHECK_OBJECT_PROPS (tckobj2, 62, 0, 60);
CHECK_OBJECT_PROPS (trackelement, 25, 0, 37);
CHECK_OBJECT_PROPS (trackelement1, 20, 0, 5);
CHECK_OBJECT_PROPS (trackelement2, 62, 0, 60);
/* Make sure that not doing anything when not able to roll */
fail_unless (ges_clip_edit (obj, NULL, -1, GES_EDIT_MODE_ROLL,
GES_EDGE_START, 65) == TRUE);
fail_unless (ges_clip_edit (obj1, NULL, -1, GES_EDIT_MODE_ROLL,
GES_EDGE_END, 65) == TRUE, 0);
CHECK_OBJECT_PROPS (tckobj, 25, 0, 37);
CHECK_OBJECT_PROPS (tckobj1, 20, 0, 5);
CHECK_OBJECT_PROPS (tckobj2, 62, 0, 60);
CHECK_OBJECT_PROPS (trackelement, 25, 0, 37);
CHECK_OBJECT_PROPS (trackelement1, 20, 0, 5);
CHECK_OBJECT_PROPS (trackelement2, 62, 0, 60);
g_object_unref (timeline);
g_object_unref (obj);
@ -254,10 +254,10 @@ GST_START_TEST (test_snapping)
{
GESTrack *track;
GESTimeline *timeline;
GESTrackObject *tckobj, *tckobj1, *tckobj2;
GESTrackElement *trackelement, *trackelement1, *trackelement2;
GESClip *obj, *obj1, *obj2;
GESTimelineLayer *layer;
GList *tckobjs;
GList *trackelements;
ges_init ();
@ -294,55 +294,58 @@ GST_START_TEST (test_snapping)
fail_unless (ges_timeline_layer_add_object (layer, obj));
fail_unless ((tckobjs = ges_clip_get_track_objects (obj)) != NULL);
fail_unless ((tckobj = GES_TRACK_OBJECT (tckobjs->data)) != NULL);
fail_unless (ges_track_object_get_track (tckobj) == track);
assert_equals_uint64 (_DURATION (tckobj), 37);
g_list_free_full (tckobjs, g_object_unref);
fail_unless ((trackelements = ges_clip_get_track_elements (obj)) != NULL);
fail_unless ((trackelement =
GES_TRACK_ELEMENT (trackelements->data)) != NULL);
fail_unless (ges_track_element_get_track (trackelement) == track);
assert_equals_uint64 (_DURATION (trackelement), 37);
g_list_free_full (trackelements, g_object_unref);
/* We have 3 references to tckobj from:
/* We have 3 references to trackelement from:
* track + timeline + obj */
ASSERT_OBJECT_REFCOUNT (tckobj, "First tckobj", 3);
ASSERT_OBJECT_REFCOUNT (trackelement, "First trackelement", 3);
/* We have 1 ref to obj1:
* + layer */
ASSERT_OBJECT_REFCOUNT (obj, "First clip", 1);
fail_unless (ges_timeline_layer_add_object (layer, obj1));
fail_unless ((tckobjs = ges_clip_get_track_objects (obj1)) != NULL);
fail_unless ((tckobj1 = GES_TRACK_OBJECT (tckobjs->data)) != NULL);
fail_unless (ges_track_object_get_track (tckobj1) == track);
assert_equals_uint64 (_DURATION (tckobj1), 15);
g_list_free_full (tckobjs, g_object_unref);
fail_unless ((trackelements = ges_clip_get_track_elements (obj1)) != NULL);
fail_unless ((trackelement1 =
GES_TRACK_ELEMENT (trackelements->data)) != NULL);
fail_unless (ges_track_element_get_track (trackelement1) == track);
assert_equals_uint64 (_DURATION (trackelement1), 15);
g_list_free_full (trackelements, g_object_unref);
/* Same ref logic */
ASSERT_OBJECT_REFCOUNT (tckobj1, "First tckobj", 3);
ASSERT_OBJECT_REFCOUNT (trackelement1, "First trackelement", 3);
ASSERT_OBJECT_REFCOUNT (obj1, "First clip", 1);
fail_unless (ges_timeline_layer_add_object (layer, obj2));
fail_unless ((tckobjs = ges_clip_get_track_objects (obj2)) != NULL);
fail_unless ((tckobj2 = GES_TRACK_OBJECT (tckobjs->data)) != NULL);
fail_unless (ges_track_object_get_track (tckobj2) == track);
assert_equals_uint64 (_DURATION (tckobj2), 60);
g_list_free_full (tckobjs, g_object_unref);
fail_unless ((trackelements = ges_clip_get_track_elements (obj2)) != NULL);
fail_unless ((trackelement2 =
GES_TRACK_ELEMENT (trackelements->data)) != NULL);
fail_unless (ges_track_element_get_track (trackelement2) == track);
assert_equals_uint64 (_DURATION (trackelement2), 60);
g_list_free_full (trackelements, g_object_unref);
/* Same ref logic */
ASSERT_OBJECT_REFCOUNT (tckobj2, "First tckobj", 3);
ASSERT_OBJECT_REFCOUNT (trackelement2, "First trackelement", 3);
ASSERT_OBJECT_REFCOUNT (obj2, "First clip", 1);
/* Snaping to edge, so no move */
g_object_set (timeline, "snapping-distance", (guint64) 3, NULL);
fail_unless (ges_clip_edit (obj1, NULL, -1, GES_EDIT_MODE_TRIM,
GES_EDGE_END, 27) == TRUE);
CHECK_OBJECT_PROPS (tckobj, 25, 0, 37);
CHECK_OBJECT_PROPS (tckobj1, 20, 0, 5);
CHECK_OBJECT_PROPS (tckobj2, 62, 0, 60);
CHECK_OBJECT_PROPS (trackelement, 25, 0, 37);
CHECK_OBJECT_PROPS (trackelement1, 20, 0, 5);
CHECK_OBJECT_PROPS (trackelement2, 62, 0, 60);
/* Snaping to edge, so no move */
fail_unless (ges_clip_edit (obj1, NULL, -1, GES_EDIT_MODE_TRIM,
GES_EDGE_END, 27) == TRUE);
CHECK_OBJECT_PROPS (tckobj, 25, 0, 37);
CHECK_OBJECT_PROPS (tckobj1, 20, 0, 5);
CHECK_OBJECT_PROPS (tckobj2, 62, 0, 60);
CHECK_OBJECT_PROPS (trackelement, 25, 0, 37);
CHECK_OBJECT_PROPS (trackelement1, 20, 0, 5);
CHECK_OBJECT_PROPS (trackelement2, 62, 0, 60);
/**
* New timeline:
@ -354,9 +357,9 @@ GST_START_TEST (test_snapping)
*/
g_object_set (timeline, "snapping-distance", (guint64) 0, NULL);
ges_timeline_element_set_duration (GES_TIMELINE_ELEMENT (obj1), 10);
CHECK_OBJECT_PROPS (tckobj, 25, 0, 37);
CHECK_OBJECT_PROPS (tckobj1, 20, 0, 10);
CHECK_OBJECT_PROPS (tckobj2, 62, 0, 60);
CHECK_OBJECT_PROPS (trackelement, 25, 0, 37);
CHECK_OBJECT_PROPS (trackelement1, 20, 0, 10);
CHECK_OBJECT_PROPS (trackelement2, 62, 0, 60);
/**
* New timeline(the "layers" are just to help reading diagram, nothing else):
@ -372,9 +375,9 @@ GST_START_TEST (test_snapping)
fail_unless (ges_timeline_element_roll_end (GES_TIMELINE_ELEMENT (obj1), 62));
fail_unless (ges_timeline_element_roll_end (GES_TIMELINE_ELEMENT (obj1),
72) == TRUE);
CHECK_OBJECT_PROPS (tckobj, 25, 0, 37);
CHECK_OBJECT_PROPS (tckobj1, 20, 0, 52);
CHECK_OBJECT_PROPS (tckobj2, 72, 10, 50);
CHECK_OBJECT_PROPS (trackelement, 25, 0, 37);
CHECK_OBJECT_PROPS (trackelement1, 20, 0, 52);
CHECK_OBJECT_PROPS (trackelement2, 72, 10, 50);
/**
* 0----------
@ -387,9 +390,9 @@ GST_START_TEST (test_snapping)
g_object_set (timeline, "snapping-distance", (guint64) 4, NULL);
fail_unless (ges_timeline_element_trim (GES_TIMELINE_ELEMENT (obj1),
28) == TRUE);
CHECK_OBJECT_PROPS (tckobj, 25, 0, 37);
CHECK_OBJECT_PROPS (tckobj1, 25, 5, 47);
CHECK_OBJECT_PROPS (tckobj2, 72, 10, 50);
CHECK_OBJECT_PROPS (trackelement, 25, 0, 37);
CHECK_OBJECT_PROPS (trackelement1, 25, 5, 47);
CHECK_OBJECT_PROPS (trackelement2, 72, 10, 50);
/**
* 0----------
@ -401,9 +404,9 @@ GST_START_TEST (test_snapping)
*/
fail_unless (ges_timeline_element_roll_start (GES_TIMELINE_ELEMENT (obj2),
59) == TRUE);
CHECK_OBJECT_PROPS (tckobj, 25, 0, 37);
CHECK_OBJECT_PROPS (tckobj1, 25, 5, 37);
CHECK_OBJECT_PROPS (tckobj2, 62, 0, 60);
CHECK_OBJECT_PROPS (trackelement, 25, 0, 37);
CHECK_OBJECT_PROPS (trackelement1, 25, 5, 37);
CHECK_OBJECT_PROPS (trackelement2, 62, 0, 60);
/**
* inpoints 0----------5---------- 0----------
@ -412,9 +415,9 @@ GST_START_TEST (test_snapping)
*/
fail_unless (ges_timeline_element_ripple (GES_TIMELINE_ELEMENT (obj1),
58) == TRUE);
CHECK_OBJECT_PROPS (tckobj, 25, 0, 37);
CHECK_OBJECT_PROPS (tckobj1, 62, 5, 37);
CHECK_OBJECT_PROPS (tckobj2, 99, 0, 60);
CHECK_OBJECT_PROPS (trackelement, 25, 0, 37);
CHECK_OBJECT_PROPS (trackelement1, 62, 5, 37);
CHECK_OBJECT_PROPS (trackelement2, 99, 0, 60);
/**
* inpoints 0----------5---------- 0----------
@ -422,9 +425,9 @@ GST_START_TEST (test_snapping)
* time 25---------62-------- 99 110--------170
*/
ges_timeline_element_set_start (GES_TIMELINE_ELEMENT (obj2), 110);
CHECK_OBJECT_PROPS (tckobj, 25, 0, 37);
CHECK_OBJECT_PROPS (tckobj1, 62, 5, 37);
CHECK_OBJECT_PROPS (tckobj2, 110, 0, 60);
CHECK_OBJECT_PROPS (trackelement, 25, 0, 37);
CHECK_OBJECT_PROPS (trackelement1, 62, 5, 37);
CHECK_OBJECT_PROPS (trackelement2, 110, 0, 60);
/**
* inpoints 0----------5 5 --------- 0----------
@ -433,9 +436,9 @@ GST_START_TEST (test_snapping)
*/
fail_unless (ges_clip_edit (obj1, NULL, -1, GES_EDIT_MODE_NORMAL,
GES_EDGE_NONE, 72) == TRUE);
CHECK_OBJECT_PROPS (tckobj, 25, 0, 37);
CHECK_OBJECT_PROPS (tckobj1, 73, 5, 37);
CHECK_OBJECT_PROPS (tckobj2, 110, 0, 60);
CHECK_OBJECT_PROPS (trackelement, 25, 0, 37);
CHECK_OBJECT_PROPS (trackelement1, 73, 5, 37);
CHECK_OBJECT_PROPS (trackelement2, 110, 0, 60);
/**
* inpoints 0----------5---------- 0----------
@ -444,9 +447,9 @@ GST_START_TEST (test_snapping)
*/
fail_unless (ges_clip_edit (obj1, NULL, -1, GES_EDIT_MODE_NORMAL,
GES_EDGE_NONE, 58) == TRUE);
CHECK_OBJECT_PROPS (tckobj, 25, 0, 37);
CHECK_OBJECT_PROPS (tckobj1, 62, 5, 37);
CHECK_OBJECT_PROPS (tckobj2, 110, 0, 60);
CHECK_OBJECT_PROPS (trackelement, 25, 0, 37);
CHECK_OBJECT_PROPS (trackelement1, 62, 5, 37);
CHECK_OBJECT_PROPS (trackelement2, 110, 0, 60);
/**
@ -455,9 +458,9 @@ GST_START_TEST (test_snapping)
* time 25---------62--------110--------170
*/
g_object_set (obj1, "duration", 46, NULL);
CHECK_OBJECT_PROPS (tckobj, 25, 0, 37);
CHECK_OBJECT_PROPS (tckobj1, 62, 5, 48);
CHECK_OBJECT_PROPS (tckobj2, 110, 0, 60);
CHECK_OBJECT_PROPS (trackelement, 25, 0, 37);
CHECK_OBJECT_PROPS (trackelement1, 62, 5, 48);
CHECK_OBJECT_PROPS (trackelement2, 110, 0, 60);
/**
* inpoints 5----------- 0--------- 0----------
@ -465,14 +468,14 @@ GST_START_TEST (test_snapping)
* time 62---------110--------170--------207
*/
g_object_set (obj, "start", 168, NULL);
CHECK_OBJECT_PROPS (tckobj, 170, 0, 37);
CHECK_OBJECT_PROPS (tckobj1, 62, 5, 48);
CHECK_OBJECT_PROPS (tckobj2, 110, 0, 60);
CHECK_OBJECT_PROPS (trackelement, 170, 0, 37);
CHECK_OBJECT_PROPS (trackelement1, 62, 5, 48);
CHECK_OBJECT_PROPS (trackelement2, 110, 0, 60);
/* Check we didn't lose/screwed any references */
ASSERT_OBJECT_REFCOUNT (tckobj, "First tckobj", 3);
ASSERT_OBJECT_REFCOUNT (tckobj1, "Second tckobj", 3);
ASSERT_OBJECT_REFCOUNT (tckobj2, "Third tckobj", 3);
ASSERT_OBJECT_REFCOUNT (trackelement, "First trackelement", 3);
ASSERT_OBJECT_REFCOUNT (trackelement1, "Second trackelement", 3);
ASSERT_OBJECT_REFCOUNT (trackelement2, "Third trackelement", 3);
ASSERT_OBJECT_REFCOUNT (obj, "First clip", 1);
ASSERT_OBJECT_REFCOUNT (obj1, "Second clip", 1);
ASSERT_OBJECT_REFCOUNT (obj2, "Third clip", 1);
@ -480,9 +483,9 @@ GST_START_TEST (test_snapping)
g_object_unref (timeline);
/* Check we destroyed everything */
fail_if (G_IS_OBJECT (tckobj));
fail_if (G_IS_OBJECT (tckobj1));
fail_if (G_IS_OBJECT (tckobj2));
fail_if (G_IS_OBJECT (trackelement));
fail_if (G_IS_OBJECT (trackelement1));
fail_if (G_IS_OBJECT (trackelement2));
fail_if (G_IS_OBJECT (obj));
fail_if (G_IS_OBJECT (obj1));
fail_if (G_IS_OBJECT (obj2));
@ -496,10 +499,10 @@ GST_START_TEST (test_timeline_edition_mode)
guint i;
GESTrack *track;
GESTimeline *timeline;
GESTrackObject *tckobj, *tckobj1, *tckobj2;
GESTrackElement *trackelement, *trackelement1, *trackelement2;
GESClip *obj, *obj1, *obj2;
GESTimelineLayer *layer, *layer1, *layer2;
GList *tckobjs, *layers, *tmp;
GList *trackelements, *layers, *tmp;
ges_init ();
@ -540,11 +543,12 @@ GST_START_TEST (test_timeline_edition_mode)
fail_unless (ges_timeline_layer_add_object (layer, obj));
fail_unless ((tckobjs = ges_clip_get_track_objects (obj)) != NULL);
fail_unless ((tckobj = GES_TRACK_OBJECT (tckobjs->data)) != NULL);
fail_unless (ges_track_object_get_track (tckobj) == track);
assert_equals_uint64 (_DURATION (tckobj), 10);
g_list_free_full (tckobjs, g_object_unref);
fail_unless ((trackelements = ges_clip_get_track_elements (obj)) != NULL);
fail_unless ((trackelement =
GES_TRACK_ELEMENT (trackelements->data)) != NULL);
fail_unless (ges_track_element_get_track (trackelement) == track);
assert_equals_uint64 (_DURATION (trackelement), 10);
g_list_free_full (trackelements, g_object_unref);
/* Add a new layer and add objects to it */
fail_unless ((layer1 = ges_timeline_append_layer (timeline)) != NULL);
@ -552,18 +556,20 @@ GST_START_TEST (test_timeline_edition_mode)
assert_equals_int (ges_timeline_layer_get_priority (layer1), 1);
fail_unless (ges_timeline_layer_add_object (layer1, obj1));
fail_unless ((tckobjs = ges_clip_get_track_objects (obj1)) != NULL);
fail_unless ((tckobj1 = GES_TRACK_OBJECT (tckobjs->data)) != NULL);
fail_unless (ges_track_object_get_track (tckobj1) == track);
assert_equals_uint64 (_DURATION (tckobj1), 10);
g_list_free_full (tckobjs, g_object_unref);
fail_unless ((trackelements = ges_clip_get_track_elements (obj1)) != NULL);
fail_unless ((trackelement1 =
GES_TRACK_ELEMENT (trackelements->data)) != NULL);
fail_unless (ges_track_element_get_track (trackelement1) == track);
assert_equals_uint64 (_DURATION (trackelement1), 10);
g_list_free_full (trackelements, g_object_unref);
fail_unless (ges_timeline_layer_add_object (layer1, obj2));
fail_unless ((tckobjs = ges_clip_get_track_objects (obj2)) != NULL);
fail_unless ((tckobj2 = GES_TRACK_OBJECT (tckobjs->data)) != NULL);
fail_unless (ges_track_object_get_track (tckobj2) == track);
assert_equals_uint64 (_DURATION (tckobj2), 60);
g_list_free_full (tckobjs, g_object_unref);
fail_unless ((trackelements = ges_clip_get_track_elements (obj2)) != NULL);
fail_unless ((trackelement2 =
GES_TRACK_ELEMENT (trackelements->data)) != NULL);
fail_unless (ges_track_element_get_track (trackelement2) == track);
assert_equals_uint64 (_DURATION (trackelement2), 60);
g_list_free_full (trackelements, g_object_unref);
/**
* Simple rippling obj to: 10
@ -581,18 +587,18 @@ GST_START_TEST (test_timeline_edition_mode)
*/
fail_unless (ges_clip_edit (obj, NULL, -1, GES_EDIT_MODE_RIPPLE,
GES_EDGE_NONE, 10) == TRUE);
CHECK_OBJECT_PROPS (tckobj, 10, 0, 10);
CHECK_OBJECT_PROPS (tckobj1, 20, 0, 10);
CHECK_OBJECT_PROPS (tckobj2, 60, 0, 60);
CHECK_OBJECT_PROPS (trackelement, 10, 0, 10);
CHECK_OBJECT_PROPS (trackelement1, 20, 0, 10);
CHECK_OBJECT_PROPS (trackelement2, 60, 0, 60);
/* FIXME find a way to check that we are using the same MovingContext
* inside the GESTimeline */
fail_unless (ges_clip_edit (obj1, NULL, 3, GES_EDIT_MODE_RIPPLE,
GES_EDGE_NONE, 40) == TRUE);
CHECK_OBJECT_PROPS (tckobj, 10, 0, 10);
CHECK_OBJECT_PROPS (tckobj1, 40, 0, 10);
CHECK_OBJECT_PROPS (tckobj2, 80, 0, 60);
CHECK_OBJECT_PROPS (trackelement, 10, 0, 10);
CHECK_OBJECT_PROPS (trackelement1, 40, 0, 10);
CHECK_OBJECT_PROPS (trackelement2, 80, 0, 60);
layer2 = ges_clip_get_layer (obj1);
assert_equals_int (ges_timeline_layer_get_priority (layer2), 3);
/* obj2 should have moved layer too */
@ -606,9 +612,9 @@ GST_START_TEST (test_timeline_edition_mode)
*/
fail_unless (ges_clip_edit (obj1, NULL, 1, GES_EDIT_MODE_RIPPLE,
GES_EDGE_NONE, 20) == TRUE);
CHECK_OBJECT_PROPS (tckobj, 10, 0, 10);
CHECK_OBJECT_PROPS (tckobj1, 20, 0, 10);
CHECK_OBJECT_PROPS (tckobj2, 60, 0, 60);
CHECK_OBJECT_PROPS (trackelement, 10, 0, 10);
CHECK_OBJECT_PROPS (trackelement1, 20, 0, 10);
CHECK_OBJECT_PROPS (trackelement2, 60, 0, 60);
layer2 = ges_clip_get_layer (obj1);
assert_equals_int (ges_timeline_layer_get_priority (layer2), 1);
/* obj2 should have moved layer too */
@ -635,9 +641,9 @@ GST_START_TEST (test_timeline_edition_mode)
GES_EDGE_NONE, 27) == TRUE);
fail_unless (ges_clip_edit (obj2, NULL, -1, GES_EDIT_MODE_NORMAL,
GES_EDGE_NONE, 35) == TRUE);
CHECK_OBJECT_PROPS (tckobj, 27, 0, 10);
CHECK_OBJECT_PROPS (tckobj1, 20, 0, 10);
CHECK_OBJECT_PROPS (tckobj2, 35, 0, 60);
CHECK_OBJECT_PROPS (trackelement, 27, 0, 10);
CHECK_OBJECT_PROPS (trackelement1, 20, 0, 10);
CHECK_OBJECT_PROPS (trackelement2, 35, 0, 60);
/**
* Simple trimming start obj to: 32
@ -655,9 +661,9 @@ GST_START_TEST (test_timeline_edition_mode)
*/
fail_unless (ges_clip_edit (obj, NULL, -1, GES_EDIT_MODE_TRIM,
GES_EDGE_START, 32) == TRUE);
CHECK_OBJECT_PROPS (tckobj, 32, 5, 5);
CHECK_OBJECT_PROPS (tckobj1, 20, 0, 10);
CHECK_OBJECT_PROPS (tckobj2, 35, 0, 60);
CHECK_OBJECT_PROPS (trackelement, 32, 5, 5);
CHECK_OBJECT_PROPS (trackelement1, 20, 0, 10);
CHECK_OBJECT_PROPS (trackelement2, 35, 0, 60);
/* Ripple end obj to 35 and move to layer 2
* New timeline:
@ -673,9 +679,9 @@ GST_START_TEST (test_timeline_edition_mode)
*/
fail_unless (ges_clip_edit (obj, NULL, 2, GES_EDIT_MODE_RIPPLE,
GES_EDGE_END, 35) == TRUE);
CHECK_OBJECT_PROPS (tckobj, 32, 5, 3);
CHECK_OBJECT_PROPS (tckobj1, 20, 0, 10);
CHECK_OBJECT_PROPS (tckobj2, 35, 0, 60);
CHECK_OBJECT_PROPS (trackelement, 32, 5, 3);
CHECK_OBJECT_PROPS (trackelement1, 20, 0, 10);
CHECK_OBJECT_PROPS (trackelement2, 35, 0, 60);
layer = ges_clip_get_layer (obj);
assert_equals_int (ges_timeline_layer_get_priority (layer), 2);
g_object_unref (layer);
@ -694,9 +700,9 @@ GST_START_TEST (test_timeline_edition_mode)
*/
fail_unless (ges_clip_edit (obj, NULL, 2, GES_EDIT_MODE_ROLL,
GES_EDGE_END, 50) == TRUE);
CHECK_OBJECT_PROPS (tckobj, 32, 5, 18);
CHECK_OBJECT_PROPS (tckobj1, 20, 0, 10);
CHECK_OBJECT_PROPS (tckobj2, 50, 15, 45);
CHECK_OBJECT_PROPS (trackelement, 32, 5, 18);
CHECK_OBJECT_PROPS (trackelement1, 20, 0, 10);
CHECK_OBJECT_PROPS (trackelement2, 50, 15, 45);
layer = ges_clip_get_layer (obj);
assert_equals_int (ges_timeline_layer_get_priority (layer), 2);
g_object_unref (layer);
@ -708,9 +714,9 @@ GST_START_TEST (test_timeline_edition_mode)
fail_unless (ges_clip_edit (obj, NULL, -1, GES_EDIT_MODE_ROLL,
GES_EDGE_END, random) == TRUE);
CHECK_OBJECT_PROPS (tckobj, 32, 5, random - 32);
CHECK_OBJECT_PROPS (tckobj1, 20, 0, 10);
CHECK_OBJECT_PROPS (tckobj2, random, tck3_inpoint, 95 - random);
CHECK_OBJECT_PROPS (trackelement, 32, 5, random - 32);
CHECK_OBJECT_PROPS (trackelement1, 20, 0, 10);
CHECK_OBJECT_PROPS (trackelement2, random, tck3_inpoint, 95 - random);
}
/* Roll end obj back to 35
@ -727,9 +733,9 @@ GST_START_TEST (test_timeline_edition_mode)
*/
fail_unless (ges_clip_edit (obj, NULL, 2, GES_EDIT_MODE_ROLL,
GES_EDGE_END, 35) == TRUE);
CHECK_OBJECT_PROPS (tckobj, 32, 5, 3);
CHECK_OBJECT_PROPS (tckobj1, 20, 0, 10);
CHECK_OBJECT_PROPS (tckobj2, 35, 0, 60);
CHECK_OBJECT_PROPS (trackelement, 32, 5, 3);
CHECK_OBJECT_PROPS (trackelement1, 20, 0, 10);
CHECK_OBJECT_PROPS (trackelement2, 35, 0, 60);
layer = ges_clip_get_layer (obj);
assert_equals_int (ges_timeline_layer_get_priority (layer), 2);
g_object_unref (layer);
@ -750,9 +756,9 @@ GST_START_TEST (test_timeline_edition_mode)
/* Can not move to the first layer as obj2 should move to a layer with priority < 0 */
fail_unless (ges_clip_edit (obj, NULL, 0, GES_EDIT_MODE_RIPPLE,
GES_EDGE_END, 52) == TRUE);
CHECK_OBJECT_PROPS (tckobj, 32, 5, 20);
CHECK_OBJECT_PROPS (tckobj1, 20, 0, 10);
CHECK_OBJECT_PROPS (tckobj2, 52, 0, 60)
CHECK_OBJECT_PROPS (trackelement, 32, 5, 20);
CHECK_OBJECT_PROPS (trackelement1, 20, 0, 10);
CHECK_OBJECT_PROPS (trackelement2, 52, 0, 60)
layer = ges_clip_get_layer (obj);
assert_equals_int (ges_timeline_layer_get_priority (layer), 2);
g_object_unref (layer);
@ -771,9 +777,9 @@ GST_START_TEST (test_timeline_edition_mode)
/* We have 3 references:
* track + timeline + obj
*/
ASSERT_OBJECT_REFCOUNT (tckobj, "First tckobj", 3);
ASSERT_OBJECT_REFCOUNT (tckobj1, "Second tckobj", 3);
ASSERT_OBJECT_REFCOUNT (tckobj2, "Third tckobj", 3);
ASSERT_OBJECT_REFCOUNT (trackelement, "First trackelement", 3);
ASSERT_OBJECT_REFCOUNT (trackelement1, "Second trackelement", 3);
ASSERT_OBJECT_REFCOUNT (trackelement2, "Third trackelement", 3);
/* We have 1 ref:
* + layer */
ASSERT_OBJECT_REFCOUNT (obj, "First clip", 1);
@ -795,9 +801,9 @@ GST_START_TEST (test_timeline_edition_mode)
*/
fail_unless (ges_clip_edit (obj1, NULL, 0, GES_EDIT_MODE_RIPPLE,
GES_EDGE_END, 40) == TRUE);
CHECK_OBJECT_PROPS (tckobj, 42, 5, 20);
CHECK_OBJECT_PROPS (tckobj1, 20, 0, 20);
CHECK_OBJECT_PROPS (tckobj2, 62, 0, 60);
CHECK_OBJECT_PROPS (trackelement, 42, 5, 20);
CHECK_OBJECT_PROPS (trackelement1, 20, 0, 20);
CHECK_OBJECT_PROPS (trackelement2, 62, 0, 60);
/* Check that movement between layer has been done properly */
layer1 = ges_clip_get_layer (obj);
@ -825,9 +831,9 @@ GST_START_TEST (test_timeline_edition_mode)
*/
fail_unless (ges_clip_edit (obj, NULL, -1, GES_EDIT_MODE_TRIM,
GES_EDGE_START, 40) == TRUE);
CHECK_OBJECT_PROPS (tckobj, 40, 3, 22);
CHECK_OBJECT_PROPS (tckobj1, 20, 0, 20);
CHECK_OBJECT_PROPS (tckobj2, 62, 0, 60);
CHECK_OBJECT_PROPS (trackelement, 40, 3, 22);
CHECK_OBJECT_PROPS (trackelement1, 20, 0, 20);
CHECK_OBJECT_PROPS (trackelement2, 62, 0, 60);
/* Roll obj end to 25
* New timeline:
@ -844,34 +850,34 @@ GST_START_TEST (test_timeline_edition_mode)
*/
fail_unless (ges_clip_edit (obj1, NULL, -1, GES_EDIT_MODE_ROLL,
GES_EDGE_END, 25) == TRUE);
CHECK_OBJECT_PROPS (tckobj, 25, 0, 37);
CHECK_OBJECT_PROPS (tckobj1, 20, 0, 5);
CHECK_OBJECT_PROPS (tckobj2, 62, 0, 60);
CHECK_OBJECT_PROPS (trackelement, 25, 0, 37);
CHECK_OBJECT_PROPS (trackelement1, 20, 0, 5);
CHECK_OBJECT_PROPS (trackelement2, 62, 0, 60);
/* Make sure that not doing anything when not able to roll */
fail_unless (ges_clip_edit (obj, NULL, -1, GES_EDIT_MODE_ROLL,
GES_EDGE_START, 65) == TRUE);
fail_unless (ges_clip_edit (obj1, NULL, -1, GES_EDIT_MODE_ROLL,
GES_EDGE_END, 65) == TRUE, 0);
CHECK_OBJECT_PROPS (tckobj, 25, 0, 37);
CHECK_OBJECT_PROPS (tckobj1, 20, 0, 5);
CHECK_OBJECT_PROPS (tckobj2, 62, 0, 60);
CHECK_OBJECT_PROPS (trackelement, 25, 0, 37);
CHECK_OBJECT_PROPS (trackelement1, 20, 0, 5);
CHECK_OBJECT_PROPS (trackelement2, 62, 0, 60);
/* Snaping to edge, so no move */
g_object_set (timeline, "snapping-distance", (guint64) 3, NULL);
fail_unless (ges_clip_edit (obj1, NULL, -1, GES_EDIT_MODE_TRIM,
GES_EDGE_END, 27) == TRUE);
CHECK_OBJECT_PROPS (tckobj, 25, 0, 37);
CHECK_OBJECT_PROPS (tckobj1, 20, 0, 5);
CHECK_OBJECT_PROPS (tckobj2, 62, 0, 60);
CHECK_OBJECT_PROPS (trackelement, 25, 0, 37);
CHECK_OBJECT_PROPS (trackelement1, 20, 0, 5);
CHECK_OBJECT_PROPS (trackelement2, 62, 0, 60);
/* Snaping to edge, so no move */
fail_unless (ges_clip_edit (obj1, NULL, -1, GES_EDIT_MODE_TRIM,
GES_EDGE_END, 27) == TRUE);
CHECK_OBJECT_PROPS (tckobj, 25, 0, 37);
CHECK_OBJECT_PROPS (tckobj1, 20, 0, 5);
CHECK_OBJECT_PROPS (tckobj2, 62, 0, 60);
CHECK_OBJECT_PROPS (trackelement, 25, 0, 37);
CHECK_OBJECT_PROPS (trackelement1, 20, 0, 5);
CHECK_OBJECT_PROPS (trackelement2, 62, 0, 60);
/**
* New timeline:
@ -884,9 +890,9 @@ GST_START_TEST (test_timeline_edition_mode)
g_object_set (timeline, "snapping-distance", (guint64) 0, NULL);
fail_unless (ges_clip_edit (obj1, NULL, -1, GES_EDIT_MODE_TRIM,
GES_EDGE_END, 30) == TRUE);
CHECK_OBJECT_PROPS (tckobj, 25, 0, 37);
CHECK_OBJECT_PROPS (tckobj1, 20, 0, 10);
CHECK_OBJECT_PROPS (tckobj2, 62, 0, 60);
CHECK_OBJECT_PROPS (trackelement, 25, 0, 37);
CHECK_OBJECT_PROPS (trackelement1, 20, 0, 10);
CHECK_OBJECT_PROPS (trackelement2, 62, 0, 60);
/**
* New timeline
@ -903,9 +909,9 @@ GST_START_TEST (test_timeline_edition_mode)
GES_EDGE_END, 62) == TRUE);
fail_unless (ges_clip_edit (obj1, NULL, -1, GES_EDIT_MODE_ROLL,
GES_EDGE_END, 72) == TRUE);
CHECK_OBJECT_PROPS (tckobj, 25, 0, 37);
CHECK_OBJECT_PROPS (tckobj1, 20, 0, 52);
CHECK_OBJECT_PROPS (tckobj2, 72, 10, 50);
CHECK_OBJECT_PROPS (trackelement, 25, 0, 37);
CHECK_OBJECT_PROPS (trackelement1, 20, 0, 52);
CHECK_OBJECT_PROPS (trackelement2, 72, 10, 50);
/* Test Snapping */
/**
@ -919,9 +925,9 @@ GST_START_TEST (test_timeline_edition_mode)
g_object_set (timeline, "snapping-distance", (guint64) 4, NULL);
fail_unless (ges_clip_edit (obj1, NULL, -1, GES_EDIT_MODE_TRIM,
GES_EDGE_START, 28) == TRUE);
CHECK_OBJECT_PROPS (tckobj, 25, 0, 37);
CHECK_OBJECT_PROPS (tckobj1, 25, 5, 47);
CHECK_OBJECT_PROPS (tckobj2, 72, 10, 50);
CHECK_OBJECT_PROPS (trackelement, 25, 0, 37);
CHECK_OBJECT_PROPS (trackelement1, 25, 5, 47);
CHECK_OBJECT_PROPS (trackelement2, 72, 10, 50);
/**
* 0----------
@ -933,9 +939,9 @@ GST_START_TEST (test_timeline_edition_mode)
*/
fail_unless (ges_clip_edit (obj2, NULL, -1, GES_EDIT_MODE_ROLL,
GES_EDGE_START, 59) == TRUE);
CHECK_OBJECT_PROPS (tckobj, 25, 0, 37);
CHECK_OBJECT_PROPS (tckobj1, 25, 5, 37);
CHECK_OBJECT_PROPS (tckobj2, 62, 0, 60);
CHECK_OBJECT_PROPS (trackelement, 25, 0, 37);
CHECK_OBJECT_PROPS (trackelement1, 25, 5, 37);
CHECK_OBJECT_PROPS (trackelement2, 62, 0, 60);
}

View file

@ -38,7 +38,7 @@ GST_END_TEST;
GST_START_TEST (test_title_source_properties)
{
GESTrack *track;
GESTrackObject *trackobject;
GESTrackElement *trackelement;
GESClip *object;
ges_init ();
@ -57,18 +57,18 @@ GST_START_TEST (test_title_source_properties)
assert_equals_uint64 (_DURATION (object), 51);
assert_equals_uint64 (_INPOINT (object), 12);
trackobject = ges_clip_create_track_object (object, track->type);
ges_clip_add_track_object (object, trackobject);
fail_unless (trackobject != NULL);
fail_unless (ges_track_object_set_track (trackobject, track));
trackelement = ges_clip_create_track_element (object, track->type);
ges_clip_add_track_element (object, trackelement);
fail_unless (trackelement != NULL);
fail_unless (ges_track_element_set_track (trackelement, track));
/* Check that trackobject has the same properties */
assert_equals_uint64 (_START (trackobject), 42);
assert_equals_uint64 (_DURATION (trackobject), 51);
assert_equals_uint64 (_INPOINT (trackobject), 12);
/* Check that trackelement has the same properties */
assert_equals_uint64 (_START (trackelement), 42);
assert_equals_uint64 (_DURATION (trackelement), 51);
assert_equals_uint64 (_INPOINT (trackelement), 12);
/* And let's also check that it propagated correctly to GNonLin */
gnl_object_check (ges_track_object_get_gnlobject (trackobject), 42, 51, 12,
gnl_object_check (ges_track_element_get_gnlobject (trackelement), 42, 51, 12,
51, 0, TRUE);
/* Change more properties, see if they propagate */
@ -77,15 +77,15 @@ GST_START_TEST (test_title_source_properties)
assert_equals_uint64 (_START (object), 420);
assert_equals_uint64 (_DURATION (object), 510);
assert_equals_uint64 (_INPOINT (object), 120);
assert_equals_uint64 (_START (trackobject), 420);
assert_equals_uint64 (_DURATION (trackobject), 510);
assert_equals_uint64 (_INPOINT (trackobject), 120);
assert_equals_uint64 (_START (trackelement), 420);
assert_equals_uint64 (_DURATION (trackelement), 510);
assert_equals_uint64 (_INPOINT (trackelement), 120);
/* And let's also check that it propagated correctly to GNonLin */
gnl_object_check (ges_track_object_get_gnlobject (trackobject), 420, 510, 120,
510, 0, TRUE);
gnl_object_check (ges_track_element_get_gnlobject (trackelement), 420, 510,
120, 510, 0, TRUE);
ges_clip_release_track_object (object, trackobject);
ges_clip_release_track_element (object, trackelement);
g_object_unref (object);
}
@ -96,7 +96,7 @@ GST_START_TEST (test_title_source_in_layer)
GESTimeline *timeline;
GESTimelineLayer *layer;
GESTrack *a, *v;
GESTrackObject *trobj;
GESTrackElement *trobj;
GESTitleClip *source;
gchar *text;
gint halign, valign;
@ -129,7 +129,7 @@ GST_START_TEST (test_title_source_in_layer)
g_free (text);
trobj =
ges_clip_find_track_object (GES_CLIP (source), v,
ges_clip_find_track_element (GES_CLIP (source), v,
GES_TYPE_TRACK_TITLE_SOURCE);
/* Check the text is still the same */

View file

@ -28,7 +28,7 @@
GST_START_TEST (test_transition_basic)
{
GESTransitionClip *tr1, *tr2;
GESTrackObject *trackobject;
GESTrackElement *trackelement;
GESTrack *track;
ges_init ();
@ -45,15 +45,15 @@ GST_START_TEST (test_transition_basic)
fail_unless (tr2->vtype == 1);
/* Make sure track object is created and vtype is set */
trackobject = ges_clip_create_track_object (GES_CLIP (tr2), track->type);
ges_clip_add_track_object (GES_CLIP (tr2), trackobject);
trackelement = ges_clip_create_track_element (GES_CLIP (tr2), track->type);
ges_clip_add_track_element (GES_CLIP (tr2), trackelement);
fail_unless (trackobject != NULL);
fail_unless (trackelement != NULL);
fail_unless (ges_track_video_transition_get_transition_type
(GES_TRACK_VIDEO_TRANSITION (trackobject)) == 1);
(GES_TRACK_VIDEO_TRANSITION (trackelement)) == 1);
fail_unless (ges_clip_release_track_object (GES_CLIP
(tr2), trackobject) == TRUE);
fail_unless (ges_clip_release_track_element (GES_CLIP
(tr2), trackelement) == TRUE);
g_object_unref (track);
g_object_unref (tr1);
@ -65,7 +65,7 @@ GST_END_TEST;
GST_START_TEST (test_transition_properties)
{
GESTrack *track;
GESTrackObject *trackobject;
GESTrackElement *trackelement;
GESClip *object;
ges_init ();
@ -85,18 +85,18 @@ GST_START_TEST (test_transition_properties)
assert_equals_uint64 (_DURATION (object), 51);
assert_equals_uint64 (_INPOINT (object), 12);
trackobject = ges_clip_create_track_object (object, track->type);
ges_clip_add_track_object (object, trackobject);
fail_unless (trackobject != NULL);
fail_unless (ges_track_object_set_track (trackobject, track));
trackelement = ges_clip_create_track_element (object, track->type);
ges_clip_add_track_element (object, trackelement);
fail_unless (trackelement != NULL);
fail_unless (ges_track_element_set_track (trackelement, track));
/* Check that trackobject has the same properties */
assert_equals_uint64 (_START (trackobject), 42);
assert_equals_uint64 (_DURATION (trackobject), 51);
assert_equals_uint64 (_INPOINT (trackobject), 12);
/* Check that trackelement has the same properties */
assert_equals_uint64 (_START (trackelement), 42);
assert_equals_uint64 (_DURATION (trackelement), 51);
assert_equals_uint64 (_INPOINT (trackelement), 12);
/* And let's also check that it propagated correctly to GNonLin */
gnl_object_check (ges_track_object_get_gnlobject (trackobject), 42, 51, 12,
gnl_object_check (ges_track_element_get_gnlobject (trackelement), 42, 51, 12,
51, 0, TRUE);
/* Change more properties, see if they propagate */
@ -105,13 +105,13 @@ GST_START_TEST (test_transition_properties)
assert_equals_uint64 (_START (object), 420);
assert_equals_uint64 (_DURATION (object), 510);
assert_equals_uint64 (_INPOINT (object), 120);
assert_equals_uint64 (_START (trackobject), 420);
assert_equals_uint64 (_DURATION (trackobject), 510);
assert_equals_uint64 (_INPOINT (trackobject), 120);
assert_equals_uint64 (_START (trackelement), 420);
assert_equals_uint64 (_DURATION (trackelement), 510);
assert_equals_uint64 (_INPOINT (trackelement), 120);
/* And let's also check that it propagated correctly to GNonLin */
gnl_object_check (ges_track_object_get_gnlobject (trackobject), 420, 510, 120,
510, 0, TRUE);
gnl_object_check (ges_track_element_get_gnlobject (trackelement), 420, 510,
120, 510, 0, TRUE);
/* test changing vtype */
GST_DEBUG ("Setting to crossfade");
@ -120,7 +120,7 @@ GST_START_TEST (test_transition_properties)
assert_equals_int (GES_TRANSITION_CLIP (object)->vtype,
GES_VIDEO_STANDARD_TRANSITION_TYPE_CROSSFADE);
assert_equals_int (ges_track_video_transition_get_transition_type
(GES_TRACK_VIDEO_TRANSITION (trackobject)),
(GES_TRACK_VIDEO_TRANSITION (trackelement)),
GES_VIDEO_STANDARD_TRANSITION_TYPE_CROSSFADE);
/* Check that changing from crossfade to anything else fails (it should
@ -130,27 +130,27 @@ GST_START_TEST (test_transition_properties)
assert_equals_int (GES_TRANSITION_CLIP (object)->vtype, 1);
assert_equals_int (ges_track_video_transition_get_transition_type
(GES_TRACK_VIDEO_TRANSITION (trackobject)), 1);
(GES_TRACK_VIDEO_TRANSITION (trackelement)), 1);
GST_DEBUG ("Releasing track object");
ges_clip_release_track_object (object, trackobject);
ges_clip_release_track_element (object, trackelement);
g_object_set (object, "vtype", 1, NULL);
GST_DEBUG ("creating track object");
trackobject = ges_clip_create_track_object (object, track->type);
ges_clip_add_track_object (object, trackobject);
fail_unless (trackobject != NULL);
fail_unless (ges_track_object_set_track (trackobject, track));
trackelement = ges_clip_create_track_element (object, track->type);
ges_clip_add_track_element (object, trackelement);
fail_unless (trackelement != NULL);
fail_unless (ges_track_element_set_track (trackelement, track));
/* The new track object should have taken the previously set transition
* type (in this case 1) */
GST_DEBUG ("Setting to vtype:1");
assert_equals_int (ges_track_video_transition_get_transition_type
(GES_TRACK_VIDEO_TRANSITION (trackobject)), 1);
(GES_TRACK_VIDEO_TRANSITION (trackelement)), 1);
assert_equals_int (GES_TRANSITION_CLIP (object)->vtype, 1);
ges_clip_release_track_object (object, trackobject);
ges_clip_release_track_element (object, trackelement);
g_object_unref (object);
g_object_unref (track);
}

View file

@ -57,11 +57,11 @@ asset_created_cb (GObject * source, GAsyncResult * res, gpointer udata)
tracks = ges_timeline_get_tracks (ges_timeline_layer_get_timeline (layer));
for (tmp = tracks; tmp; tmp = tmp->next) {
GList *tckobjs = ges_track_get_objects (GES_TRACK (tmp->data));
GList *trackelements = ges_track_get_objects (GES_TRACK (tmp->data));
assert_equals_int (g_list_length (tckobjs), 1);
fail_unless (GES_IS_TRACK_FILESOURCE (tckobjs->data));
g_list_free_full (tckobjs, gst_object_unref);
assert_equals_int (g_list_length (trackelements), 1);
fail_unless (GES_IS_TRACK_FILESOURCE (trackelements->data));
g_list_free_full (trackelements, gst_object_unref);
}
g_list_free_full (tracks, gst_object_unref);
@ -113,7 +113,7 @@ GST_END_TEST;
GST_START_TEST (test_filesource_properties)
{
GESTrack *track;
GESTrackObject *trackobject;
GESTrackElement *trackelement;
GESClip *object;
ges_init ();
@ -134,18 +134,18 @@ GST_START_TEST (test_filesource_properties)
assert_equals_uint64 (_DURATION (object), 51);
assert_equals_uint64 (_INPOINT (object), 12);
trackobject = ges_clip_create_track_object (object, track->type);
ges_clip_add_track_object (object, trackobject);
fail_unless (trackobject != NULL);
fail_unless (ges_track_object_set_track (trackobject, track));
trackelement = ges_clip_create_track_element (object, track->type);
ges_clip_add_track_element (object, trackelement);
fail_unless (trackelement != NULL);
fail_unless (ges_track_element_set_track (trackelement, track));
/* Check that trackobject has the same properties */
assert_equals_uint64 (_START (trackobject), 42);
assert_equals_uint64 (_DURATION (trackobject), 51);
assert_equals_uint64 (_INPOINT (trackobject), 12);
/* Check that trackelement has the same properties */
assert_equals_uint64 (_START (trackelement), 42);
assert_equals_uint64 (_DURATION (trackelement), 51);
assert_equals_uint64 (_INPOINT (trackelement), 12);
/* And let's also check that it propagated correctly to GNonLin */
gnl_object_check (ges_track_object_get_gnlobject (trackobject), 42, 51, 12,
gnl_object_check (ges_track_element_get_gnlobject (trackelement), 42, 51, 12,
51, 0, TRUE);
/* Change more properties, see if they propagate */
@ -154,23 +154,23 @@ GST_START_TEST (test_filesource_properties)
assert_equals_uint64 (_START (object), 420);
assert_equals_uint64 (_DURATION (object), 510);
assert_equals_uint64 (_INPOINT (object), 120);
assert_equals_uint64 (_START (trackobject), 420);
assert_equals_uint64 (_DURATION (trackobject), 510);
assert_equals_uint64 (_INPOINT (trackobject), 120);
assert_equals_uint64 (_START (trackelement), 420);
assert_equals_uint64 (_DURATION (trackelement), 510);
assert_equals_uint64 (_INPOINT (trackelement), 120);
/* And let's also check that it propagated correctly to GNonLin */
gnl_object_check (ges_track_object_get_gnlobject (trackobject), 420, 510, 120,
510, 0, TRUE);
gnl_object_check (ges_track_element_get_gnlobject (trackelement), 420, 510,
120, 510, 0, TRUE);
/* Test mute support */
g_object_set (object, "mute", TRUE, NULL);
gnl_object_check (ges_track_object_get_gnlobject (trackobject), 420, 510, 120,
510, 0, FALSE);
gnl_object_check (ges_track_element_get_gnlobject (trackelement), 420, 510,
120, 510, 0, FALSE);
g_object_set (object, "mute", FALSE, NULL);
gnl_object_check (ges_track_object_get_gnlobject (trackobject), 420, 510, 120,
510, 0, TRUE);
gnl_object_check (ges_track_element_get_gnlobject (trackelement), 420, 510,
120, 510, 0, TRUE);
ges_clip_release_track_object (object, trackobject);
ges_clip_release_track_element (object, trackelement);
g_object_unref (object);
g_object_unref (track);
@ -180,7 +180,7 @@ GST_END_TEST;
GST_START_TEST (test_filesource_images)
{
GESTrackObject *trobj;
GESTrackElement *trobj;
GESClip *clip;
GESUriClip *uriclip;
GESTrack *a, *v;
@ -199,8 +199,8 @@ GST_START_TEST (test_filesource_images)
g_object_set (G_OBJECT (uriclip), "is-image", TRUE, NULL);
/* the returned track object should be an image source */
trobj = ges_clip_create_track_object (clip, v->type);
ges_clip_add_track_object (clip, trobj);
trobj = ges_clip_create_track_element (clip, v->type);
ges_clip_add_track_element (clip, trobj);
fail_unless (GES_IS_TRACK_IMAGE_SOURCE (trobj));
/* The track holds a reference to the object
@ -208,10 +208,10 @@ GST_START_TEST (test_filesource_images)
ASSERT_OBJECT_REFCOUNT (trobj, "Video Track Object", 2);
ges_track_remove_object (v, trobj);
ges_clip_release_track_object (clip, trobj);
ges_clip_release_track_element (clip, trobj);
/* the timeline object should not create any TrackObject in the audio track */
trobj = ges_clip_create_track_object (clip, a->type);
/* the timeline object should not create any TrackElement in the audio track */
trobj = ges_clip_create_track_element (clip, a->type);
fail_unless (trobj == NULL);
g_object_unref (a);

View file

@ -1071,15 +1071,15 @@ app_add_effect_on_selected_clips (App * app, const gchar * bin_desc,
GESTrackType type)
{
GList *objects, *tmp;
GESTrackObject *effect = NULL;
GESTrackElement *effect = NULL;
/* No crash if the video is playing */
gst_element_set_state (GST_ELEMENT (app->pipeline), GST_STATE_PAUSED);
objects = ges_timeline_layer_get_objects (app->layer);
for (tmp = objects; tmp; tmp = tmp->next) {
effect = GES_TRACK_OBJECT (ges_track_parse_launch_effect_new (bin_desc));
ges_clip_add_track_object (GES_CLIP (tmp->data), effect);
effect = GES_TRACK_ELEMENT (ges_track_parse_launch_effect_new (bin_desc));
ges_clip_add_track_element (GES_CLIP (tmp->data), effect);
if (type == GES_TRACK_TYPE_VIDEO)
ges_track_add_object (app->video_track, effect);

View file

@ -57,21 +57,21 @@ make_source (gchar * path, guint64 start, guint64 duration, guint64 inpoint,
gboolean
print_transition_data (GESClip * tr)
{
GESTrackObject *trackobj;
GESTrackElement *trackelement;
GstElement *gnlobj;
guint64 start, duration;
gint priority;
char *name;
GList *trackobjects, *tmp;
GList *trackelements, *tmp;
if (!tr)
return FALSE;
if (!(trackobjects = ges_clip_get_track_objects (tr)))
if (!(trackelements = ges_clip_get_track_elements (tr)))
return FALSE;
if (!(trackobj = GES_TRACK_OBJECT (trackobjects->data)))
if (!(trackelement = GES_TRACK_ELEMENT (trackelements->data)))
return FALSE;
if (!(gnlobj = ges_track_object_get_gnlobject (trackobj)))
if (!(gnlobj = ges_track_element_get_gnlobject (trackelement)))
return FALSE;
g_object_get (gnlobj, "start", &start, "duration", &duration,
@ -80,11 +80,11 @@ print_transition_data (GESClip * tr)
((gfloat) start) / GST_SECOND,
((gfloat) duration) / GST_SECOND, priority);
for (tmp = trackobjects; tmp; tmp = tmp->next) {
g_object_unref (GES_TRACK_OBJECT (tmp->data));
for (tmp = trackelements; tmp; tmp = tmp->next) {
g_object_unref (GES_TRACK_ELEMENT (tmp->data));
}
g_list_free (trackobjects);
g_list_free (trackelements);
return FALSE;
}