Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/gscam.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,18 @@ namespace gscam {
pipeline_ = gst_parse_launch(gsconfig_.c_str(), &error);
if (pipeline_ == NULL) {
ROS_FATAL_STREAM( error->message );
g_error_free(error);
return false;
}

// https://gstreamer.freedesktop.org/documentation/gstreamer/gstparse.html?gi-language=c
// You might get a return value that is not NULL even though the error is set.
// In this case there was a recoverable parsing error and you can try to play the pipeline.
if (error != 0)
{
ROS_WARN_STREAM("Recoverable parsing error encountered: " << error->message);
g_error_free(error);
}

// Create RGB sink
sink_ = gst_element_factory_make("appsink",NULL);
Expand Down