mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 10:11:08 +00:00
create GESTrackAudioTestSource for audio tracks when is-image is true
This commit is contained in:
parent
56c26dd853
commit
fe54413811
2 changed files with 9 additions and 8 deletions
|
@ -31,6 +31,7 @@
|
|||
#include "ges-timeline-source.h"
|
||||
#include "ges-track-filesource.h"
|
||||
#include "ges-track-image-source.h"
|
||||
#include "ges-track-audio-test-source.h"
|
||||
|
||||
G_DEFINE_TYPE (GESTimelineFileSource, ges_tl_filesource,
|
||||
GES_TYPE_TIMELINE_SOURCE);
|
||||
|
@ -246,12 +247,12 @@ ges_tl_filesource_create_track_object (GESTimelineObject * obj,
|
|||
|
||||
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 ("Object is still image, creating silent audio source");
|
||||
res = (GESTrackObject *) ges_track_audio_test_source_new ();
|
||||
} else {
|
||||
GST_DEBUG ("Creating a GESTrackImageSource");
|
||||
res = (GESTrackObject *) ges_track_image_source_new (tfs->uri);
|
||||
}
|
||||
|
||||
GST_DEBUG ("Creating a GESTrackImageSource");
|
||||
res = (GESTrackObject *) ges_track_image_source_new (tfs->uri);
|
||||
}
|
||||
|
||||
else {
|
||||
|
|
|
@ -174,11 +174,11 @@ GST_START_TEST (test_filesource_images)
|
|||
ges_track_remove_object (v, trobj);
|
||||
ges_timeline_object_release_track_object (tlobj, trobj);
|
||||
|
||||
/* the timeline object should not create an audio source when is-image is set
|
||||
* to true */
|
||||
/* the timeline object should create an audio test source when the is_image
|
||||
* property is set true */
|
||||
|
||||
trobj = ges_timeline_object_create_track_object (tlobj, a);
|
||||
fail_if (trobj);
|
||||
fail_unless (GES_IS_TRACK_AUDIO_TEST_SOURCE (trobj));
|
||||
|
||||
g_object_unref (a);
|
||||
g_object_unref (v);
|
||||
|
|
Loading…
Reference in a new issue