mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-09-03 10:43:55 +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-timeline-source.h"
|
||||||
#include "ges-track-filesource.h"
|
#include "ges-track-filesource.h"
|
||||||
#include "ges-track-image-source.h"
|
#include "ges-track-image-source.h"
|
||||||
|
#include "ges-track-audio-test-source.h"
|
||||||
|
|
||||||
G_DEFINE_TYPE (GESTimelineFileSource, ges_tl_filesource,
|
G_DEFINE_TYPE (GESTimelineFileSource, ges_tl_filesource,
|
||||||
GES_TYPE_TIMELINE_SOURCE);
|
GES_TYPE_TIMELINE_SOURCE);
|
||||||
|
@ -246,12 +247,12 @@ ges_tl_filesource_create_track_object (GESTimelineObject * obj,
|
||||||
|
|
||||||
if (tfs->is_image) {
|
if (tfs->is_image) {
|
||||||
if (track->type != GES_TRACK_TYPE_VIDEO) {
|
if (track->type != GES_TRACK_TYPE_VIDEO) {
|
||||||
GST_DEBUG ("Object is still image, not creating non-video tracks");
|
GST_DEBUG ("Object is still image, creating silent audio source");
|
||||||
return NULL;
|
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 {
|
else {
|
||||||
|
|
|
@ -174,11 +174,11 @@ GST_START_TEST (test_filesource_images)
|
||||||
ges_track_remove_object (v, trobj);
|
ges_track_remove_object (v, trobj);
|
||||||
ges_timeline_object_release_track_object (tlobj, trobj);
|
ges_timeline_object_release_track_object (tlobj, trobj);
|
||||||
|
|
||||||
/* the timeline object should not create an audio source when is-image is set
|
/* the timeline object should create an audio test source when the is_image
|
||||||
* to true */
|
* property is set true */
|
||||||
|
|
||||||
trobj = ges_timeline_object_create_track_object (tlobj, a);
|
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 (a);
|
||||||
g_object_unref (v);
|
g_object_unref (v);
|
||||||
|
|
Loading…
Reference in a new issue