From 4683b042f68c68cffd32699cdb0829ea1ac7c895 Mon Sep 17 00:00:00 2001 From: Brandon Lewis Date: Fri, 9 Jul 2010 18:26:56 +0200 Subject: [PATCH] override create_track_objects (plural) in TimelineSource --- ges/ges-timeline-source.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/ges/ges-timeline-source.c b/ges/ges-timeline-source.c index dc4db5c179..435d96ee4b 100644 --- a/ges/ges-timeline-source.c +++ b/ges/ges-timeline-source.c @@ -35,6 +35,10 @@ static GESTrackObject * ges_timeline_source_create_track_object (GESTimelineObject * obj, GESTrack * track); +static gboolean +ges_timeline_source_create_track_objects (GESTimelineObject * obj, + GESTrack * track); + static void ges_timeline_source_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) @@ -79,6 +83,8 @@ ges_timeline_source_class_init (GESTimelineSourceClass * klass) object_class->finalize = ges_timeline_source_finalize; timobj_class->create_track_object = ges_timeline_source_create_track_object; + + timobj_class->create_track_objects = ges_timeline_source_create_track_objects; } static void @@ -100,3 +106,19 @@ ges_timeline_source_create_track_object (GESTimelineObject * obj, /* FIXME : Implement properly ! */ return (GESTrackObject *) ges_track_source_new (); } + +static gboolean +ges_timeline_source_create_track_objects (GESTimelineObject * obj, + GESTrack * track) +{ + GESTrackObject *primary; + + /* calls add_track_object() for us. we already own this reference */ + primary = ges_timeline_object_create_track_object (obj, track); + if (!primary) { + GST_WARNING ("couldn't create primary track object"); + return FALSE; + } + + return ges_track_add_object (track, primary); +}