gst-editing-services: ges: Do not add any audio source when still image
Thibault Saunier
tsaunier at kemper.freedesktop.org
Wed Jan 11 07:04:33 PST 2012
Module: gst-editing-services
Branch: master
Commit: 0c872c4340c7067747b346bb469a0c4fa7790332
URL: http://cgit.freedesktop.org/gstreamer/gst-editing-services/commit/?id=0c872c4340c7067747b346bb469a0c4fa7790332
Author: Thibault Saunier <thibault.saunier at collabora.com>
Date: Wed Nov 30 20:13:09 2011 -0300
ges: Do not add any audio source when still image
We now have a backgroud so no problem with that.
Fix the testsuite accordingly
Fix #657514
---
ges/ges-timeline-file-source.c | 4 ++--
tests/check/ges/filesource.c | 15 ++-------------
2 files changed, 4 insertions(+), 15 deletions(-)
diff --git a/ges/ges-timeline-file-source.c b/ges/ges-timeline-file-source.c
index e78d791..185e358 100644
--- a/ges/ges-timeline-file-source.c
+++ b/ges/ges-timeline-file-source.c
@@ -356,8 +356,8 @@ ges_timeline_filesource_create_track_object (GESTimelineObject * obj,
if (priv->is_image) {
if (track->type != GES_TRACK_TYPE_VIDEO) {
- GST_DEBUG ("Object is still image, creating silent audio source");
- res = (GESTrackObject *) ges_track_audio_test_source_new ();
+ GST_DEBUG ("Object is still image, not adding any audio source");
+ return NULL;
} else {
GST_DEBUG ("Creating a GESTrackImageSource");
res = (GESTrackObject *) ges_track_image_source_new (priv->uri);
diff --git a/tests/check/ges/filesource.c b/tests/check/ges/filesource.c
index fec5e93..76cedd5 100644
--- a/tests/check/ges/filesource.c
+++ b/tests/check/ges/filesource.c
@@ -187,20 +187,9 @@ GST_START_TEST (test_filesource_images)
ges_track_remove_object (v, trobj);
ges_timeline_object_release_track_object (tlobj, trobj);
- /* the timeline object should create an audio test source when the is_image
- * property is set true */
-
+ /* the timeline object should not create any TrackObject in the audio track */
trobj = ges_timeline_object_create_track_object (tlobj, a);
- ges_timeline_object_add_track_object (tlobj, trobj);
- fail_unless (GES_IS_TRACK_AUDIO_TEST_SOURCE (trobj));
-
- /* The track holds a reference to the object
- * And the timelineobject holds a reference to the object */
- ASSERT_OBJECT_REFCOUNT (trobj, "Audio Track Object", 2);
-
- ges_track_remove_object (v, trobj);
- ges_timeline_object_release_track_object (tlobj, trobj);
-
+ fail_unless (trobj == NULL);
g_object_unref (a);
g_object_unref (v);
More information about the gstreamer-commits
mailing list