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,14 +244,26 @@ ges_tl_filesource_create_track_object (GESTimelineObject * obj,
return NULL; return NULL;
} }
GST_DEBUG ("Creating a GESTrackFileSource"); if (tfs->is_image) {
if (track->type != GES_TRACK_TYPE_VIDEO) {
GST_DEBUG ("Object is still image, not creating non-video tracks");
return NULL;
}
/* FIXME : Implement properly ! */ GST_DEBUG ("Creating a GESTrackImageSource");
res = (GESTrackObject *) ges_track_filesource_new (tfs->uri); res = (GESTrackObject *) ges_track_image_source_new (tfs->uri);
}
/* If mute and track is audio, deactivate the track object */ else {
if (track->type == GES_TRACK_TYPE_AUDIO && tfs->mute) GST_DEBUG ("Creating a GESTrackFileSource");
ges_track_object_set_active (res, FALSE);
/* FIXME : Implement properly ! */
res = (GESTrackObject *) ges_track_filesource_new (tfs->uri);
/* If mute and track is audio, deactivate the track object */
if (track->type == GES_TRACK_TYPE_AUDIO && tfs->mute)
ges_track_object_set_active (res, FALSE);
}
return res; return res;
} }