create image sources when is_image is set to true

This commit is contained in:
Brandon Lewis 2010-08-09 13:26:20 +02:00 committed by Edward Hervey
parent e38cf5a3ad
commit f9bb4b274c

View file

@ -30,6 +30,7 @@
#include "ges-timeline-file-source.h" #include "ges-timeline-file-source.h"
#include "ges-timeline-source.h" #include "ges-timeline-source.h"
#include "ges-track-filesource.h" #include "ges-track-filesource.h"
#include "ges-track-image-source.h"
G_DEFINE_TYPE (GESTimelineFileSource, ges_tl_filesource, G_DEFINE_TYPE (GESTimelineFileSource, ges_tl_filesource,
GES_TYPE_TIMELINE_SOURCE); GES_TYPE_TIMELINE_SOURCE);
@ -243,6 +244,17 @@ ges_tl_filesource_create_track_object (GESTimelineObject * obj,
return NULL; return NULL;
} }
if (tfs->is_image) {
if (track->type != GES_TRACK_TYPE_VIDEO) {
GST_DEBUG ("Object is still image, not creating non-video tracks");
return NULL;
}
GST_DEBUG ("Creating a GESTrackImageSource");
res = (GESTrackObject *) ges_track_image_source_new (tfs->uri);
}
else {
GST_DEBUG ("Creating a GESTrackFileSource"); GST_DEBUG ("Creating a GESTrackFileSource");
/* FIXME : Implement properly ! */ /* FIXME : Implement properly ! */
@ -251,6 +263,7 @@ ges_tl_filesource_create_track_object (GESTimelineObject * obj,
/* If mute and track is audio, deactivate the track object */ /* If mute and track is audio, deactivate the track object */
if (track->type == GES_TRACK_TYPE_AUDIO && tfs->mute) if (track->type == GES_TRACK_TYPE_AUDIO && tfs->mute)
ges_track_object_set_active (res, FALSE); ges_track_object_set_active (res, FALSE);
}
return res; return res;
} }