gstreamermm  1.10.0
Static Public Member Functions | List of all members
Gst::Parse Class Reference

A class that gets a pipeline from a text pipeline description. More...

#include <gstreamermm/parse.h>

Static Public Member Functions

static Glib::QueryQuark error_quark ()
 Get the error quark used by the parsing subsystem. More...
 
static Glib::RefPtr< Gst::Elementlaunch (const Glib::ustring& pipeline_description)
 Create a new pipeline based on command line syntax. More...
 
static Glib::RefPtr< Gst::Elementlaunchv (const gchar* argv[])
 Create a new element based on command line syntax. More...
 
static Glib::RefPtr< Gst::Elementcreate_bin (const Glib::ustring& bin_description, bool ghost_unconnected_pads)
 This is a convenience wrapper around launch() to create a Gst::Bin from a gst-launch-style pipeline description. More...
 

Detailed Description

A class that gets a pipeline from a text pipeline description.

The methods in this class allow to create a pipeline based on the syntax used in the gst-launch utillity.

Member Function Documentation

◆ create_bin()

static Glib::RefPtr<Gst::Element> Gst::Parse::create_bin ( const Glib::ustring &  bin_description,
bool  ghost_unconnected_pads 
)
static

This is a convenience wrapper around launch() to create a Gst::Bin from a gst-launch-style pipeline description.

See launch() and the gst-launch man page for details about the syntax. Ghost pads on the bin for unconnected source or sink pads within the bin can automatically be created (but only a maximum of one ghost pad for each direction will be created; if you expect multiple unconnected source pads or multiple unconnected sink pads and want them all ghosted, you will have to create the ghost pads yourself).

Parameters
bin_descriptionCommand line describing the bin.
ghost_unconnected_padsWhether to automatically create ghost pads for unconnected source or sink pads within the bin.
Returns
A newly-created bin, or a null RefPtr<> if an error occurred.
Exceptions
Gst::CoreError
Gst::ParseError

◆ error_quark()

static Glib::QueryQuark Gst::Parse::error_quark ( )
static

Get the error quark used by the parsing subsystem.

Returns
The quark of the parse errors.

◆ launch()

static Glib::RefPtr<Gst::Element> Gst::Parse::launch ( const Glib::ustring &  pipeline_description)
static

Create a new pipeline based on command line syntax.

Please note that you might get a return value that is not a null RefPtr<> even though the error is set. In this case there was a recoverable parsing error and you can try to play the pipeline.

Parameters
pipeline_descriptionThe command line describing the pipeline.
Returns
A new element on success, a null RefPtr<> on failure. If more than one toplevel element is specified by the pipeline_description, all elements are put into a Gst::Pipeline, which than is returned.
Exceptions
Gst::CoreError
Gst::ParseError

◆ launchv()

static Glib::RefPtr<Gst::Element> Gst::Parse::launchv ( const gchar *  argv[])
static

Create a new element based on command line syntax.

An error does not mean that the pipeline could not be constructed.

Parameters
argvnull-terminated array of arguments. specified.
Returns
A new element on success and null on failure.
Exceptions
Gst::CoreError
Gst::ParseError