pitivi-formatter: Make use of the Formatter:timeline protected field

This commit is contained in:
Thibault Saunier 2012-07-01 19:39:57 -04:00
parent 76c7ba5264
commit 2d13b12878

View file

@ -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");