mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-10 03:19:40 +00:00
test-utils: add a create_and_monitor element function.
This commit is contained in:
parent
f001777cc6
commit
d747e1cd05
2 changed files with 18 additions and 0 deletions
|
@ -196,3 +196,20 @@ fake_demuxer_new (void)
|
|||
{
|
||||
return GST_ELEMENT (g_object_new (FAKE_DEMUXER_TYPE, NULL));
|
||||
}
|
||||
|
||||
GstElement * create_and_monitor_element (const gchar *factoryname, const gchar *name,
|
||||
GstValidateRunner *runner)
|
||||
{
|
||||
GstElement *element;
|
||||
GstValidateMonitor *monitor;
|
||||
|
||||
element = gst_element_factory_make (factoryname, name);
|
||||
if (runner) {
|
||||
monitor =
|
||||
gst_validate_monitor_factory_create (GST_OBJECT (element), runner, NULL);
|
||||
gst_validate_reporter_set_handle_g_logs (GST_VALIDATE_REPORTER (monitor));
|
||||
fail_unless (GST_IS_VALIDATE_ELEMENT_MONITOR (monitor));
|
||||
}
|
||||
|
||||
return element;
|
||||
}
|
||||
|
|
|
@ -31,6 +31,7 @@ void check_destroyed (gpointer object_to_unref, gpointer first_object, ...) G_GN
|
|||
GstValidateRunner * setup_runner (GstObject * object);
|
||||
void clean_bus (GstElement *element);
|
||||
GstValidatePadMonitor * get_pad_monitor (GstPad *pad);
|
||||
GstElement * create_and_monitor_element (const gchar *factoryname, const gchar *name, GstValidateRunner *runner);
|
||||
|
||||
typedef struct {
|
||||
GstElement parent;
|
||||
|
|
Loading…
Reference in a new issue