Merge branch '0.10'

Conflicts:
	bindings/python/ges.defs
This commit is contained in:
Thibault Saunier 2012-03-29 12:55:44 -04:00
commit 1728704d09
9 changed files with 84 additions and 11 deletions

View file

@ -58,6 +58,7 @@ ges_track_set_caps
ges_track_get_caps
ges_track_enable_update
ges_track_get_objects
ges_track_is_updating
<SUBSECTION Standard>
GESTrackClass
GESTrackPrivate
@ -250,6 +251,7 @@ ges_timeline_remove_track
ges_timeline_load_from_uri
ges_timeline_save_to_uri
ges_timeline_enable_update
ges_timeline_is_updating
<SUBSECTION usage>
ges_timeline_get_tracks
ges_timeline_get_layers
@ -278,6 +280,7 @@ ges_timeline_layer_remove_object
ges_timeline_layer_set_priority
ges_timeline_layer_get_priority
ges_timeline_layer_get_objects
ges_timeline_layer_get_timeline
ges_timeline_layer_get_auto_transition
ges_timeline_layer_set_auto_transition
<SUBSECTION Standard>

View file

@ -231,6 +231,23 @@ ges_timeline_layer_new (void)
return g_object_new (GES_TYPE_TIMELINE_LAYER, NULL);
}
/**
* ges_timeline_layer_get_timeline:
* @layer: The #GESTimelineLayer to get the parent #GESTimeline from
*
* Get the #GESTimeline in which #GESTimelineLayer currently is.
*
* Returns: (transfer none): the #GESTimeline in which #GESTimelineLayer
* currently is or %NULL if not in any timeline yet.
*/
GESTimeline *
ges_timeline_layer_get_timeline (GESTimelineLayer * layer)
{
g_return_val_if_fail (GES_IS_TIMELINE_LAYER (layer), NULL);
return layer->timeline;
}
void
ges_timeline_layer_set_timeline (GESTimelineLayer * layer,
GESTimeline * timeline)

View file

@ -95,7 +95,12 @@ GESTimelineLayer* ges_timeline_layer_new (void);
void ges_timeline_layer_set_timeline (GESTimelineLayer * layer,
GESTimeline * timeline);
GESTimeline *
ges_timeline_layer_get_timeline (GESTimelineLayer * layer);
gboolean ges_timeline_layer_add_object (GESTimelineLayer * layer,
GESTimelineObject * object);
gboolean ges_timeline_layer_remove_object (GESTimelineLayer * layer,
GESTimelineObject * object);

View file

@ -471,9 +471,10 @@ ges_timeline_object_create_track_objects_func (GESTimelineObject * object,
GST_DEBUG ("Did not create track object");
return FALSE;
}
ges_track_object_set_timeline_object (result, object);
ret = ges_track_add_object (track, result);
ges_timeline_object_add_track_object (object, result);
return ret;
}
@ -648,6 +649,7 @@ ges_timeline_object_release_track_object (GESTimelineObject * object,
if (GES_IS_TRACK_EFFECT (trackobject)) {
/* emit 'object-removed' */
object->priv->nb_effects--;
g_signal_emit (object, ges_timeline_object_signals[EFFECT_REMOVED], 0,
GES_TRACK_EFFECT (trackobject));
} else

View file

@ -1202,6 +1202,29 @@ ges_timeline_get_layers (GESTimeline * timeline)
return res;
}
/**
* ges_timeline_is_updating:
* @timeline: a #GESTimeline
*
* Get whether the timeline is updated for every change happening within or not.
*
* Returns: %TRUE if @timeline is updating on every changes, else %FALSE.
*/
gboolean
ges_timeline_is_updating (GESTimeline * timeline)
{
GList *tmp;
g_return_val_if_fail (GES_IS_TIMELINE (timeline), FALSE);
for (tmp = timeline->priv->tracks; tmp; tmp = tmp->next) {
if (!ges_track_is_updating (((TrackPrivate *) tmp->data)->track))
return FALSE;
}
return TRUE;
}
/**
* ges_timeline_enable_update:
* @timeline: a #GESTimeline

View file

@ -100,6 +100,7 @@ GESTrack * ges_timeline_get_track_for_pad (GESTimeline *timeline, GstPad *pad);
GList *ges_timeline_get_tracks (GESTimeline *timeline);
gboolean ges_timeline_enable_update(GESTimeline * timeline, gboolean enabled);
gboolean ges_timeline_is_updating (GESTimeline * timeline);
G_END_DECLS

View file

@ -727,7 +727,7 @@ ensure_gnl_object (GESTrackObject * object)
GESTrackObjectClass *class;
GstElement *gnlobject;
GHashTable *props_hash;
gboolean res = FALSE;
gboolean res = TRUE;
if (object->priv->gnlobject && object->priv->valid)
return FALSE;
@ -759,9 +759,12 @@ ensure_gnl_object (GESTrackObject * object)
if (gnlobject) {
GST_DEBUG ("Got a valid GnlObject, now filling it in");
res =
ges_timeline_object_fill_track_object (object->priv->timelineobj,
object, object->priv->gnlobject);
if (object->priv->timelineobj)
res = ges_timeline_object_fill_track_object (object->priv->timelineobj,
object, object->priv->gnlobject);
else
res = TRUE;
if (res) {
/* Connect to property notifications */
/* FIXME : remember the signalids so we can remove them later on !!! */

View file

@ -47,6 +47,8 @@ struct _GESTrackPrivate
GstElement *composition; /* The composition associated with this track */
GstElement *background; /* The backgrond, handle the gaps in the track */
GstPad *srcpad; /* The source GhostPad */
gboolean updating;
};
enum
@ -283,6 +285,7 @@ ges_track_init (GESTrack * self)
GES_TYPE_TRACK, GESTrackPrivate);
self->priv->composition = gst_element_factory_make ("gnlcomposition", NULL);
self->priv->updating = TRUE;
g_signal_connect (G_OBJECT (self->priv->composition), "notify::duration",
G_CALLBACK (composition_duration_cb), self);
@ -710,13 +713,28 @@ ges_track_enable_update (GESTrack * track, gboolean enabled)
{
gboolean update;
g_object_set (track->priv->composition, "update", enabled, NULL);
g_return_val_if_fail (GES_IS_TRACK (track), FALSE);
g_object_set (track->priv->composition, "update", enabled, NULL);
g_object_get (track->priv->composition, "update", &update, NULL);
if (update == enabled) {
return TRUE;
} else {
return FALSE;
}
track->priv->updating = update;
return update == enabled;
}
/**
* ges_track_is_updating:
* @track: a #GESTrack
*
* Get whether the track is updated for every change happening within or not.
*
* Returns: %TRUE if @track is updating on every changes, else %FALSE.
*/
gboolean
ges_track_is_updating (GESTrack * track)
{
g_return_val_if_fail (GES_IS_TRACK (track), FALSE);
return track->priv->updating;
}

View file

@ -103,6 +103,7 @@ GESTrack *ges_track_video_raw_new (void);
GESTrack *ges_track_audio_raw_new (void);
gboolean ges_track_enable_update (GESTrack * track, gboolean enabled);
gboolean ges_track_is_updating (GESTrack * track);
GList* ges_track_get_objects (GESTrack *track);