mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
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:
parent
10b6765fba
commit
11c7d60dbb
1 changed files with 7 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue