From 2d13b12878eec52251e4af4a78d3f743f6f2fbc0 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Sun, 1 Jul 2012 19:39:57 -0400 Subject: [PATCH] pitivi-formatter: Make use of the Formatter:timeline protected field --- ges/ges-pitivi-formatter.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/ges/ges-pitivi-formatter.c b/ges/ges-pitivi-formatter.c index b12387ab4a..2abc06a9d0 100644 --- a/ges/ges-pitivi-formatter.c +++ b/ges/ges-pitivi-formatter.c @@ -560,7 +560,7 @@ create_tracks (GESFormatter * self) GESPitiviFormatterPrivate *priv = GES_PITIVI_FORMATTER (self)->priv; GList *tracks = NULL; - tracks = ges_timeline_get_tracks (priv->timeline); + tracks = ges_timeline_get_tracks (self->timeline); GST_DEBUG ("Creating tracks, current number of tracks %d", g_list_length (tracks)); @@ -584,11 +584,11 @@ create_tracks (GESFormatter * self) priv->tracka = ges_track_audio_raw_new (); priv->trackv = ges_track_video_raw_new (); - if (!ges_timeline_add_track (priv->timeline, priv->trackv)) { + if (!ges_timeline_add_track (self->timeline, priv->trackv)) { return FALSE; } - if (!ges_timeline_add_track (priv->timeline, priv->tracka)) { + if (!ges_timeline_add_track (self->timeline, priv->tracka)) { return FALSE; } @@ -811,7 +811,7 @@ track_object_added_cb (GESTimelineObject * object, GESFormatterClass *klass = GES_FORMATTER_GET_CLASS (formatter); klass->project_loaded (GES_FORMATTER (formatter), - formatter->priv->timeline); + GES_FORMATTER (formatter)->timeline); } } @@ -1068,7 +1068,6 @@ load_pitivi_file_from_uri (GESFormatter * self, g_object_set (layer, "auto-transition", TRUE, NULL); g_hash_table_insert (priv->layers_table, prio, layer); - priv->timeline = timeline; g_object_set (layer, "priority", (gint32) 0, NULL); if (!ges_timeline_add_layer (timeline, layer)) { @@ -1109,7 +1108,7 @@ load_pitivi_file_from_uri (GESFormatter * self, if (!g_hash_table_size (priv->timeline_objects_table)) { GESFormatterClass *klass = GES_FORMATTER_GET_CLASS (self); - klass->project_loaded (self, GES_PITIVI_FORMATTER (self)->priv->timeline); + klass->project_loaded (self, self->timeline); } else { if (!make_timeline_objects (self)) { GST_ERROR ("Couldn't deserialise the project properly");