mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-10 10:04:23 +00:00
tests: Make sure gst_bin_add succeeds
And detect when we're trying to add contents to a gnlsource which already has something
This commit is contained in:
parent
ef7eb9efdd
commit
a5261d23d2
4 changed files with 27 additions and 6 deletions
|
@ -39,7 +39,12 @@ my_fill_track_func (GESTimelineObject * object,
|
|||
|
||||
/* Let's just put a fakesource in for the time being */
|
||||
src = gst_element_factory_make ("fakesrc", NULL);
|
||||
return gst_bin_add (GST_BIN (gnlobj), src);
|
||||
|
||||
/* If this fails... that means that there already was something
|
||||
* in it */
|
||||
fail_unless (gst_bin_add (GST_BIN (gnlobj), src));
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
GST_START_TEST (test_ges_scenario)
|
||||
|
|
|
@ -31,7 +31,12 @@ my_fill_track_func (GESTimelineObject * object,
|
|||
|
||||
/* Let's just put a fakesource in for the time being */
|
||||
src = gst_element_factory_make ("fakesrc", NULL);
|
||||
return gst_bin_add (GST_BIN (gnlobj), src);
|
||||
|
||||
/* If this fails... that means that there already was something
|
||||
* in it */
|
||||
fail_unless (gst_bin_add (GST_BIN (gnlobj), src));
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#define gnl_object_check(gnlobj, start, duration, mstart, mduration, priority, active) { \
|
||||
|
|
|
@ -31,7 +31,12 @@ my_fill_track_func (GESTimelineObject * object,
|
|||
|
||||
/* Let's just put a fakesource in for the time being */
|
||||
src = gst_element_factory_make ("fakesrc", NULL);
|
||||
return gst_bin_add (GST_BIN (gnlobj), src);
|
||||
|
||||
/* If this fails... that means that there already was something
|
||||
* in it */
|
||||
fail_unless (gst_bin_add (GST_BIN (gnlobj), src));
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
@ -46,9 +51,11 @@ arbitrary_fill_track_func (GESTimelineObject * object,
|
|||
user_data, object, trobject, gnlobj);
|
||||
|
||||
/* interpret user_data as name of element to create */
|
||||
|
||||
src = gst_element_factory_make (user_data, NULL);
|
||||
gst_bin_add (GST_BIN (gnlobj), src);
|
||||
|
||||
/* If this fails... that means that there already was something
|
||||
* in it */
|
||||
fail_unless (gst_bin_add (GST_BIN (gnlobj), src));
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -31,7 +31,11 @@ my_fill_track_func (GESTimelineObject * object,
|
|||
|
||||
/* Let's just put a fakesource in for the time being */
|
||||
src = gst_element_factory_make ("fakesrc", NULL);
|
||||
return gst_bin_add (GST_BIN (gnlobj), src);
|
||||
/* If this fails... that means that there already was something
|
||||
* in it */
|
||||
fail_unless (gst_bin_add (GST_BIN (gnlobj), src));
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#define gnl_object_check(gnlobj, start, duration, mstart, mduration, priority, active) { \
|
||||
|
|
Loading…
Reference in a new issue