mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-06 23:48:53 +00:00
pitivi-formatter: Make use of the Formatter:timeline protected field
This commit is contained in:
parent
76c7ba5264
commit
2d13b12878
1 changed files with 5 additions and 6 deletions
|
@ -560,7 +560,7 @@ create_tracks (GESFormatter * self)
|
||||||
GESPitiviFormatterPrivate *priv = GES_PITIVI_FORMATTER (self)->priv;
|
GESPitiviFormatterPrivate *priv = GES_PITIVI_FORMATTER (self)->priv;
|
||||||
GList *tracks = NULL;
|
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",
|
GST_DEBUG ("Creating tracks, current number of tracks %d",
|
||||||
g_list_length (tracks));
|
g_list_length (tracks));
|
||||||
|
@ -584,11 +584,11 @@ create_tracks (GESFormatter * self)
|
||||||
priv->tracka = ges_track_audio_raw_new ();
|
priv->tracka = ges_track_audio_raw_new ();
|
||||||
priv->trackv = ges_track_video_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;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ges_timeline_add_track (priv->timeline, priv->tracka)) {
|
if (!ges_timeline_add_track (self->timeline, priv->tracka)) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -811,7 +811,7 @@ track_object_added_cb (GESTimelineObject * object,
|
||||||
GESFormatterClass *klass = GES_FORMATTER_GET_CLASS (formatter);
|
GESFormatterClass *klass = GES_FORMATTER_GET_CLASS (formatter);
|
||||||
|
|
||||||
klass->project_loaded (GES_FORMATTER (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_object_set (layer, "auto-transition", TRUE, NULL);
|
||||||
|
|
||||||
g_hash_table_insert (priv->layers_table, prio, layer);
|
g_hash_table_insert (priv->layers_table, prio, layer);
|
||||||
priv->timeline = timeline;
|
|
||||||
g_object_set (layer, "priority", (gint32) 0, NULL);
|
g_object_set (layer, "priority", (gint32) 0, NULL);
|
||||||
|
|
||||||
if (!ges_timeline_add_layer (timeline, layer)) {
|
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)) {
|
if (!g_hash_table_size (priv->timeline_objects_table)) {
|
||||||
GESFormatterClass *klass = GES_FORMATTER_GET_CLASS (self);
|
GESFormatterClass *klass = GES_FORMATTER_GET_CLASS (self);
|
||||||
|
|
||||||
klass->project_loaded (self, GES_PITIVI_FORMATTER (self)->priv->timeline);
|
klass->project_loaded (self, self->timeline);
|
||||||
} else {
|
} else {
|
||||||
if (!make_timeline_objects (self)) {
|
if (!make_timeline_objects (self)) {
|
||||||
GST_ERROR ("Couldn't deserialise the project properly");
|
GST_ERROR ("Couldn't deserialise the project properly");
|
||||||
|
|
Loading…
Reference in a new issue