From 11c7d60dbb1150f5b7927ab370fe7d0028ab5a0f Mon Sep 17 00:00:00 2001 From: Robert Swain Date: Fri, 8 Apr 2011 17:58:42 +0200 Subject: [PATCH] gst-camerabin2-test: Allow gst-launch pipelines for sinks Use gst_parse_launch () to parse the sink strings to allow specification of properties to sinks and of more advanced sink graphs. --- tests/examples/camerabin2/gst-camerabin2-test.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/examples/camerabin2/gst-camerabin2-test.c b/tests/examples/camerabin2/gst-camerabin2-test.c index 49974d1b56..103668dce1 100644 --- a/tests/examples/camerabin2/gst-camerabin2-test.c +++ b/tests/examples/camerabin2/gst-camerabin2-test.c @@ -430,7 +430,9 @@ setup_pipeline_element (GstElement * element, const gchar * property_name, GstElement *elem = NULL; if (element_name) { - elem = gst_element_factory_make (element_name, NULL); + GError *error = NULL; + + elem = gst_parse_launch (element_name, &error); if (elem) { if (g_object_class_find_property (G_OBJECT_GET_CLASS (elem), "device")) { g_object_set (elem, "device", "/dev/video1", NULL); @@ -439,6 +441,10 @@ setup_pipeline_element (GstElement * element, const gchar * property_name, } else { GST_WARNING ("can't create element '%s' for property '%s'", element_name, property_name); + if (error) { + GST_ERROR ("%s", error->message); + g_error_free (error); + } res = FALSE; } } else {