summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/pipelines-launch.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/pipelines-launch.c b/src/pipelines-launch.c
index 003863b..d10318a 100644
--- a/src/pipelines-launch.c
+++ b/src/pipelines-launch.c
@@ -45,17 +45,17 @@
GstElement* create_pipeline(options_t* opt)
{
- GstElement *pipeline = gst_pipeline_new ("sydra-launch-receiver");
+ GError *error = NULL;
+ GstElement *pipeline = gst_parse_launch(opt->pipeline_, &error);
if(!pipeline) {
- log_printf(ERROR, "Creating pipeline failed!");
+ log_printf(WARNING, "pipeline description parser: %s", error ? error->message : "unknown");
+ g_error_free(error);
return NULL;
}
- GstElement *main = sydra_create_bin_from_desc("main", opt->pipeline_, TRUE);
- if(!main) {
- log_printf(ERROR, "Creating main pipeline failed!");
- return NULL;
+ if(error) {
+ log_printf(WARNING, "pipeline description parser: %s", error ? error->message : "unknown");
+ g_error_free(error);
}
- gst_bin_add(GST_BIN(pipeline), main);
log_printf(INFO, "pipeline created successfully!");
return pipeline;