mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-19 05:45:58 +00:00
GESTimelineObject: add private structure
This commit is contained in:
parent
7fc3be7d44
commit
dfeb7afe85
18 changed files with 432 additions and 139 deletions
|
@ -271,6 +271,7 @@ GES_TIMELINE_OBJECT_HEIGHT
|
|||
ges_timeline_object_set_inpoint
|
||||
ges_timeline_object_set_start
|
||||
ges_timeline_object_set_duration
|
||||
ges_timeline_object_get_layer
|
||||
ges_timeline_object_find_track_object
|
||||
CreateTrackObjectsFunc
|
||||
ges_timeline_object_add_track_object
|
||||
|
@ -279,6 +280,7 @@ ges_timeline_object_create_track_objects
|
|||
ges_timeline_object_create_track_object
|
||||
ges_timeline_object_fill_track_object
|
||||
ges_timeline_object_release_track_object
|
||||
ges_timeline_object_get_track_objects
|
||||
ges_timeline_object_set_layer
|
||||
ges_timeline_object_set_priority
|
||||
GES_IS_TIMELINE_OBJECT
|
||||
|
|
|
@ -383,13 +383,19 @@ ges_simple_timeline_layer_move_object (GESSimpleTimelineLayer * layer,
|
|||
{
|
||||
gint idx;
|
||||
GESSimpleTimelineLayerPrivate *priv = layer->priv;
|
||||
GESTimelineLayer *tl_obj_layer;
|
||||
|
||||
GST_DEBUG ("layer:%p, object:%p, newposition:%d", layer, object, newposition);
|
||||
|
||||
if (G_UNLIKELY (object->layer != (GESTimelineLayer *) layer)) {
|
||||
tl_obj_layer = ges_timeline_object_get_layer (object);
|
||||
if (G_UNLIKELY (tl_obj_layer != (GESTimelineLayer *) layer)) {
|
||||
GST_WARNING ("TimelineObject doesn't belong to this layer");
|
||||
if (tl_obj_layer != NULL)
|
||||
g_object_unref (tl_obj_layer);
|
||||
return FALSE;
|
||||
}
|
||||
if (tl_obj_layer != NULL)
|
||||
g_object_unref (tl_obj_layer);
|
||||
|
||||
/* Find it's current position */
|
||||
idx = g_list_index (priv->objects, object);
|
||||
|
|
|
@ -204,7 +204,7 @@ ges_tl_filesource_init (GESTimelineFileSource * self)
|
|||
static void
|
||||
ges_tl_filesource_set_mute (GESTimelineFileSource * self, gboolean mute)
|
||||
{
|
||||
GList *tmp;
|
||||
GList *tmp, *trackobjects;
|
||||
GESTimelineObject *object = (GESTimelineObject *) self;
|
||||
|
||||
GST_DEBUG ("self:%p, mute:%d", self, mute);
|
||||
|
@ -212,12 +212,16 @@ ges_tl_filesource_set_mute (GESTimelineFileSource * self, gboolean mute)
|
|||
self->mute = mute;
|
||||
|
||||
/* Go over tracked objects, and update 'active' status on all audio objects */
|
||||
for (tmp = object->trackobjects; tmp; tmp = tmp->next) {
|
||||
trackobjects = ges_timeline_object_get_track_objects (object);
|
||||
for (tmp = trackobjects; tmp; tmp = tmp->next) {
|
||||
GESTrackObject *trackobject = (GESTrackObject *) tmp->data;
|
||||
|
||||
if (trackobject->track->type == GES_TRACK_TYPE_AUDIO)
|
||||
ges_track_object_set_active (trackobject, !mute);
|
||||
|
||||
g_object_unref (GES_TRACK_OBJECT (tmp->data));
|
||||
}
|
||||
g_list_free (trackobjects);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -228,10 +228,14 @@ gboolean
|
|||
ges_timeline_layer_add_object (GESTimelineLayer * layer,
|
||||
GESTimelineObject * object)
|
||||
{
|
||||
GESTimelineLayer *tl_obj_layer;
|
||||
|
||||
GST_DEBUG ("layer:%p, object:%p", layer, object);
|
||||
|
||||
if (G_UNLIKELY (object->layer)) {
|
||||
tl_obj_layer = ges_timeline_object_get_layer (object);
|
||||
if (G_UNLIKELY (tl_obj_layer)) {
|
||||
GST_WARNING ("TimelineObject %p already belongs to another layer");
|
||||
g_object_unref (tl_obj_layer);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -278,12 +282,17 @@ gboolean
|
|||
ges_timeline_layer_remove_object (GESTimelineLayer * layer,
|
||||
GESTimelineObject * object)
|
||||
{
|
||||
GESTimelineLayer *tl_obj_layer;
|
||||
GST_DEBUG ("layer:%p, object:%p", layer, object);
|
||||
|
||||
if (G_UNLIKELY (object->layer != layer)) {
|
||||
tl_obj_layer = ges_timeline_object_get_layer (object);
|
||||
if (G_UNLIKELY (tl_obj_layer != layer)) {
|
||||
GST_WARNING ("TimelineObject doesn't belong to this layer");
|
||||
if (tl_obj_layer != NULL)
|
||||
g_object_unref (tl_obj_layer);
|
||||
return FALSE;
|
||||
}
|
||||
g_object_unref (tl_obj_layer);
|
||||
|
||||
/* emit 'object-removed' */
|
||||
g_signal_emit (layer, ges_timeline_layer_signals[OBJECT_REMOVED], 0, object);
|
||||
|
|
|
@ -45,6 +45,17 @@ track_object_priority_offset_changed_cb (GESTrackObject * child,
|
|||
|
||||
G_DEFINE_TYPE (GESTimelineObject, ges_timeline_object, G_TYPE_OBJECT);
|
||||
|
||||
struct _GESTimelineObjectPrivate
|
||||
{
|
||||
/*< public > */
|
||||
GESTimelineLayer *layer;
|
||||
|
||||
/*< private > */
|
||||
/* A list of TrackObject controlled by this TimelineObject */
|
||||
GList *trackobjects;
|
||||
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
PROP_0,
|
||||
|
@ -53,6 +64,7 @@ enum
|
|||
PROP_DURATION,
|
||||
PROP_PRIORITY,
|
||||
PROP_HEIGHT,
|
||||
PROP_LAYER,
|
||||
};
|
||||
|
||||
static void
|
||||
|
@ -77,6 +89,9 @@ ges_timeline_object_get_property (GObject * object, guint property_id,
|
|||
case PROP_HEIGHT:
|
||||
g_value_set_uint (value, tobj->height);
|
||||
break;
|
||||
case PROP_LAYER:
|
||||
g_value_set_object (value, tobj->priv->layer);
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
||||
}
|
||||
|
@ -123,6 +138,8 @@ ges_timeline_object_class_init (GESTimelineObjectClass * klass)
|
|||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
g_type_class_add_private (klass, sizeof (GESTimelineObjectPrivate));
|
||||
|
||||
object_class->get_property = ges_timeline_object_get_property;
|
||||
object_class->set_property = ges_timeline_object_set_property;
|
||||
object_class->dispose = ges_timeline_object_dispose;
|
||||
|
@ -164,7 +181,7 @@ ges_timeline_object_class_init (GESTimelineObjectClass * klass)
|
|||
|
||||
/**
|
||||
* GESTimelineObject:priority
|
||||
*
|
||||
*
|
||||
* The layer priority of the timeline object.
|
||||
*/
|
||||
|
||||
|
@ -183,14 +200,28 @@ ges_timeline_object_class_init (GESTimelineObjectClass * klass)
|
|||
"The span of priorities this object occupies", 0, G_MAXUINT, 1,
|
||||
G_PARAM_READABLE));
|
||||
|
||||
/* GESSimpleTimelineLayer:layer
|
||||
*
|
||||
* The GESTimelineLayer where this object is being used.
|
||||
*/
|
||||
|
||||
g_object_class_install_property (object_class, PROP_LAYER,
|
||||
g_param_spec_object ("layer", "Layer",
|
||||
"The GESTimelineLayer where this object is being used.",
|
||||
GES_TYPE_TIMELINE_LAYER, G_PARAM_READABLE));
|
||||
|
||||
klass->need_fill_track = TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
ges_timeline_object_init (GESTimelineObject * self)
|
||||
{
|
||||
self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
|
||||
GES_TYPE_TIMELINE_OBJECT, GESTimelineObjectPrivate);
|
||||
self->duration = GST_SECOND;
|
||||
self->height = 1;
|
||||
self->priv->trackobjects = NULL;
|
||||
self->priv->layer = NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -274,7 +305,7 @@ ges_timeline_object_create_track_objects_func (GESTimelineObject * object,
|
|||
* ges_timeline_object_add_track_object:
|
||||
* @object: a #GESTimelineObject
|
||||
* @trobj: the GESTrackObject
|
||||
*
|
||||
*
|
||||
* Add a track object to the timeline object. Should only be called by
|
||||
* subclasses implementing the create_track_objects (plural) vmethod.
|
||||
*
|
||||
|
@ -295,7 +326,8 @@ ges_timeline_object_add_track_object (GESTimelineObject * object, GESTrackObject
|
|||
|
||||
GST_DEBUG ("Adding TrackObject to the list of controlled track objects");
|
||||
/* We steal the initial reference */
|
||||
object->trackobjects = g_list_append (object->trackobjects, trobj);
|
||||
object->priv->trackobjects =
|
||||
g_list_append (object->priv->trackobjects, trobj);
|
||||
|
||||
GST_DEBUG ("Setting properties on newly created TrackObject");
|
||||
|
||||
|
@ -323,14 +355,15 @@ ges_timeline_object_release_track_object (GESTimelineObject * object,
|
|||
{
|
||||
GST_DEBUG ("object:%p, trackobject:%p", object, trobj);
|
||||
|
||||
if (!(g_list_find (object->trackobjects, trobj))) {
|
||||
if (!(g_list_find (object->priv->trackobjects, trobj))) {
|
||||
GST_WARNING ("TrackObject isn't controlled by this object");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* FIXME : Do we need to tell the subclasses ? If so, add a new virtual-method */
|
||||
|
||||
object->trackobjects = g_list_remove (object->trackobjects, trobj);
|
||||
object->priv->trackobjects =
|
||||
g_list_remove (object->priv->trackobjects, trobj);
|
||||
|
||||
ges_track_object_set_timeline_object (trobj, NULL);
|
||||
|
||||
|
@ -345,7 +378,7 @@ ges_timeline_object_set_layer (GESTimelineObject * object,
|
|||
{
|
||||
GST_DEBUG ("object:%p, layer:%p", object, layer);
|
||||
|
||||
object->layer = layer;
|
||||
object->priv->layer = layer;
|
||||
}
|
||||
|
||||
gboolean
|
||||
|
@ -389,10 +422,10 @@ ges_timeline_object_set_start (GESTimelineObject * object, guint64 start)
|
|||
GST_DEBUG ("object:%p, start:%" GST_TIME_FORMAT,
|
||||
object, GST_TIME_ARGS (start));
|
||||
|
||||
if (G_LIKELY (object->trackobjects)) {
|
||||
if (G_LIKELY (object->priv->trackobjects)) {
|
||||
GList *tmp;
|
||||
|
||||
for (tmp = object->trackobjects; tmp; tmp = g_list_next (tmp))
|
||||
for (tmp = object->priv->trackobjects; tmp; tmp = g_list_next (tmp))
|
||||
/* call set_start_internal on each trackobject */
|
||||
ges_track_object_set_start_internal (GES_TRACK_OBJECT (tmp->data), start);
|
||||
|
||||
|
@ -408,10 +441,10 @@ ges_timeline_object_set_inpoint (GESTimelineObject * object, guint64 inpoint)
|
|||
GST_DEBUG ("object:%p, inpoint:%" GST_TIME_FORMAT,
|
||||
object, GST_TIME_ARGS (inpoint));
|
||||
|
||||
if (G_LIKELY (object->trackobjects)) {
|
||||
if (G_LIKELY (object->priv->trackobjects)) {
|
||||
GList *tmp;
|
||||
|
||||
for (tmp = object->trackobjects; tmp; tmp = g_list_next (tmp))
|
||||
for (tmp = object->priv->trackobjects; tmp; tmp = g_list_next (tmp))
|
||||
/* call set_inpoint_internal on each trackobject */
|
||||
ges_track_object_set_inpoint_internal (GES_TRACK_OBJECT (tmp->data),
|
||||
inpoint);
|
||||
|
@ -429,10 +462,10 @@ ges_timeline_object_set_duration (GESTimelineObject * object, guint64 duration)
|
|||
GST_DEBUG ("object:%p, duration:%" GST_TIME_FORMAT,
|
||||
object, GST_TIME_ARGS (duration));
|
||||
|
||||
if (G_LIKELY (object->trackobjects)) {
|
||||
if (G_LIKELY (object->priv->trackobjects)) {
|
||||
GList *tmp;
|
||||
|
||||
for (tmp = object->trackobjects; tmp; tmp = g_list_next (tmp))
|
||||
for (tmp = object->priv->trackobjects; tmp; tmp = g_list_next (tmp))
|
||||
/* call set_duration_internal on each trackobject */
|
||||
ges_track_object_set_duration_internal (GES_TRACK_OBJECT (tmp->data),
|
||||
duration);
|
||||
|
@ -449,10 +482,10 @@ ges_timeline_object_set_priority (GESTimelineObject * object, guint priority)
|
|||
{
|
||||
GST_DEBUG ("object:%p, priority:%d", object, priority);
|
||||
|
||||
if (G_LIKELY (object->trackobjects)) {
|
||||
if (G_LIKELY (object->priv->trackobjects)) {
|
||||
GList *tmp;
|
||||
|
||||
for (tmp = object->trackobjects; tmp; tmp = g_list_next (tmp))
|
||||
for (tmp = object->priv->trackobjects; tmp; tmp = g_list_next (tmp))
|
||||
/* call set_priority_internal on each trackobject */
|
||||
ges_track_object_set_priority_internal (GES_TRACK_OBJECT (tmp->data),
|
||||
priority);
|
||||
|
@ -485,10 +518,10 @@ ges_timeline_object_find_track_object (GESTimelineObject * object,
|
|||
{
|
||||
GESTrackObject *ret = NULL;
|
||||
|
||||
if (G_LIKELY (object->trackobjects)) {
|
||||
if (G_LIKELY (object->priv->trackobjects)) {
|
||||
GList *tmp;
|
||||
|
||||
for (tmp = object->trackobjects; tmp; tmp = g_list_next (tmp))
|
||||
for (tmp = object->priv->trackobjects; tmp; tmp = g_list_next (tmp))
|
||||
if (GES_TRACK_OBJECT (tmp->data)->track == track) {
|
||||
if ((type != G_TYPE_NONE) && !G_TYPE_CHECK_INSTANCE_TYPE (tmp->data,
|
||||
type))
|
||||
|
@ -503,6 +536,52 @@ ges_timeline_object_find_track_object (GESTimelineObject * object,
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* ges_timeline_object_get_layer:
|
||||
* @object: a #GESTimelineObject
|
||||
*
|
||||
* Note: The reference count of the returned #GESTimelineLayer will be increased,
|
||||
* The user is responsible for unreffing it.
|
||||
*
|
||||
* Returns: The #GESTimelineLayer where this @object is being used, #NULL if
|
||||
* it is not used on any layer.
|
||||
*/
|
||||
GESTimelineLayer *
|
||||
ges_timeline_object_get_layer (GESTimelineObject * object)
|
||||
{
|
||||
g_return_val_if_fail (GES_IS_TIMELINE_OBJECT (object), NULL);
|
||||
|
||||
if (object->priv->layer != NULL)
|
||||
g_object_ref (G_OBJECT (object->priv->layer));
|
||||
|
||||
return object->priv->layer;
|
||||
}
|
||||
|
||||
/**
|
||||
* ges_timeline_object_get_track_objects:
|
||||
* @obj: a #GESTimelineObject
|
||||
*
|
||||
* Returns: The list of trackobject contained in @object.
|
||||
* The user is responsible for unreffing the contained objects
|
||||
* and freeing the list.
|
||||
*/
|
||||
GList *
|
||||
ges_timeline_object_get_track_objects (GESTimelineObject * object)
|
||||
{
|
||||
GList *ret;
|
||||
GList *tmp;
|
||||
|
||||
g_return_val_if_fail (GES_IS_TIMELINE_OBJECT (object), NULL);
|
||||
|
||||
ret = g_list_copy (object->priv->trackobjects);
|
||||
|
||||
for (tmp = ret; tmp; tmp = tmp->next) {
|
||||
g_object_ref (tmp->data);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void
|
||||
track_object_priority_offset_changed_cb (GESTrackObject * child,
|
||||
GParamSpec * arg G_GNUC_UNUSED, GESTimelineObject * obj)
|
||||
|
|
|
@ -44,6 +44,8 @@ G_BEGIN_DECLS
|
|||
#define GES_TIMELINE_OBJECT_GET_CLASS(obj) \
|
||||
(G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_TIMELINE_OBJECT, GESTimelineObjectClass))
|
||||
|
||||
typedef struct _GESTimelineObjectPrivate GESTimelineObjectPrivate;
|
||||
|
||||
/**
|
||||
* FillTrackObjectFunc:
|
||||
* @object: the #GESTimelineObject controlling the track object
|
||||
|
@ -59,8 +61,8 @@ G_BEGIN_DECLS
|
|||
* Returns: TRUE if the implementer succesfully filled the @gnlobj, else #FALSE.
|
||||
*/
|
||||
typedef gboolean (*FillTrackObjectFunc) (GESTimelineObject * object,
|
||||
GESTrackObject * trobject,
|
||||
GstElement * gnlobj);
|
||||
GESTrackObject * trobject,
|
||||
GstElement * gnlobj);
|
||||
|
||||
/**
|
||||
* CreateTrackObjectFunc:
|
||||
|
@ -68,7 +70,7 @@ typedef gboolean (*FillTrackObjectFunc) (GESTimelineObject * object,
|
|||
* @track: a #GESTrack
|
||||
*
|
||||
* Creates the 'primary track object for this @object.
|
||||
*
|
||||
*
|
||||
* Implementors should override this function if they only interested in
|
||||
* creating a single custom track object per track.
|
||||
*
|
||||
|
@ -81,13 +83,13 @@ typedef gboolean (*FillTrackObjectFunc) (GESTimelineObject * object,
|
|||
* Returns: the #GESTrackObject to be used, or %NULL.
|
||||
*/
|
||||
typedef GESTrackObject* (*CreateTrackObjectFunc) (GESTimelineObject * object,
|
||||
GESTrack * track);
|
||||
GESTrack * track);
|
||||
|
||||
/**
|
||||
* CreateTrackObjectsFunc:
|
||||
* @object: a #GESTimelineObject
|
||||
* @track: a #GESTrack
|
||||
*
|
||||
*
|
||||
* Create all track objects this object handles for this type of track.
|
||||
*
|
||||
* Returns: %TRUE on success %FALSE on failure.
|
||||
|
@ -144,17 +146,17 @@ typedef gboolean (*CreateTrackObjectsFunc) (GESTimelineObject * object,
|
|||
struct _GESTimelineObject {
|
||||
GObject parent;
|
||||
|
||||
/*< public >*/
|
||||
GESTimelineLayer * layer;
|
||||
|
||||
/*< private >*/
|
||||
GList *trackobjects; /* A list of TrackObject controlled by this TimelineObject */
|
||||
|
||||
/* start, inpoint, duration and fullduration are in nanoseconds */
|
||||
guint64 start; /* position (in time) of the object in the layer */
|
||||
guint64 inpoint; /* in-point */
|
||||
guint64 duration; /* duration of the object used in the layer */
|
||||
guint32 priority; /* priority of the object in the layer (0:top priority) */
|
||||
GESTimelineObjectPrivate *priv;
|
||||
|
||||
/* We don't add those properties to the priv struct for optimization purposes
|
||||
* start, inpoint, duration and fullduration are in nanoseconds */
|
||||
guint64 start; /* position (in time) of the object in the layer */
|
||||
guint64 inpoint; /* in-point */
|
||||
guint64 duration; /* duration of the object used in the layer */
|
||||
guint32 priority; /* priority of the object in the layer (0:top priority) */
|
||||
guint32 height; /* the span of priorities this object needs */
|
||||
|
||||
guint64 fullduration; /* Full usable duration of the object (-1: no duration) */
|
||||
|
@ -182,7 +184,7 @@ struct _GESTimelineObjectClass {
|
|||
CreateTrackObjectsFunc create_track_objects;
|
||||
|
||||
/* FIXME : might need a release_track_object */
|
||||
FillTrackObjectFunc fill_track_object;
|
||||
FillTrackObjectFunc fill_track_object;
|
||||
gboolean need_fill_track;
|
||||
|
||||
/*< private >*/
|
||||
|
@ -198,28 +200,33 @@ void ges_timeline_object_set_duration (GESTimelineObject * object, guint64 durat
|
|||
void ges_timeline_object_set_priority (GESTimelineObject * object, guint priority);
|
||||
|
||||
void ges_timeline_object_set_layer (GESTimelineObject * object,
|
||||
GESTimelineLayer * layer);
|
||||
GESTimelineLayer * layer);
|
||||
|
||||
GESTrackObject *
|
||||
ges_timeline_object_create_track_object (GESTimelineObject * object,
|
||||
GESTrack * track);
|
||||
GESTrack * track);
|
||||
|
||||
gboolean ges_timeline_object_create_track_objects (GESTimelineObject *
|
||||
object, GESTrack * track);
|
||||
|
||||
gboolean
|
||||
ges_timeline_object_release_track_object (GESTimelineObject * object,
|
||||
GESTrackObject * trackobject);
|
||||
GESTrackObject * trackobject);
|
||||
|
||||
gboolean
|
||||
ges_timeline_object_fill_track_object (GESTimelineObject * object,
|
||||
GESTrackObject * trackobj,
|
||||
GstElement * gnlobj);
|
||||
GESTrackObject * trackobj,
|
||||
GstElement * gnlobj);
|
||||
|
||||
GESTrackObject *
|
||||
ges_timeline_object_find_track_object (GESTimelineObject * object,
|
||||
GESTrack * track,
|
||||
GType type);
|
||||
GESTrack * track, GType type);
|
||||
|
||||
GList *
|
||||
ges_timeline_object_get_track_objects (GESTimelineObject *object);
|
||||
|
||||
GESTimelineLayer *
|
||||
ges_timeline_object_get_layer (GESTimelineObject *object);
|
||||
|
||||
gboolean
|
||||
ges_timeline_object_add_track_object (GESTimelineObject *object, GESTrackObject
|
||||
|
|
|
@ -287,7 +287,7 @@ ges_timeline_source_create_track_objects (GESTimelineObject * obj,
|
|||
static void
|
||||
ges_timeline_source_set_text (GESTimelineSource * self, const gchar * text)
|
||||
{
|
||||
GList *tmp;
|
||||
GList *tmp, *trackobjects;
|
||||
GESTimelineObject *object = (GESTimelineObject *) self;
|
||||
|
||||
GST_DEBUG ("self:%p, text:%s", self, text);
|
||||
|
@ -297,7 +297,8 @@ ges_timeline_source_set_text (GESTimelineSource * self, const gchar * text)
|
|||
|
||||
self->text = g_strdup (text);
|
||||
|
||||
for (tmp = object->trackobjects; tmp; tmp = tmp->next) {
|
||||
trackobjects = ges_timeline_object_get_track_objects (object);
|
||||
for (tmp = trackobjects; tmp; tmp = tmp->next) {
|
||||
GESTrackObject *trackobject = (GESTrackObject *) tmp->data;
|
||||
|
||||
if (GES_IS_TRACK_TEXT_OVERLAY (trackobject)) {
|
||||
|
@ -306,14 +307,17 @@ ges_timeline_source_set_text (GESTimelineSource * self, const gchar * text)
|
|||
ges_track_object_set_active (trackobject, (text && (*text)) ? TRUE :
|
||||
FALSE);
|
||||
}
|
||||
|
||||
g_object_unref (GES_TRACK_OBJECT (tmp->data));
|
||||
}
|
||||
g_list_free (trackobjects);
|
||||
}
|
||||
|
||||
static void
|
||||
ges_timeline_source_set_font_desc (GESTimelineSource * self, const gchar *
|
||||
font_desc)
|
||||
{
|
||||
GList *tmp;
|
||||
GList *tmp, *trackobjects;
|
||||
GESTimelineObject *object = (GESTimelineObject *) self;
|
||||
|
||||
GST_DEBUG ("self:%p, font_desc:%s", self, font_desc);
|
||||
|
@ -323,52 +327,64 @@ ges_timeline_source_set_font_desc (GESTimelineSource * self, const gchar *
|
|||
|
||||
self->font_desc = g_strdup (font_desc);
|
||||
|
||||
for (tmp = object->trackobjects; tmp; tmp = tmp->next) {
|
||||
trackobjects = ges_timeline_object_get_track_objects (object);
|
||||
for (tmp = trackobjects; tmp; tmp = tmp->next) {
|
||||
GESTrackObject *trackobject = (GESTrackObject *) tmp->data;
|
||||
|
||||
if (GES_IS_TRACK_TEXT_OVERLAY (trackobject))
|
||||
ges_track_text_overlay_set_font_desc ((GESTrackTextOverlay *)
|
||||
(trackobject), self->font_desc);
|
||||
|
||||
g_object_unref (GES_TRACK_OBJECT (tmp->data));
|
||||
}
|
||||
g_list_free (trackobjects);
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
ges_timeline_source_set_halign (GESTimelineSource * self, GESTextHAlign halign)
|
||||
{
|
||||
GList *tmp;
|
||||
GList *tmp, *trackobjects;
|
||||
GESTimelineObject *object = (GESTimelineObject *) self;
|
||||
|
||||
GST_DEBUG ("self:%p, halign:%d", self, halign);
|
||||
|
||||
self->halign = halign;
|
||||
|
||||
for (tmp = object->trackobjects; tmp; tmp = tmp->next) {
|
||||
trackobjects = ges_timeline_object_get_track_objects (object);
|
||||
for (tmp = trackobjects; tmp; tmp = tmp->next) {
|
||||
GESTrackObject *trackobject = (GESTrackObject *) tmp->data;
|
||||
|
||||
if (GES_IS_TRACK_TEXT_OVERLAY (trackobject))
|
||||
ges_track_text_overlay_set_halignment ((GESTrackTextOverlay *)
|
||||
(trackobject), self->halign);
|
||||
|
||||
g_object_unref (GES_TRACK_OBJECT (tmp->data));
|
||||
}
|
||||
g_list_free (trackobjects);
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
ges_timeline_source_set_valign (GESTimelineSource * self, GESTextVAlign valign)
|
||||
{
|
||||
GList *tmp;
|
||||
GList *tmp, *trackobjects;
|
||||
GESTimelineObject *object = (GESTimelineObject *) self;
|
||||
|
||||
GST_DEBUG ("self:%p, valign:%d", self, valign);
|
||||
|
||||
self->valign = valign;
|
||||
|
||||
for (tmp = object->trackobjects; tmp; tmp = tmp->next) {
|
||||
trackobjects = ges_timeline_object_get_track_objects (object);
|
||||
for (tmp = trackobjects; tmp; tmp = tmp->next) {
|
||||
GESTrackObject *trackobject = (GESTrackObject *) tmp->data;
|
||||
|
||||
if (GES_IS_TRACK_TEXT_OVERLAY (trackobject))
|
||||
ges_track_text_overlay_set_valignment ((GESTrackTextOverlay *)
|
||||
(trackobject), self->valign);
|
||||
|
||||
g_object_unref (GES_TRACK_OBJECT (tmp->data));
|
||||
}
|
||||
g_list_free (trackobjects);
|
||||
|
||||
}
|
||||
|
|
|
@ -204,7 +204,7 @@ ges_timeline_test_source_init (GESTimelineTestSource * self)
|
|||
static void
|
||||
ges_timeline_test_source_set_mute (GESTimelineTestSource * self, gboolean mute)
|
||||
{
|
||||
GList *tmp;
|
||||
GList *tmp, *trackobjects;
|
||||
GESTimelineObject *object = (GESTimelineObject *) self;
|
||||
|
||||
GST_DEBUG ("self:%p, mute:%d", self, mute);
|
||||
|
@ -212,62 +212,78 @@ ges_timeline_test_source_set_mute (GESTimelineTestSource * self, gboolean mute)
|
|||
self->mute = mute;
|
||||
|
||||
/* Go over tracked objects, and update 'active' status on all audio objects */
|
||||
for (tmp = object->trackobjects; tmp; tmp = tmp->next) {
|
||||
trackobjects = ges_timeline_object_get_track_objects (object);
|
||||
for (tmp = trackobjects; tmp; tmp = tmp->next) {
|
||||
GESTrackObject *trackobject = (GESTrackObject *) tmp->data;
|
||||
|
||||
if (trackobject->track->type == GES_TRACK_TYPE_AUDIO)
|
||||
ges_track_object_set_active (trackobject, !mute);
|
||||
|
||||
g_object_unref (GES_TRACK_OBJECT (tmp->data));
|
||||
}
|
||||
g_list_free (trackobjects);
|
||||
}
|
||||
|
||||
static void
|
||||
ges_timeline_test_source_set_vpattern (GESTimelineTestSource * self,
|
||||
GESVideoTestPattern vpattern)
|
||||
{
|
||||
GList *tmp;
|
||||
GList *tmp, *trackobjects;
|
||||
GESTimelineObject *object = (GESTimelineObject *) self;
|
||||
|
||||
self->vpattern = vpattern;
|
||||
|
||||
for (tmp = object->trackobjects; tmp; tmp = tmp->next) {
|
||||
trackobjects = ges_timeline_object_get_track_objects (object);
|
||||
for (tmp = trackobjects; tmp; tmp = tmp->next) {
|
||||
GESTrackObject *trackobject = (GESTrackObject *) tmp->data;
|
||||
if (GES_IS_TRACK_VIDEO_TEST_SOURCE (trackobject))
|
||||
ges_track_video_test_source_set_pattern (
|
||||
(GESTrackVideoTestSource *) trackobject, vpattern);
|
||||
|
||||
g_object_unref (GES_TRACK_OBJECT (tmp->data));
|
||||
}
|
||||
g_list_free (trackobjects);
|
||||
}
|
||||
|
||||
static void
|
||||
ges_timeline_test_source_set_freq (GESTimelineTestSource * self, gdouble freq)
|
||||
{
|
||||
GList *tmp;
|
||||
GList *tmp, *trackobjects;
|
||||
GESTimelineObject *object = (GESTimelineObject *) self;
|
||||
|
||||
self->freq = freq;
|
||||
|
||||
for (tmp = object->trackobjects; tmp; tmp = tmp->next) {
|
||||
trackobjects = ges_timeline_object_get_track_objects (object);
|
||||
for (tmp = trackobjects; tmp; tmp = tmp->next) {
|
||||
GESTrackObject *trackobject = (GESTrackObject *) tmp->data;
|
||||
if (GES_IS_TRACK_AUDIO_TEST_SOURCE (trackobject))
|
||||
ges_track_audio_test_source_set_freq (
|
||||
(GESTrackAudioTestSource *) trackobject, freq);
|
||||
|
||||
g_object_unref (GES_TRACK_OBJECT (tmp->data));
|
||||
}
|
||||
g_list_free (trackobjects);
|
||||
}
|
||||
|
||||
static void
|
||||
ges_timeline_test_source_set_volume (GESTimelineTestSource * self,
|
||||
gdouble volume)
|
||||
{
|
||||
GList *tmp;
|
||||
GList *tmp, *trackobjects;
|
||||
GESTimelineObject *object = (GESTimelineObject *) self;
|
||||
|
||||
self->volume = volume;
|
||||
|
||||
for (tmp = object->trackobjects; tmp; tmp = tmp->next) {
|
||||
trackobjects = ges_timeline_object_get_track_objects (object);
|
||||
for (tmp = trackobjects; tmp; tmp = tmp->next) {
|
||||
GESTrackObject *trackobject = (GESTrackObject *) tmp->data;
|
||||
if (GES_IS_TRACK_AUDIO_TEST_SOURCE (trackobject))
|
||||
ges_track_audio_test_source_set_volume (
|
||||
(GESTrackAudioTestSource *) trackobject, volume);
|
||||
|
||||
g_object_unref (GES_TRACK_OBJECT (tmp->data));
|
||||
}
|
||||
g_list_free (trackobjects);
|
||||
}
|
||||
|
||||
static GESTrackObject *
|
||||
|
|
|
@ -221,7 +221,7 @@ ges_tl_text_overlay_init (GESTimelineTextOverlay * self)
|
|||
static void
|
||||
ges_tl_text_overlay_set_text (GESTimelineTextOverlay * self, const gchar * text)
|
||||
{
|
||||
GList *tmp;
|
||||
GList *tmp, *trackobjects;
|
||||
GESTimelineObject *object = (GESTimelineObject *) self;
|
||||
|
||||
GST_DEBUG ("self:%p, text:%s", self, text);
|
||||
|
@ -231,20 +231,24 @@ ges_tl_text_overlay_set_text (GESTimelineTextOverlay * self, const gchar * text)
|
|||
|
||||
self->text = g_strdup (text);
|
||||
|
||||
for (tmp = object->trackobjects; tmp; tmp = tmp->next) {
|
||||
trackobjects = ges_timeline_object_get_track_objects (object);
|
||||
for (tmp = trackobjects; tmp; tmp = tmp->next) {
|
||||
GESTrackObject *trackobject = (GESTrackObject *) tmp->data;
|
||||
|
||||
if (trackobject->track->type == GES_TRACK_TYPE_VIDEO)
|
||||
ges_track_text_overlay_set_text (GES_TRACK_TEXT_OVERLAY
|
||||
(trackobject), self->text);
|
||||
|
||||
g_object_unref (GES_TRACK_OBJECT (tmp->data));
|
||||
}
|
||||
g_list_free (trackobjects);
|
||||
}
|
||||
|
||||
static void
|
||||
ges_tl_text_overlay_set_font_desc (GESTimelineTextOverlay * self, const gchar *
|
||||
font_desc)
|
||||
{
|
||||
GList *tmp;
|
||||
GList *tmp, *trackobjects;
|
||||
GESTimelineObject *object = (GESTimelineObject *) self;
|
||||
|
||||
GST_DEBUG ("self:%p, font_desc:%s", self, font_desc);
|
||||
|
@ -254,13 +258,17 @@ ges_tl_text_overlay_set_font_desc (GESTimelineTextOverlay * self, const gchar *
|
|||
|
||||
self->font_desc = g_strdup (font_desc);
|
||||
|
||||
for (tmp = object->trackobjects; tmp; tmp = tmp->next) {
|
||||
trackobjects = ges_timeline_object_get_track_objects (object);
|
||||
for (tmp = trackobjects; tmp; tmp = tmp->next) {
|
||||
GESTrackObject *trackobject = (GESTrackObject *) tmp->data;
|
||||
|
||||
if (trackobject->track->type == GES_TRACK_TYPE_VIDEO)
|
||||
ges_track_text_overlay_set_font_desc (GES_TRACK_TEXT_OVERLAY
|
||||
(trackobject), self->font_desc);
|
||||
|
||||
g_object_unref (GES_TRACK_OBJECT (tmp->data));
|
||||
}
|
||||
g_list_free (trackobjects);
|
||||
|
||||
}
|
||||
|
||||
|
@ -268,20 +276,24 @@ static void
|
|||
ges_tl_text_overlay_set_halign (GESTimelineTextOverlay * self,
|
||||
GESTextHAlign halign)
|
||||
{
|
||||
GList *tmp;
|
||||
GList *tmp, *trackobjects;
|
||||
GESTimelineObject *object = (GESTimelineObject *) self;
|
||||
|
||||
GST_DEBUG ("self:%p, halign:%d", self, halign);
|
||||
|
||||
self->halign = halign;
|
||||
|
||||
for (tmp = object->trackobjects; tmp; tmp = tmp->next) {
|
||||
trackobjects = ges_timeline_object_get_track_objects (object);
|
||||
for (tmp = trackobjects; tmp; tmp = tmp->next) {
|
||||
GESTrackObject *trackobject = (GESTrackObject *) tmp->data;
|
||||
|
||||
if (trackobject->track->type == GES_TRACK_TYPE_VIDEO)
|
||||
ges_track_text_overlay_set_halignment (GES_TRACK_TEXT_OVERLAY
|
||||
(trackobject), self->halign);
|
||||
|
||||
g_object_unref (GES_TRACK_OBJECT (tmp->data));
|
||||
}
|
||||
g_list_free (trackobjects);
|
||||
|
||||
}
|
||||
|
||||
|
@ -289,20 +301,24 @@ static void
|
|||
ges_tl_text_overlay_set_valign (GESTimelineTextOverlay * self,
|
||||
GESTextVAlign valign)
|
||||
{
|
||||
GList *tmp;
|
||||
GList *tmp, *trackobjects;
|
||||
GESTimelineObject *object = (GESTimelineObject *) self;
|
||||
|
||||
GST_DEBUG ("self:%p, valign:%d", self, valign);
|
||||
|
||||
self->valign = valign;
|
||||
|
||||
for (tmp = object->trackobjects; tmp; tmp = tmp->next) {
|
||||
trackobjects = ges_timeline_object_get_track_objects (object);
|
||||
for (tmp = trackobjects; tmp; tmp = tmp->next) {
|
||||
GESTrackObject *trackobject = (GESTrackObject *) tmp->data;
|
||||
|
||||
if (trackobject->track->type == GES_TRACK_TYPE_VIDEO)
|
||||
ges_track_text_overlay_set_valignment (GES_TRACK_TEXT_OVERLAY
|
||||
(trackobject), self->valign);
|
||||
|
||||
g_object_unref (GES_TRACK_OBJECT (tmp->data));
|
||||
}
|
||||
g_list_free (trackobjects);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -239,7 +239,7 @@ ges_tl_title_src_init (GESTimelineTitleSource * self)
|
|||
static void
|
||||
ges_tl_title_src_set_text (GESTimelineTitleSource * self, const gchar * text)
|
||||
{
|
||||
GList *tmp;
|
||||
GList *tmp, *trackobjects;
|
||||
GESTimelineObject *object = (GESTimelineObject *) self;
|
||||
|
||||
GST_DEBUG ("self:%p, text:%s", self, text);
|
||||
|
@ -249,20 +249,24 @@ ges_tl_title_src_set_text (GESTimelineTitleSource * self, const gchar * text)
|
|||
|
||||
self->text = g_strdup (text);
|
||||
|
||||
for (tmp = object->trackobjects; tmp; tmp = tmp->next) {
|
||||
trackobjects = ges_timeline_object_get_track_objects (object);
|
||||
for (tmp = trackobjects; tmp; tmp = tmp->next) {
|
||||
GESTrackObject *trackobject = (GESTrackObject *) tmp->data;
|
||||
|
||||
if (GES_IS_TRACK_TITLE_SOURCE (trackobject))
|
||||
ges_track_title_source_set_text (GES_TRACK_TITLE_SOURCE
|
||||
(trackobject), self->text);
|
||||
|
||||
g_object_unref (GES_TRACK_OBJECT (tmp->data));
|
||||
}
|
||||
g_list_free (trackobjects);
|
||||
}
|
||||
|
||||
static void
|
||||
ges_tl_title_src_set_font_desc (GESTimelineTitleSource * self, const gchar *
|
||||
font_desc)
|
||||
{
|
||||
GList *tmp;
|
||||
GList *tmp, *trackobjects;
|
||||
GESTimelineObject *object = (GESTimelineObject *) self;
|
||||
|
||||
GST_DEBUG ("self:%p, font_desc:%s", self, font_desc);
|
||||
|
@ -272,59 +276,70 @@ ges_tl_title_src_set_font_desc (GESTimelineTitleSource * self, const gchar *
|
|||
|
||||
self->font_desc = g_strdup (font_desc);
|
||||
|
||||
for (tmp = object->trackobjects; tmp; tmp = tmp->next) {
|
||||
trackobjects = ges_timeline_object_get_track_objects (object);
|
||||
for (tmp = trackobjects; tmp; tmp = tmp->next) {
|
||||
GESTrackObject *trackobject = (GESTrackObject *) tmp->data;
|
||||
|
||||
if (GES_IS_TRACK_TITLE_SOURCE (trackobject))
|
||||
ges_track_title_source_set_font_desc (GES_TRACK_TITLE_SOURCE
|
||||
(trackobject), self->font_desc);
|
||||
|
||||
g_object_unref (GES_TRACK_OBJECT (tmp->data));
|
||||
}
|
||||
g_list_free (trackobjects);
|
||||
}
|
||||
|
||||
static void
|
||||
ges_tl_title_src_set_halign (GESTimelineTitleSource * self,
|
||||
GESTextHAlign halign)
|
||||
{
|
||||
GList *tmp;
|
||||
GList *tmp, *trackobjects;
|
||||
GESTimelineObject *object = (GESTimelineObject *) self;
|
||||
|
||||
GST_DEBUG ("self:%p, halign:%d", self, halign);
|
||||
|
||||
self->halign = halign;
|
||||
|
||||
for (tmp = object->trackobjects; tmp; tmp = tmp->next) {
|
||||
trackobjects = ges_timeline_object_get_track_objects (object);
|
||||
for (tmp = trackobjects; tmp; tmp = tmp->next) {
|
||||
GESTrackObject *trackobject = (GESTrackObject *) tmp->data;
|
||||
|
||||
if (GES_IS_TRACK_TITLE_SOURCE (trackobject))
|
||||
ges_track_title_source_set_halignment (GES_TRACK_TITLE_SOURCE
|
||||
(trackobject), self->halign);
|
||||
|
||||
g_object_unref (GES_TRACK_OBJECT (tmp->data));
|
||||
}
|
||||
g_list_free (trackobjects);
|
||||
}
|
||||
|
||||
static void
|
||||
ges_tl_title_src_set_valign (GESTimelineTitleSource * self,
|
||||
GESTextVAlign valign)
|
||||
{
|
||||
GList *tmp;
|
||||
GList *tmp, *trackobjects;
|
||||
GESTimelineObject *object = (GESTimelineObject *) self;
|
||||
|
||||
GST_DEBUG ("self:%p, valign:%d", self, valign);
|
||||
|
||||
self->valign = valign;
|
||||
|
||||
for (tmp = object->trackobjects; tmp; tmp = tmp->next) {
|
||||
trackobjects = ges_timeline_object_get_track_objects (object);
|
||||
for (tmp = trackobjects; tmp; tmp = tmp->next) {
|
||||
GESTrackObject *trackobject = (GESTrackObject *) tmp->data;
|
||||
|
||||
if (GES_IS_TRACK_TITLE_SOURCE (trackobject))
|
||||
ges_track_title_source_set_valignment (GES_TRACK_TITLE_SOURCE
|
||||
(trackobject), self->valign);
|
||||
|
||||
g_object_unref (GES_TRACK_OBJECT (tmp->data));
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
ges_tl_title_src_set_mute (GESTimelineTitleSource * self, gboolean mute)
|
||||
{
|
||||
GList *tmp;
|
||||
GList *tmp, *trackobjects;
|
||||
GESTimelineObject *object = (GESTimelineObject *) self;
|
||||
|
||||
GST_DEBUG ("self:%p, mute:%d", self, mute);
|
||||
|
@ -332,12 +347,16 @@ ges_tl_title_src_set_mute (GESTimelineTitleSource * self, gboolean mute)
|
|||
self->mute = mute;
|
||||
|
||||
/* Go over tracked objects, and update 'active' status on all audio objects */
|
||||
for (tmp = object->trackobjects; tmp; tmp = tmp->next) {
|
||||
trackobjects = ges_timeline_object_get_track_objects (object);
|
||||
for (tmp = trackobjects; tmp; tmp = tmp->next) {
|
||||
GESTrackObject *trackobject = (GESTrackObject *) tmp->data;
|
||||
|
||||
if (trackobject->track->type == GES_TRACK_TYPE_AUDIO)
|
||||
ges_track_object_set_active (trackobject, !mute);
|
||||
|
||||
g_object_unref (GES_TRACK_OBJECT (tmp->data));
|
||||
}
|
||||
g_list_free (trackobjects);
|
||||
}
|
||||
|
||||
static GESTrackObject *
|
||||
|
|
|
@ -63,17 +63,21 @@ static void
|
|||
ges_timeline_transition_update_vtype_internal (GESTimelineObject * self,
|
||||
GESVideoTransitionType value)
|
||||
{
|
||||
GList *tmp;
|
||||
GList *tmp, *trackobjects;
|
||||
GESTimelineTransition *trself = (GESTimelineTransition *) self;
|
||||
|
||||
for (tmp = self->trackobjects; tmp; tmp = g_list_next (tmp)) {
|
||||
trackobjects = ges_timeline_object_get_track_objects (self);
|
||||
for (tmp = trackobjects; tmp; tmp = tmp->next) {
|
||||
GESTrackVideoTransition *obj;
|
||||
if (GES_IS_TRACK_VIDEO_TRANSITION (tmp->data)) {
|
||||
obj = (GESTrackVideoTransition *) tmp->data;
|
||||
if (!ges_track_video_transition_set_type (obj, value))
|
||||
return;
|
||||
}
|
||||
|
||||
g_object_unref (GES_TRACK_OBJECT (tmp->data));
|
||||
}
|
||||
g_list_free (trackobjects);
|
||||
|
||||
trself->vtype = value;
|
||||
return;
|
||||
|
|
|
@ -551,14 +551,15 @@ static void
|
|||
layer_object_removed_cb (GESTimelineLayer * layer, GESTimelineObject * object,
|
||||
GESTimeline * timeline)
|
||||
{
|
||||
GList *tmp, *next;
|
||||
GList *tmp, *next, *trackobjects;
|
||||
|
||||
GST_DEBUG ("TimelineObject %p removed from layer %p", object, layer);
|
||||
|
||||
/* Go over the object's track objects and figure out which one belongs to
|
||||
* the list of tracks we control */
|
||||
|
||||
for (tmp = object->trackobjects; tmp; tmp = next) {
|
||||
trackobjects = ges_timeline_object_get_track_objects (object);
|
||||
for (tmp = trackobjects; tmp; tmp = tmp->next) {
|
||||
GESTrackObject *trobj = (GESTrackObject *) tmp->data;
|
||||
|
||||
next = g_list_next (tmp);
|
||||
|
@ -572,7 +573,10 @@ layer_object_removed_cb (GESTimelineLayer * layer, GESTimelineObject * object,
|
|||
|
||||
ges_timeline_object_release_track_object (object, trobj);
|
||||
}
|
||||
|
||||
g_object_unref (GES_TRACK_OBJECT (tmp->data));
|
||||
}
|
||||
g_list_free (trackobjects);
|
||||
|
||||
GST_DEBUG ("Done");
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ my_fill_track_func (GESTimelineObject * object,
|
|||
{
|
||||
GstElement *src;
|
||||
|
||||
GST_DEBUG ("timelineobj:%p, trackobjec:%p, gnlobj:%p",
|
||||
GST_DEBUG ("timelineobj:%p, trackobject:%p, gnlobj:%p",
|
||||
object, trobject, gnlobj);
|
||||
|
||||
/* Let's just put a fakesource in for the time being */
|
||||
|
@ -45,10 +45,11 @@ my_fill_track_func (GESTimelineObject * object,
|
|||
GST_START_TEST (test_ges_scenario)
|
||||
{
|
||||
GESTimeline *timeline;
|
||||
GESTimelineLayer *layer;
|
||||
GESTimelineLayer *layer, *tmp_layer;
|
||||
GESTrack *track;
|
||||
GESCustomTimelineSource *source;
|
||||
GESTrackObject *trackobject;
|
||||
GList *trackobjects, *tmp;
|
||||
|
||||
ges_init ();
|
||||
/* This is the simplest scenario ever */
|
||||
|
@ -89,23 +90,37 @@ GST_START_TEST (test_ges_scenario)
|
|||
GST_DEBUG ("Adding the source to the timeline layer");
|
||||
fail_unless (ges_timeline_layer_add_object (layer,
|
||||
GES_TIMELINE_OBJECT (source)));
|
||||
fail_unless (GES_TIMELINE_OBJECT (source)->layer == layer);
|
||||
tmp_layer = ges_timeline_object_get_layer (GES_TIMELINE_OBJECT (source));
|
||||
fail_unless (tmp_layer == layer);
|
||||
ASSERT_OBJECT_REFCOUNT (source, "source", 1);
|
||||
/* Make sure the associated TrackObject is in the Track */
|
||||
fail_unless (GES_TIMELINE_OBJECT (source)->trackobjects != NULL);
|
||||
g_object_unref (tmp_layer);
|
||||
ASSERT_OBJECT_REFCOUNT (layer, "layer", 1);
|
||||
|
||||
trackobject =
|
||||
GES_TRACK_OBJECT ((GES_TIMELINE_OBJECT (source)->trackobjects)->data);
|
||||
/* Make sure the associated TrackObject is in the Track */
|
||||
trackobjects =
|
||||
ges_timeline_object_get_track_objects (GES_TIMELINE_OBJECT (source));
|
||||
fail_unless (trackobjects != NULL);
|
||||
trackobject = GES_TRACK_OBJECT (trackobjects->data);
|
||||
ASSERT_OBJECT_REFCOUNT (trackobject, "trackobject", 2);
|
||||
for (tmp = trackobjects; tmp; tmp = tmp->next) {
|
||||
g_object_unref (GES_TRACK_OBJECT (tmp->data));
|
||||
}
|
||||
g_list_free (trackobjects);
|
||||
ASSERT_OBJECT_REFCOUNT (trackobject, "trackobject", 1);
|
||||
|
||||
GST_DEBUG ("Remove the TimelineObject from the layer");
|
||||
/* Now remove the timelineobject */
|
||||
g_object_ref (source);
|
||||
ASSERT_OBJECT_REFCOUNT (layer, "layer", 1);
|
||||
fail_unless (ges_timeline_layer_remove_object (layer,
|
||||
GES_TIMELINE_OBJECT (source)));
|
||||
ASSERT_OBJECT_REFCOUNT (source, "source", 1);
|
||||
fail_unless (GES_TIMELINE_OBJECT (source)->layer == NULL);
|
||||
fail_unless (GES_TIMELINE_OBJECT (source)->trackobjects == NULL);
|
||||
ASSERT_OBJECT_REFCOUNT (layer, "layer", 1);
|
||||
tmp_layer = ges_timeline_object_get_layer (GES_TIMELINE_OBJECT (source));
|
||||
fail_unless (tmp_layer == NULL);
|
||||
trackobjects =
|
||||
ges_timeline_object_get_track_objects (GES_TIMELINE_OBJECT (source));
|
||||
fail_unless (trackobjects == NULL); /* No unreffing then */
|
||||
g_object_unref (source);
|
||||
|
||||
GST_DEBUG ("Removing track from the timeline");
|
||||
|
@ -140,9 +155,10 @@ GST_END_TEST;
|
|||
GST_START_TEST (test_ges_timeline_add_layer)
|
||||
{
|
||||
GESTimeline *timeline;
|
||||
GESTimelineLayer *layer;
|
||||
GESTimelineLayer *layer, *tmp_layer;
|
||||
GESTrack *track;
|
||||
GESCustomTimelineSource *s1, *s2, *s3;
|
||||
GList *trackobjects, *tmp;
|
||||
GESTrackObject *trackobject;
|
||||
|
||||
ges_init ();
|
||||
|
@ -172,19 +188,28 @@ GST_START_TEST (test_ges_timeline_add_layer)
|
|||
s1 = ges_custom_timeline_source_new (my_fill_track_func, NULL);
|
||||
fail_unless (s1 != NULL);
|
||||
fail_unless (ges_timeline_layer_add_object (layer, GES_TIMELINE_OBJECT (s1)));
|
||||
fail_unless (GES_TIMELINE_OBJECT (s1)->layer == layer);
|
||||
tmp_layer = ges_timeline_object_get_layer (GES_TIMELINE_OBJECT (s1));
|
||||
fail_unless (tmp_layer == layer);
|
||||
ASSERT_OBJECT_REFCOUNT (layer, "layer", 2);
|
||||
g_object_unref (tmp_layer);
|
||||
|
||||
GST_DEBUG ("Creating a source");
|
||||
s2 = ges_custom_timeline_source_new (my_fill_track_func, NULL);
|
||||
fail_unless (s2 != NULL);
|
||||
fail_unless (ges_timeline_layer_add_object (layer, GES_TIMELINE_OBJECT (s2)));
|
||||
fail_unless (GES_TIMELINE_OBJECT (s2)->layer == layer);
|
||||
tmp_layer = ges_timeline_object_get_layer (GES_TIMELINE_OBJECT (s2));
|
||||
fail_unless (tmp_layer == layer);
|
||||
ASSERT_OBJECT_REFCOUNT (layer, "layer", 2);
|
||||
g_object_unref (tmp_layer);
|
||||
|
||||
GST_DEBUG ("Creating a source");
|
||||
s3 = ges_custom_timeline_source_new (my_fill_track_func, NULL);
|
||||
fail_unless (s3 != NULL);
|
||||
fail_unless (ges_timeline_layer_add_object (layer, GES_TIMELINE_OBJECT (s3)));
|
||||
fail_unless (GES_TIMELINE_OBJECT (s3)->layer == layer);
|
||||
tmp_layer = ges_timeline_object_get_layer (GES_TIMELINE_OBJECT (s3));
|
||||
fail_unless (tmp_layer == layer);
|
||||
ASSERT_OBJECT_REFCOUNT (layer, "layer", 2);
|
||||
g_object_unref (tmp_layer);
|
||||
|
||||
GST_DEBUG ("Add the layer to the timeline");
|
||||
fail_unless (ges_timeline_add_layer (timeline, layer));
|
||||
|
@ -194,20 +219,35 @@ GST_START_TEST (test_ges_timeline_add_layer)
|
|||
fail_unless (g_list_find (timeline->layers, layer) != NULL);
|
||||
|
||||
/* Make sure the associated TrackObjects are in the Track */
|
||||
fail_unless (GES_TIMELINE_OBJECT (s1)->trackobjects != NULL);
|
||||
fail_unless (GES_TIMELINE_OBJECT (s2)->trackobjects != NULL);
|
||||
fail_unless (GES_TIMELINE_OBJECT (s3)->trackobjects != NULL);
|
||||
|
||||
trackobject =
|
||||
GES_TRACK_OBJECT ((GES_TIMELINE_OBJECT (s1)->trackobjects)->data);
|
||||
trackobjects =
|
||||
ges_timeline_object_get_track_objects (GES_TIMELINE_OBJECT (s1));
|
||||
fail_unless (trackobjects != NULL);
|
||||
trackobject = GES_TRACK_OBJECT (trackobjects->data);
|
||||
ASSERT_OBJECT_REFCOUNT (trackobject, "trackobject", 2);
|
||||
for (tmp = trackobjects; tmp; tmp = tmp->next) {
|
||||
g_object_unref (GES_TRACK_OBJECT (tmp->data));
|
||||
}
|
||||
g_list_free (trackobjects);
|
||||
ASSERT_OBJECT_REFCOUNT (trackobject, "trackobject", 1);
|
||||
|
||||
trackobject =
|
||||
GES_TRACK_OBJECT ((GES_TIMELINE_OBJECT (s2)->trackobjects)->data);
|
||||
ASSERT_OBJECT_REFCOUNT (trackobject, "trackobject", 1);
|
||||
trackobjects =
|
||||
ges_timeline_object_get_track_objects (GES_TIMELINE_OBJECT (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));
|
||||
}
|
||||
g_list_free (trackobjects);
|
||||
ASSERT_OBJECT_REFCOUNT (GES_TRACK_OBJECT (trackobject), "trackobject", 1);
|
||||
|
||||
trackobject =
|
||||
GES_TRACK_OBJECT ((GES_TIMELINE_OBJECT (s3)->trackobjects)->data);
|
||||
trackobjects =
|
||||
ges_timeline_object_get_track_objects (GES_TIMELINE_OBJECT (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));
|
||||
}
|
||||
g_list_free (trackobjects);
|
||||
ASSERT_OBJECT_REFCOUNT (trackobject, "trackobject", 1);
|
||||
|
||||
/* theoretically this is all we need to do to ensure cleanup */
|
||||
|
@ -221,10 +261,10 @@ GST_END_TEST;
|
|||
GST_START_TEST (test_ges_timeline_add_layer_first)
|
||||
{
|
||||
GESTimeline *timeline;
|
||||
GESTimelineLayer *layer;
|
||||
GESTimelineLayer *layer, *tmp_layer;
|
||||
GESTrack *track;
|
||||
GESCustomTimelineSource *s1, *s2, *s3;
|
||||
GESTrackObject *trackobject;
|
||||
GList *trackobjects, *tmp;
|
||||
|
||||
ges_init ();
|
||||
|
||||
|
@ -246,19 +286,25 @@ GST_START_TEST (test_ges_timeline_add_layer_first)
|
|||
s1 = ges_custom_timeline_source_new (my_fill_track_func, NULL);
|
||||
fail_unless (s1 != NULL);
|
||||
fail_unless (ges_timeline_layer_add_object (layer, GES_TIMELINE_OBJECT (s1)));
|
||||
fail_unless (GES_TIMELINE_OBJECT (s1)->layer == layer);
|
||||
tmp_layer = ges_timeline_object_get_layer (GES_TIMELINE_OBJECT (s1));
|
||||
fail_unless (tmp_layer == layer);
|
||||
g_object_unref (tmp_layer);
|
||||
|
||||
GST_DEBUG ("Creating a source");
|
||||
s2 = ges_custom_timeline_source_new (my_fill_track_func, NULL);
|
||||
fail_unless (s2 != NULL);
|
||||
fail_unless (ges_timeline_layer_add_object (layer, GES_TIMELINE_OBJECT (s2)));
|
||||
fail_unless (GES_TIMELINE_OBJECT (s2)->layer == layer);
|
||||
tmp_layer = ges_timeline_object_get_layer (GES_TIMELINE_OBJECT (s2));
|
||||
fail_unless (tmp_layer == layer);
|
||||
g_object_unref (tmp_layer);
|
||||
|
||||
GST_DEBUG ("Creating a source");
|
||||
s3 = ges_custom_timeline_source_new (my_fill_track_func, NULL);
|
||||
fail_unless (s3 != NULL);
|
||||
fail_unless (ges_timeline_layer_add_object (layer, GES_TIMELINE_OBJECT (s3)));
|
||||
fail_unless (GES_TIMELINE_OBJECT (s3)->layer == layer);
|
||||
tmp_layer = ges_timeline_object_get_layer (GES_TIMELINE_OBJECT (s3));
|
||||
fail_unless (tmp_layer == layer);
|
||||
g_object_unref (tmp_layer);
|
||||
|
||||
GST_DEBUG ("Add the layer to the timeline");
|
||||
fail_unless (ges_timeline_add_layer (timeline, layer));
|
||||
|
@ -274,21 +320,32 @@ GST_START_TEST (test_ges_timeline_add_layer_first)
|
|||
fail_unless ((gpointer) GST_ELEMENT_PARENT (track) == (gpointer) timeline);
|
||||
|
||||
/* Make sure the associated TrackObjects are in the Track */
|
||||
fail_unless (GES_TIMELINE_OBJECT (s1)->trackobjects != NULL);
|
||||
fail_unless (GES_TIMELINE_OBJECT (s2)->trackobjects != NULL);
|
||||
fail_unless (GES_TIMELINE_OBJECT (s3)->trackobjects != NULL);
|
||||
trackobjects =
|
||||
ges_timeline_object_get_track_objects (GES_TIMELINE_OBJECT (s1));
|
||||
fail_unless (trackobjects != NULL);
|
||||
for (tmp = trackobjects; tmp; tmp = tmp->next) {
|
||||
ASSERT_OBJECT_REFCOUNT (GES_TRACK_OBJECT (tmp->data), "trackobject", 2);
|
||||
g_object_unref (GES_TRACK_OBJECT (tmp->data));
|
||||
}
|
||||
g_list_free (trackobjects);
|
||||
|
||||
trackobject =
|
||||
GES_TRACK_OBJECT ((GES_TIMELINE_OBJECT (s1)->trackobjects)->data);
|
||||
ASSERT_OBJECT_REFCOUNT (trackobject, "trackobject", 1);
|
||||
trackobjects =
|
||||
ges_timeline_object_get_track_objects (GES_TIMELINE_OBJECT (s2));
|
||||
fail_unless (trackobjects != NULL);
|
||||
for (tmp = trackobjects; tmp; tmp = tmp->next) {
|
||||
ASSERT_OBJECT_REFCOUNT (GES_TRACK_OBJECT (tmp->data), "trackobject", 2);
|
||||
g_object_unref (GES_TRACK_OBJECT (tmp->data));
|
||||
}
|
||||
g_list_free (trackobjects);
|
||||
|
||||
trackobject =
|
||||
GES_TRACK_OBJECT ((GES_TIMELINE_OBJECT (s2)->trackobjects)->data);
|
||||
ASSERT_OBJECT_REFCOUNT (trackobject, "trackobject", 1);
|
||||
|
||||
trackobject =
|
||||
GES_TRACK_OBJECT ((GES_TIMELINE_OBJECT (s3)->trackobjects)->data);
|
||||
ASSERT_OBJECT_REFCOUNT (trackobject, "trackobject", 1);
|
||||
trackobjects =
|
||||
ges_timeline_object_get_track_objects (GES_TIMELINE_OBJECT (s3));
|
||||
fail_unless (trackobjects != NULL);
|
||||
for (tmp = trackobjects; tmp; tmp = tmp->next) {
|
||||
ASSERT_OBJECT_REFCOUNT (GES_TRACK_OBJECT (tmp->data), "trackobject", 2);
|
||||
g_object_unref (GES_TRACK_OBJECT (tmp->data));
|
||||
}
|
||||
g_list_free (trackobjects);
|
||||
|
||||
/* theoretically this is all we need to do to ensure cleanup */
|
||||
g_object_unref (timeline);
|
||||
|
@ -299,10 +356,11 @@ GST_END_TEST;
|
|||
GST_START_TEST (test_ges_timeline_remove_track)
|
||||
{
|
||||
GESTimeline *timeline;
|
||||
GESTimelineLayer *layer;
|
||||
GESTimelineLayer *layer, *tmp_layer;
|
||||
GESTrack *track;
|
||||
GESCustomTimelineSource *s1, *s2, *s3;
|
||||
GESTrackObject *t1, *t2, *t3;
|
||||
GList *trackobjects, *tmp;
|
||||
|
||||
ges_init ();
|
||||
|
||||
|
@ -324,19 +382,25 @@ GST_START_TEST (test_ges_timeline_remove_track)
|
|||
s1 = ges_custom_timeline_source_new (my_fill_track_func, NULL);
|
||||
fail_unless (s1 != NULL);
|
||||
fail_unless (ges_timeline_layer_add_object (layer, GES_TIMELINE_OBJECT (s1)));
|
||||
fail_unless (GES_TIMELINE_OBJECT (s1)->layer == layer);
|
||||
tmp_layer = ges_timeline_object_get_layer (GES_TIMELINE_OBJECT (s1));
|
||||
fail_unless (tmp_layer == layer);
|
||||
g_object_unref (tmp_layer);
|
||||
|
||||
GST_DEBUG ("Creating a source");
|
||||
s2 = ges_custom_timeline_source_new (my_fill_track_func, NULL);
|
||||
fail_unless (s2 != NULL);
|
||||
fail_unless (ges_timeline_layer_add_object (layer, GES_TIMELINE_OBJECT (s2)));
|
||||
fail_unless (GES_TIMELINE_OBJECT (s2)->layer == layer);
|
||||
tmp_layer = ges_timeline_object_get_layer (GES_TIMELINE_OBJECT (s2));
|
||||
fail_unless (tmp_layer == layer);
|
||||
g_object_unref (tmp_layer);
|
||||
|
||||
GST_DEBUG ("Creating a source");
|
||||
s3 = ges_custom_timeline_source_new (my_fill_track_func, NULL);
|
||||
fail_unless (s3 != NULL);
|
||||
fail_unless (ges_timeline_layer_add_object (layer, GES_TIMELINE_OBJECT (s3)));
|
||||
fail_unless (GES_TIMELINE_OBJECT (s3)->layer == layer);
|
||||
tmp_layer = ges_timeline_object_get_layer (GES_TIMELINE_OBJECT (s3));
|
||||
fail_unless (tmp_layer == layer);
|
||||
g_object_unref (tmp_layer);
|
||||
|
||||
GST_DEBUG ("Add the layer to the timeline");
|
||||
fail_unless (ges_timeline_add_layer (timeline, layer));
|
||||
|
@ -352,20 +416,40 @@ GST_START_TEST (test_ges_timeline_remove_track)
|
|||
fail_unless ((gpointer) GST_ELEMENT_PARENT (track) == (gpointer) timeline);
|
||||
|
||||
/* Make sure the associated TrackObjects are in the Track */
|
||||
fail_unless (GES_TIMELINE_OBJECT (s1)->trackobjects != NULL);
|
||||
fail_unless (GES_TIMELINE_OBJECT (s2)->trackobjects != NULL);
|
||||
fail_unless (GES_TIMELINE_OBJECT (s3)->trackobjects != NULL);
|
||||
|
||||
t1 = GES_TRACK_OBJECT ((GES_TIMELINE_OBJECT (s1)->trackobjects)->data);
|
||||
trackobjects =
|
||||
ges_timeline_object_get_track_objects (GES_TIMELINE_OBJECT (s1));
|
||||
fail_unless (trackobjects != NULL);
|
||||
t1 = GES_TRACK_OBJECT ((trackobjects)->data);
|
||||
g_object_ref (t1);
|
||||
for (tmp = trackobjects; tmp; tmp = tmp->next) {
|
||||
ASSERT_OBJECT_REFCOUNT (GES_TRACK_OBJECT (tmp->data), "trackobject", 3);
|
||||
g_object_unref (GES_TRACK_OBJECT (tmp->data));
|
||||
}
|
||||
g_list_free (trackobjects);
|
||||
ASSERT_OBJECT_REFCOUNT (t1, "trackobject", 2);
|
||||
|
||||
t2 = GES_TRACK_OBJECT ((GES_TIMELINE_OBJECT (s2)->trackobjects)->data);
|
||||
trackobjects =
|
||||
ges_timeline_object_get_track_objects (GES_TIMELINE_OBJECT (s2));
|
||||
fail_unless (trackobjects != NULL);
|
||||
t2 = GES_TRACK_OBJECT (trackobjects->data);
|
||||
g_object_ref (t2);
|
||||
for (tmp = trackobjects; tmp; tmp = tmp->next) {
|
||||
ASSERT_OBJECT_REFCOUNT (GES_TRACK_OBJECT (tmp->data), "trackobject", 3);
|
||||
g_object_unref (GES_TRACK_OBJECT (tmp->data));
|
||||
}
|
||||
g_list_free (trackobjects);
|
||||
ASSERT_OBJECT_REFCOUNT (t2, "t2", 2);
|
||||
|
||||
t3 = GES_TRACK_OBJECT ((GES_TIMELINE_OBJECT (s3)->trackobjects)->data);
|
||||
trackobjects =
|
||||
ges_timeline_object_get_track_objects (GES_TIMELINE_OBJECT (s3));
|
||||
fail_unless (trackobjects != NULL);
|
||||
t3 = GES_TRACK_OBJECT (trackobjects->data);
|
||||
g_object_ref (t3);
|
||||
for (tmp = trackobjects; tmp; tmp = tmp->next) {
|
||||
ASSERT_OBJECT_REFCOUNT (GES_TRACK_OBJECT (tmp->data), "trackobject", 3);
|
||||
g_object_unref (GES_TRACK_OBJECT (tmp->data));
|
||||
}
|
||||
g_list_free (trackobjects);
|
||||
ASSERT_OBJECT_REFCOUNT (t3, "t3", 2);
|
||||
|
||||
/* remove the track and check that the track objects have been released */
|
||||
|
|
|
@ -282,8 +282,9 @@ ges_objs_equal (GObject * a, GObject * b)
|
|||
, bv = {
|
||||
0};
|
||||
|
||||
/* ignore name property */
|
||||
if (!g_strcmp0 ("name", (*iter)->name))
|
||||
/* ignore name and layer properties */
|
||||
if (!g_strcmp0 ("name", (*iter)->name) ||
|
||||
!g_strcmp0 ("layer", (*iter)->name))
|
||||
continue;
|
||||
|
||||
/* special case caps property */
|
||||
|
|
|
@ -78,7 +78,8 @@ GST_START_TEST (test_gsl_add)
|
|||
|
||||
fail_unless (ges_simple_timeline_layer_add_object (GES_SIMPLE_TIMELINE_LAYER
|
||||
(layer), GES_TIMELINE_OBJECT (source), -1));
|
||||
fail_unless (GES_TIMELINE_OBJECT (source)->layer == layer);
|
||||
fail_unless (ges_timeline_object_get_layer (GES_TIMELINE_OBJECT (source)) ==
|
||||
layer);
|
||||
fail_unless_equals_uint64 (GES_TIMELINE_OBJECT_DURATION (source), GST_SECOND);
|
||||
fail_unless_equals_uint64 (GES_TIMELINE_OBJECT_START (source), 0);
|
||||
|
||||
|
|
|
@ -77,11 +77,13 @@ print_transition_data (GESTimelineObject * tr)
|
|||
guint64 start, duration;
|
||||
gint priority;
|
||||
char *name;
|
||||
GList *trackobjects, *tmp;
|
||||
|
||||
if (!tr)
|
||||
return FALSE;
|
||||
|
||||
trackobj = GES_TRACK_OBJECT (tr->trackobjects->data);
|
||||
trackobjects = ges_timeline_object_get_track_objects (tr);
|
||||
trackobj = GES_TRACK_OBJECT (trackobjects->data);
|
||||
gnlobj = trackobj->gnlobject;
|
||||
|
||||
g_object_get (gnlobj, "start", &start, "duration", &duration,
|
||||
|
@ -90,6 +92,12 @@ print_transition_data (GESTimelineObject * 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));
|
||||
}
|
||||
|
||||
g_list_free (trackobjects);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -61,11 +61,13 @@ print_transition_data (GESTimelineObject * tr)
|
|||
guint64 start, duration;
|
||||
gint priority;
|
||||
char *name;
|
||||
GList *trackobjects, *tmp;
|
||||
|
||||
if (!tr)
|
||||
return FALSE;
|
||||
|
||||
trackobj = GES_TRACK_OBJECT (tr->trackobjects->data);
|
||||
trackobjects = ges_timeline_object_get_track_objects (tr);
|
||||
trackobj = GES_TRACK_OBJECT (trackobjects->data);
|
||||
gnlobj = trackobj->gnlobject;
|
||||
|
||||
g_object_get (gnlobj, "start", &start, "duration", &duration,
|
||||
|
@ -74,6 +76,12 @@ print_transition_data (GESTimelineObject * 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));
|
||||
}
|
||||
|
||||
g_list_free (trackobjects);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -61,11 +61,14 @@ print_transition_data (GESTimelineObject * tr)
|
|||
guint64 start, duration;
|
||||
gint priority;
|
||||
char *name;
|
||||
GList *trackobjects, *tmp;
|
||||
|
||||
if (!tr)
|
||||
return FALSE;
|
||||
|
||||
trackobj = GES_TRACK_OBJECT (tr->trackobjects->data);
|
||||
trackobjects = ges_timeline_object_get_track_objects (tr);
|
||||
|
||||
trackobj = GES_TRACK_OBJECT (trackobjects->data);
|
||||
gnlobj = trackobj->gnlobject;
|
||||
|
||||
g_object_get (gnlobj, "start", &start, "duration", &duration,
|
||||
|
@ -74,6 +77,12 @@ print_transition_data (GESTimelineObject * 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));
|
||||
}
|
||||
|
||||
g_list_free (trackobjects);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue