static GESExtractable *
ges_project_extract (GESAsset * project, GError ** error)
{
- GESTimeline *timeline = g_object_new (GES_TYPE_TIMELINE, NULL);
+ GESTimeline *timeline = ges_timeline_new ();
ges_extractable_set_asset (GES_EXTRACTABLE (timeline), GES_ASSET (project));
if (_load_project (GES_PROJECT (project), timeline, error))
/**
* GESProject::asset-added:
- * @project: the #GESProject
+ * @formatter: the #GESProject
* @asset: The #GESAsset that has been added to @project
*/
_signals[ASSET_ADDED_SIGNAL] =
/**
* GESProject::asset-removed:
- * @project: the #GESProject
+ * @formatter: the #GESProject
* @asset: The #GESAsset that has been removed from @project
*/
_signals[ASSET_REMOVED_SIGNAL] =
GESTimeline *
ges_timeline_new (void)
{
- GESProject *project = ges_project_new (NULL);
-
- return GES_TIMELINE (ges_asset_extract (GES_ASSET (project), NULL));
+ return g_object_new (GES_TYPE_TIMELINE, NULL);
}
/**
layer = ges_layer_new ();
fail_unless (layer != NULL);
- timeline = create_timeline_sync (FALSE);
+ timeline = ges_timeline_new ();
fail_unless (timeline != NULL);
fail_unless (ges_timeline_add_layer (timeline, layer));
fail_unless (ges_timeline_add_track (timeline, track));
ges_init ();
- timeline = create_timeline_sync (FALSE);
+ timeline = ges_timeline_new ();
layer = ges_layer_new ();
a = GES_TRACK (ges_audio_track_new ());
v = GES_TRACK (ges_video_track_new ());
layer = ges_layer_new ();
fail_unless (layer != NULL);
- timeline = create_timeline_sync (FALSE);
+ timeline = ges_timeline_new ();
fail_unless (timeline != NULL);
fail_unless (ges_timeline_add_layer (timeline, layer));
fail_unless (ges_timeline_add_track (timeline, track));
track = GES_TRACK (ges_audio_track_new ());
layer = ges_layer_new ();
- timeline = create_timeline_sync (FALSE);
+ timeline = ges_timeline_new ();
fail_unless (timeline != NULL);
fail_unless (ges_timeline_add_layer (timeline, layer));
fail_unless (ges_timeline_add_track (timeline, track));
/* Timeline and 1 Layer */
GST_DEBUG ("Create a timeline");
- timeline = create_timeline_sync (FALSE);
+ timeline = ges_timeline_new ();
fail_unless (timeline != NULL);
GST_DEBUG ("Create a layer");
/* Timeline and 1 Layer */
GST_DEBUG ("Create a timeline");
- timeline = create_timeline_sync (FALSE);
+ timeline = ges_timeline_new ();
fail_unless (timeline != NULL);
GST_DEBUG ("Create a layer");
/* Timeline and 1 Layer */
GST_DEBUG ("Create a timeline");
- timeline = create_timeline_sync (FALSE);
+ timeline = ges_timeline_new ();
fail_unless (timeline != NULL);
GST_DEBUG ("Create a layer");
/* Timeline and 1 Layer */
GST_DEBUG ("Create a timeline");
- timeline = create_timeline_sync (FALSE);
+ timeline = ges_timeline_new ();
fail_unless (timeline != NULL);
GST_DEBUG ("Create a layer");
/* Timeline and 1 Layer */
GST_DEBUG ("Create a timeline");
- timeline = create_timeline_sync (FALSE);
+ timeline = ges_timeline_new ();
fail_unless (timeline != NULL);
g_signal_connect (timeline, "select-tracks-for-object",
ges_init ();
layer = ges_layer_new ();
- timeline = create_timeline_sync (TRUE);
+ timeline = ges_timeline_new_audio_video ();
fail_unless (ges_timeline_add_layer (timeline, layer));
pipeline = ges_test_create_pipeline (timeline);
layer = ges_layer_new ();
fail_unless (layer != NULL);
- timeline = create_timeline_sync (FALSE);
+ timeline = ges_timeline_new ();
fail_unless (timeline != NULL);
fail_unless (ges_timeline_add_layer (timeline, layer));
fail_unless (ges_timeline_add_track (timeline, track));
layer = ges_layer_new ();
fail_unless (layer != NULL);
- timeline = create_timeline_sync (TRUE);
+ timeline = ges_timeline_new_audio_video ();
fail_unless (timeline != NULL);
fail_unless (ges_timeline_add_layer (timeline, layer));
ASSERT_OBJECT_REFCOUNT (timeline, "timeline", 1);
ges_init ();
- timeline = create_timeline_sync (FALSE);
+ timeline = ges_timeline_new ();
layer = ges_layer_new ();
audio_track = GES_TRACK (ges_audio_track_new ());
video_track = GES_TRACK (ges_video_track_new ());
ges_init ();
- timeline = create_timeline_sync (FALSE);
+ timeline = ges_timeline_new ();
layer = ges_layer_new ();
track_audio = GES_TRACK (ges_audio_track_new ());
track_video = GES_TRACK (ges_video_track_new ());
ges_init ();
- timeline = create_timeline_sync (FALSE);
+ timeline = ges_timeline_new ();
layer = ges_layer_new ();
track_video = GES_TRACK (ges_video_track_new ());
ges_init ();
- timeline = create_timeline_sync (FALSE);
+ timeline = ges_timeline_new ();
layer = ges_layer_new ();
track_audio = GES_TRACK (ges_audio_track_new ());
track_video = GES_TRACK (ges_video_track_new ());
GES_BASE_EFFECT (tmp->data));
fail_unless (priority > effect_prio);
fail_unless (GES_IS_EFFECT (tmp->data));
- fail_unless (ges_track_element_get_track (GES_TRACK_ELEMENT (tmp->
- data))->type == track_type[i]);
+ fail_unless (ges_track_element_get_track (GES_TRACK_ELEMENT (tmp->data))->
+ type == track_type[i]);
effect_prio = priority;
gst_object_unref (tmp->data);
ges_init ();
- timeline = create_timeline_sync (FALSE);
+ timeline = ges_timeline_new ();
layer = ges_layer_new ();
track_audio = GES_TRACK (ges_audio_track_new ());
track_video = GES_TRACK (ges_video_track_new ());
ges_init ();
- timeline = create_timeline_sync (FALSE);
+ timeline = ges_timeline_new ();
layer = ges_layer_new ();
track_video = GES_TRACK (ges_video_track_new ());
ges_init ();
- timeline = create_timeline_sync (FALSE);
+ timeline = ges_timeline_new ();
layer = ges_layer_new ();
track_video = GES_TRACK (ges_video_track_new ());
ges_init ();
- timeline = create_timeline_sync (TRUE);
+ timeline = ges_timeline_new_audio_video ();
layer = ges_timeline_append_layer (timeline);
layer1 = ges_timeline_append_layer (timeline);
ges_init ();
- timeline = create_timeline_sync (TRUE);
+ timeline = ges_timeline_new_audio_video ();
/* Our timeline
*
ges_init ();
/* Timeline and 1 Layer */
- timeline = create_timeline_sync (FALSE);
+ timeline = ges_timeline_new ();
layer = (GESLayer *) ges_layer_new ();
/* The default priority is 0 */
ges_init ();
/* Timeline and 3 Layer */
- timeline = create_timeline_sync (FALSE);
+ timeline = ges_timeline_new ();
layer1 = (GESLayer *) ges_layer_new ();
layer2 = (GESLayer *) ges_layer_new ();
layer3 = (GESLayer *) ges_layer_new ();
fail_unless (GES_IS_ASSET (asset));
GST_DEBUG ("Create timeline");
- timeline = create_timeline_sync (TRUE);
+ timeline = ges_timeline_new_audio_video ();
assert_is_type (timeline, GES_TYPE_TIMELINE);
GST_DEBUG ("Create layers");
fail_unless (GES_IS_ASSET (asset));
GST_DEBUG ("Create timeline");
- timeline = create_timeline_sync (TRUE);
+ timeline = ges_timeline_new_audio_video ();
assert_is_type (timeline, GES_TYPE_TIMELINE);
GST_DEBUG ("Create first layer");
fail_unless (GES_IS_ASSET (asset));
GST_DEBUG ("Create timeline");
- timeline = create_timeline_sync (TRUE);
+ timeline = ges_timeline_new_audio_video ();
assert_is_type (timeline, GES_TYPE_TIMELINE);
GST_DEBUG ("Create first layer");
fail_unless (GES_IS_ASSET (asset));
GST_DEBUG ("Create timeline");
- timeline = create_timeline_sync (TRUE);
+ timeline = ges_timeline_new_audio_video ();
assert_is_type (timeline, GES_TYPE_TIMELINE);
GST_DEBUG ("Append a layer to the timeline");
ges_init ();
- timeline = create_timeline_sync (TRUE);
+ timeline = ges_timeline_new_audio_video ();
layer = ges_layer_new ();
ges_timeline_add_layer (timeline, layer);
ges_init ();
- timeline = create_timeline_sync (TRUE);
+ timeline = ges_timeline_new_audio_video ();
layer = ges_layer_new ();
ges_timeline_add_layer (timeline, layer);
ges_init ();
- timeline = create_timeline_sync (TRUE);
+ timeline = ges_timeline_new_audio_video ();
layer = ges_layer_new ();
ges_timeline_add_layer (timeline, layer);
ges_init ();
- timeline = create_timeline_sync (TRUE);
+ timeline = ges_timeline_new_audio_video ();
layer = ges_layer_new ();
ges_timeline_add_layer (timeline, layer);
ges_init ();
- timeline = create_timeline_sync (TRUE);
+ timeline = ges_timeline_new_audio_video ();
layer = ges_layer_new ();
ges_timeline_add_layer (timeline, layer);
ges_init ();
- timeline = create_timeline_sync (TRUE);
+ timeline = ges_timeline_new_audio_video ();
layer = ges_layer_new ();
ges_timeline_add_layer (timeline, layer);
ges_init ();
- timeline = create_timeline_sync (TRUE);
+ timeline = ges_timeline_new_audio_video ();
layer = ges_layer_new ();
ges_timeline_add_layer (timeline, layer);
ges_init ();
- timeline = create_timeline_sync (TRUE);
+ timeline = ges_timeline_new_audio_video ();
layer = ges_layer_new ();
ges_timeline_add_layer (timeline, layer);
ges_init ();
- timeline = create_timeline_sync (TRUE);
+ timeline = ges_timeline_new_audio_video ();
layer = ges_layer_new ();
ges_timeline_add_layer (timeline, layer);
ges_init ();
- timeline = create_timeline_sync (TRUE);
+ timeline = ges_timeline_new_audio_video ();
layer = ges_layer_new ();
ges_timeline_add_layer (timeline, layer);
ges_init ();
- timeline = create_timeline_sync (TRUE);
+ timeline = ges_timeline_new_audio_video ();
layer = ges_layer_new ();
ges_timeline_add_layer (timeline, layer);
ges_init ();
- timeline = create_timeline_sync (TRUE);
+ timeline = ges_timeline_new_audio_video ();
layer = ges_layer_new ();
ges_timeline_add_layer (timeline, layer);
ges_init ();
- timeline = create_timeline_sync (TRUE);
+ timeline = ges_timeline_new_audio_video ();
layer = ges_layer_new ();
ges_timeline_add_layer (timeline, layer);
GstMessage *message;
GESLayer *layer, *layer1;
GESTrack *track = GES_TRACK (ges_audio_track_new ());
- GESTimeline *timeline = create_timeline_sync (FALSE);
+ GESTimeline *timeline = ges_timeline_new ();
GESPipeline *pipeline = ges_test_create_pipeline (timeline);
ges_timeline_add_track (timeline, track);
GESLayer *layer, *layer1;
GESTrack *track = GES_TRACK (ges_video_track_new ());
GESTrack *track_audio = GES_TRACK (ges_audio_track_new ());
- GESTimeline *timeline = create_timeline_sync (FALSE);
+ GESTimeline *timeline = ges_timeline_new ();
GESPipeline *pipeline = ges_test_create_pipeline (timeline);
ges_timeline_add_track (timeline, track);
fail_unless (track != NULL);
layer = ges_layer_new ();
fail_unless (layer != NULL);
- timeline = create_timeline_sync (FALSE);
+ timeline = ges_timeline_new ();
fail_unless (timeline != NULL);
fail_unless (ges_timeline_add_layer (timeline, layer));
fail_unless (ges_timeline_add_track (timeline, track));
ges_init ();
- timeline = create_timeline_sync (FALSE);
+ timeline = ges_timeline_new ();
layer = (GESLayer *) ges_layer_new ();
a = GES_TRACK (ges_audio_track_new ());
v = GES_TRACK (ges_video_track_new ());
return TRUE;
}
-
-static void
-_project_loaded_cb (GESProject * project, GESTimeline * timeline, GMainLoop * l)
-{
- GST_DEBUG_OBJECT (project, "Loaded");
- g_main_loop_quit (l);
-}
-
-GESTimeline *
-create_timeline_sync (gboolean audio_video)
-{
- GMainLoop *l;
- GESAsset *project;
- GESTimeline *timeline;
-
- if (audio_video)
- timeline = ges_timeline_new_audio_video ();
- else
- timeline = ges_timeline_new ();
-
- project = ges_extractable_get_asset (GES_EXTRACTABLE (timeline));
-
- l = g_main_loop_new (NULL, FALSE);
- g_signal_connect (project, "loaded", G_CALLBACK (_project_loaded_cb), l);
- g_main_loop_run (l);
- g_main_loop_unref (l);
-
- return timeline;
-}
gboolean
play_timeline (GESTimeline * timeline);
-
-/* This function is needed to avoid having an extra refcount when creating a blanck
- * timeline and while the project::loaded signal has not been emited, as this is
- * done on idle. This function will wait for that signal to be emited before
- * returning the new timeline*/
-GESTimeline * create_timeline_sync (gboolean audio_video);
-
#define gnl_object_check(gnlobj, start, duration, mstart, mduration, priority, active) { \
guint64 pstart, pdur, inpoint, pprio, pact; \
g_object_get (gnlobj, "start", &pstart, "duration", &pdur, \
ges_init ();
- timeline = create_timeline_sync (FALSE);
+ timeline = ges_timeline_new ();
layer = ges_layer_new ();
a = GES_TRACK (ges_audio_track_new ());
v = GES_TRACK (ges_video_track_new ());
track = GES_TRACK (ges_audio_track_new ());
fail_unless (track != NULL);
- timeline = create_timeline_sync (FALSE);
+ timeline = ges_timeline_new ();
fail_unless (timeline != NULL);
fail_unless (ges_timeline_add_track (timeline, track));
track = GES_TRACK (ges_video_track_new ());
fail_unless (track != NULL);
- timeline = create_timeline_sync (FALSE);
+ timeline = ges_timeline_new ();
fail_unless (timeline != NULL);
fail_unless (ges_timeline_add_track (timeline, track));
g_main_loop_run (mainloop);
/* the asset is now loaded */
- timeline = create_timeline_sync (TRUE);
+ timeline = ges_timeline_new_audio_video ();
assets = ges_project_list_assets (project, GES_TYPE_CLIP);
assert_equals_int (g_list_length (assets), 1);
track = GES_TRACK (ges_video_track_new ());
fail_unless (track != NULL);
- timeline = create_timeline_sync (FALSE);
+ timeline = ges_timeline_new ();
fail_unless (timeline != NULL);
fail_unless (ges_timeline_add_track (timeline, track));
ges_init ();
- timeline = create_timeline_sync (TRUE);
+ timeline = ges_timeline_new_audio_video ();
/* Our timeline
*
ges_init ();
- timeline = create_timeline_sync (TRUE);
+ timeline = ges_timeline_new_audio_video ();
g_object_set (timeline, "snapping-distance", (guint64) 3, NULL);
/* Our timeline
G_TYPE_INT, 1000, NULL);
ges_init ();
- timeline = create_timeline_sync (FALSE);
+ timeline = ges_timeline_new ();
ges_timeline_add_track (timeline, trackv);
layer = ges_layer_new ();
fail_unless (ges_timeline_add_layer (timeline, layer));
ges_init ();
- timeline = create_timeline_sync (FALSE);
track = GES_TRACK (ges_video_track_new ());
fail_unless (track != NULL);
layer = ges_layer_new ();
fail_unless (layer != NULL);
+ timeline = ges_timeline_new ();
fail_unless (timeline != NULL);
fail_unless (ges_timeline_add_layer (timeline, layer));
fail_unless (ges_timeline_add_track (timeline, track));
ges_init ();
- timeline = create_timeline_sync (FALSE);
+ timeline = ges_timeline_new ();
layer = ges_layer_new ();
a = GES_TRACK (ges_audio_track_new ());
v = GES_TRACK (ges_video_track_new ());
track = GES_TRACK (ges_video_track_new ());
layer = ges_layer_new ();
- timeline = create_timeline_sync (FALSE);
+ timeline = ges_timeline_new ();
fail_unless (track != NULL);
fail_unless (layer != NULL);
fail_unless (timeline != NULL);
track = GES_TRACK (ges_video_track_new ());
layer = ges_layer_new ();
- timeline = create_timeline_sync (FALSE);
+ timeline = ges_timeline_new ();
fail_unless (track != NULL);
fail_unless (layer != NULL);
fail_unless (timeline != NULL);
mainloop = g_main_loop_new (NULL, FALSE);
- timeline = create_timeline_sync (TRUE);
+ timeline = ges_timeline_new_audio_video ();
fail_unless (timeline != NULL);
layer = ges_layer_new ();
layer = ges_layer_new ();
fail_unless (layer != NULL);
- timeline = create_timeline_sync (FALSE);
+ timeline = ges_timeline_new ();
fail_unless (GES_IS_TIMELINE (timeline));
fail_unless (ges_timeline_add_layer (timeline, layer));
fail_unless (ges_timeline_add_track (timeline, track));
layer = ges_layer_new ();
fail_unless (layer != NULL);
- timeline = create_timeline_sync (FALSE);
+ timeline = ges_timeline_new ();
fail_unless (timeline != NULL);
fail_unless (ges_timeline_add_layer (timeline, layer));
fail_unless (ges_timeline_add_track (timeline, a));