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.
This commit is contained in:
Robert Swain 2011-04-08 17:58:42 +02:00 committed by Thiago Santos
parent 10b6765fba
commit 11c7d60dbb

View file

@ -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 {