GstParse

These function allow to create a pipeline based on the syntax used in the gst-launch-1.0 utility (see man-page for syntax documentation).

Please note that these functions take several measures to create somewhat dynamic pipelines. Due to that such pipelines are not always reusable (set the state to NULL and back to PLAYING).

GstParseContext

Opaque structure.


Gst.ParseContext

Opaque structure.


Gst.ParseContext

Opaque structure.


Constructors

gst_parse_context_new

GstParseContext *
gst_parse_context_new ()

Allocates a parse context for use with gst_parse_launch_full or gst_parse_launchv_full.

Free-function: gst_parse_context_free

Returns ( [transfer: full][nullable])

a newly-allocated parse context. Free with gst_parse_context_free when no longer needed.


Gst.ParseContext.prototype.new

function Gst.ParseContext.prototype.new(): {
    // javascript wrapper for 'gst_parse_context_new'
}

Allocates a parse context for use with Gst.prototype.parse_launch_full or Gst.prototype.parse_launchv_full.

Free-function: gst_parse_context_free

Returns (Gst.ParseContext)

a newly-allocated parse context. Free with Gst.ParseContext.prototype.free when no longer needed.


Gst.ParseContext.new

def Gst.ParseContext.new ():
    #python wrapper for 'gst_parse_context_new'

Allocates a parse context for use with Gst.parse_launch_full or Gst.parse_launchv_full.

Free-function: gst_parse_context_free

Returns (Gst.ParseContext)

a newly-allocated parse context. Free with Gst.ParseContext.free when no longer needed.


Methods

gst_parse_context_copy

GstParseContext *
gst_parse_context_copy (const GstParseContext * context)

Copies the context.

Parameters:

context

a GstParseContext

Returns ( [transfer: full][nullable])

A copied GstParseContext

Since : 1.12.1


Gst.ParseContext.prototype.copy

function Gst.ParseContext.prototype.copy(): {
    // javascript wrapper for 'gst_parse_context_copy'
}

Copies the context.

Parameters:

Returns (Gst.ParseContext)

A copied Gst.ParseContext

Since : 1.12.1


Gst.ParseContext.copy

def Gst.ParseContext.copy (self):
    #python wrapper for 'gst_parse_context_copy'

Copies the context.

Parameters:

Returns (Gst.ParseContext)

A copied Gst.ParseContext

Since : 1.12.1


gst_parse_context_free

gst_parse_context_free (GstParseContext * context)

Frees a parse context previously allocated with gst_parse_context_new.

Parameters:

context ( [transfer: full])

a GstParseContext


Gst.ParseContext.prototype.free

function Gst.ParseContext.prototype.free(): {
    // javascript wrapper for 'gst_parse_context_free'
}

Frees a parse context previously allocated with Gst.ParseContext.prototype.new.

Parameters:


Gst.ParseContext.free

def Gst.ParseContext.free (self):
    #python wrapper for 'gst_parse_context_free'

Frees a parse context previously allocated with Gst.ParseContext.new.

Parameters:


gst_parse_context_get_missing_elements

gchar **
gst_parse_context_get_missing_elements (GstParseContext * context)

Retrieve missing elements from a previous run of gst_parse_launch_full or gst_parse_launchv_full. Will only return results if an error code of GST_PARSE_ERROR_NO_SUCH_ELEMENT was returned.

Parameters:

context

a GstParseContext

Returns ( [transfer: full][arrayzero-terminated=1][element-typegchar*][nullable])

a NULL-terminated array of element factory name strings of missing elements. Free with g_strfreev when no longer needed.


Gst.ParseContext.prototype.get_missing_elements

function Gst.ParseContext.prototype.get_missing_elements(): {
    // javascript wrapper for 'gst_parse_context_get_missing_elements'
}

Retrieve missing elements from a previous run of Gst.prototype.parse_launch_full or Gst.prototype.parse_launchv_full. Will only return results if an error code of Gst.ParseError.NO_SUCH_ELEMENT was returned.

Parameters:

Returns ([ String ])

a null-terminated array of element factory name strings of missing elements. Free with GLib.prototype.strfreev when no longer needed.


Gst.ParseContext.get_missing_elements

def Gst.ParseContext.get_missing_elements (self):
    #python wrapper for 'gst_parse_context_get_missing_elements'

Retrieve missing elements from a previous run of Gst.parse_launch_full or Gst.parse_launchv_full. Will only return results if an error code of Gst.ParseError.NO_SUCH_ELEMENT was returned.

Parameters:

Returns ([ str ])

a None-terminated array of element factory name strings of missing elements. Free with GLib.strfreev when no longer needed.


Functions

gst_parse_error_quark

GQuark
gst_parse_error_quark ()

Get the error quark used by the parsing subsystem.

Returns

the quark of the parse errors.


Gst.prototype.parse_error_quark

function Gst.prototype.parse_error_quark(): {
    // javascript wrapper for 'gst_parse_error_quark'
}

Get the error quark used by the parsing subsystem.

Returns (GLib.Quark)

the quark of the parse errors.


Gst.parse_error_quark

def Gst.parse_error_quark ():
    #python wrapper for 'gst_parse_error_quark'

Get the error quark used by the parsing subsystem.

Returns (GLib.Quark)

the quark of the parse errors.


gst_parse_launch

GstElement *
gst_parse_launch (const gchar * pipeline_description,
                  GError ** error)

Create a new pipeline based on command line syntax. Please note that 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.

To create a sub-pipeline (bin) for embedding into an existing pipeline use gst_parse_bin_from_description.

Parameters:

pipeline_description

the command line describing the pipeline

error

the error message in case of an erroneous pipeline.

Returns ( [transfer: floating])

a new element on success, NULL on failure. If more than one toplevel element is specified by the pipeline_description, all elements are put into a GstPipeline, which than is returned.


Gst.prototype.parse_launch

function Gst.prototype.parse_launch(pipeline_description: String): {
    // javascript wrapper for 'gst_parse_launch'
}

Create a new pipeline based on command line syntax. Please note that 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.

To create a sub-pipeline (bin) for embedding into an existing pipeline use Gst.prototype.parse_bin_from_description.

Parameters:

pipeline_description (String)

the command line describing the pipeline

Returns (Gst.Element)

a new element on success, null 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.


Gst.parse_launch

@raises(GLib.GError)
def Gst.parse_launch (pipeline_description):
    #python wrapper for 'gst_parse_launch'

Create a new pipeline based on command line syntax. Please note that you might get a return value that is not None even though the error is set. In this case there was a recoverable parsing error and you can try to play the pipeline.

To create a sub-pipeline (bin) for embedding into an existing pipeline use Gst.parse_bin_from_description.

Parameters:

pipeline_description (str)

the command line describing the pipeline

Returns (Gst.Element)

a new element on success, None 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.


gst_parse_launch_full

GstElement *
gst_parse_launch_full (const gchar * pipeline_description,
                       GstParseContext * context,
                       GstParseFlags flags,
                       GError ** error)

Create a new pipeline based on command line syntax. Please note that 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.

To create a sub-pipeline (bin) for embedding into an existing pipeline use gst_parse_bin_from_description_full.

Parameters:

pipeline_description

the command line describing the pipeline

context ( [nullable])

a parse context allocated with gst_parse_context_new, or NULL

flags

parsing options, or GST_PARSE_FLAG_NONE

error

the error message in case of an erroneous pipeline.

Returns ( [transfer: floating])

a new element on success, NULL on failure. If more than one toplevel element is specified by the pipeline_description, all elements are put into a GstPipeline, which then is returned (unless the GST_PARSE_FLAG_PLACE_IN_BIN flag is set, in which case they are put in a GstBin instead).


Gst.prototype.parse_launch_full

function Gst.prototype.parse_launch_full(pipeline_description: String, context: Gst.ParseContext, flags: Gst.ParseFlags): {
    // javascript wrapper for 'gst_parse_launch_full'
}

Create a new pipeline based on command line syntax. Please note that 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.

To create a sub-pipeline (bin) for embedding into an existing pipeline use Gst.prototype.parse_bin_from_description_full.

Parameters:

pipeline_description (String)

the command line describing the pipeline

context (Gst.ParseContext)

a parse context allocated with Gst.ParseContext.prototype.new, or null

flags (Gst.ParseFlags)

parsing options, or Gst.ParseFlags.NONE

Returns (Gst.Element)

a new element on success, null on failure. If more than one toplevel element is specified by the pipeline_description, all elements are put into a Gst.Pipeline, which then is returned (unless the GST_PARSE_FLAG_PLACE_IN_BIN flag is set, in which case they are put in a Gst.Bin instead).


Gst.parse_launch_full

@raises(GLib.GError)
def Gst.parse_launch_full (pipeline_description, context, flags):
    #python wrapper for 'gst_parse_launch_full'

Create a new pipeline based on command line syntax. Please note that you might get a return value that is not None even though the error is set. In this case there was a recoverable parsing error and you can try to play the pipeline.

To create a sub-pipeline (bin) for embedding into an existing pipeline use Gst.parse_bin_from_description_full.

Parameters:

pipeline_description (str)

the command line describing the pipeline

context (Gst.ParseContext)

a parse context allocated with Gst.ParseContext.new, or None

flags (Gst.ParseFlags)

parsing options, or Gst.ParseFlags.NONE

Returns (Gst.Element)

a new element on success, None on failure. If more than one toplevel element is specified by the pipeline_description, all elements are put into a Gst.Pipeline, which then is returned (unless the GST_PARSE_FLAG_PLACE_IN_BIN flag is set, in which case they are put in a Gst.Bin instead).


gst_parse_launchv

GstElement *
gst_parse_launchv (const gchar ** argv,
                   GError ** error)

Create a new element based on command line syntax. error will contain an error message if an erroneous pipeline is specified. An error does not mean that the pipeline could not be constructed.

Parameters:

argv ( [in][arrayzero-terminated=1])

null-terminated array of arguments

error

pointer to a GError

Returns ( [transfer: floating])

a new element on success and NULL on failure.


Gst.prototype.parse_launchv

function Gst.prototype.parse_launchv(argv: [ String ]): {
    // javascript wrapper for 'gst_parse_launchv'
}

Create a new element based on command line syntax. error will contain an error message if an erroneous pipeline is specified. An error does not mean that the pipeline could not be constructed.

Parameters:

argv ([ String ])

null-terminated array of arguments

Returns (Gst.Element)

a new element on success and null on failure.


Gst.parse_launchv

@raises(GLib.GError)
def Gst.parse_launchv (argv):
    #python wrapper for 'gst_parse_launchv'

Create a new element based on command line syntax. error will contain an error message if an erroneous pipeline is specified. An error does not mean that the pipeline could not be constructed.

Parameters:

argv ([ str ])

null-terminated array of arguments

Returns (Gst.Element)

a new element on success and None on failure.


gst_parse_launchv_full

GstElement *
gst_parse_launchv_full (const gchar ** argv,
                        GstParseContext * context,
                        GstParseFlags flags,
                        GError ** error)

Create a new element based on command line syntax. error will contain an error message if an erroneous pipeline is specified. An error does not mean that the pipeline could not be constructed.

Parameters:

argv ( [in][arrayzero-terminated=1])

null-terminated array of arguments

context ( [nullable])

a parse context allocated with gst_parse_context_new, or NULL

flags

parsing options, or GST_PARSE_FLAG_NONE

error

pointer to a GError (which must be initialised to NULL)

Returns ( [transfer: floating])

a new element on success; on failure, either NULL or a partially-constructed bin or element will be returned and error will be set (unless you passed GST_PARSE_FLAG_FATAL_ERRORS in flags, then NULL will always be returned on failure)


Gst.prototype.parse_launchv_full

function Gst.prototype.parse_launchv_full(argv: [ String ], context: Gst.ParseContext, flags: Gst.ParseFlags): {
    // javascript wrapper for 'gst_parse_launchv_full'
}

Create a new element based on command line syntax. error will contain an error message if an erroneous pipeline is specified. An error does not mean that the pipeline could not be constructed.

Parameters:

argv ([ String ])

null-terminated array of arguments

context (Gst.ParseContext)

a parse context allocated with Gst.ParseContext.prototype.new, or null

flags (Gst.ParseFlags)

parsing options, or Gst.ParseFlags.NONE

Returns (Gst.Element)

a new element on success; on failure, either null or a partially-constructed bin or element will be returned and error will be set (unless you passed Gst.ParseFlags.FATAL_ERRORS in flags, then null will always be returned on failure)


Gst.parse_launchv_full

@raises(GLib.GError)
def Gst.parse_launchv_full (argv, context, flags):
    #python wrapper for 'gst_parse_launchv_full'

Create a new element based on command line syntax. error will contain an error message if an erroneous pipeline is specified. An error does not mean that the pipeline could not be constructed.

Parameters:

argv ([ str ])

null-terminated array of arguments

context (Gst.ParseContext)

a parse context allocated with Gst.ParseContext.new, or None

flags (Gst.ParseFlags)

parsing options, or Gst.ParseFlags.NONE

Returns (Gst.Element)

a new element on success; on failure, either None or a partially-constructed bin or element will be returned and error will be set (unless you passed Gst.ParseFlags.FATAL_ERRORS in flags, then None will always be returned on failure)


Enumerations

GstParseError

The different parsing errors that can occur.

Members
GST_PARSE_ERROR_SYNTAX (0) –

A syntax error occurred.

GST_PARSE_ERROR_NO_SUCH_ELEMENT (1) –

The description contained an unknown element

GST_PARSE_ERROR_NO_SUCH_PROPERTY (2) –

An element did not have a specified property

GST_PARSE_ERROR_LINK (3) –

There was an error linking two pads.

GST_PARSE_ERROR_COULD_NOT_SET_PROPERTY (4) –

There was an error setting a property

GST_PARSE_ERROR_EMPTY_BIN (5) –

An empty bin was specified.

GST_PARSE_ERROR_EMPTY (6) –

An empty description was specified

GST_PARSE_ERROR_DELAYED_LINK (7) –

A delayed link did not get resolved.


Gst.ParseError

The different parsing errors that can occur.

Members
Gst.ParseError.SYNTAX (0) –

A syntax error occurred.

Gst.ParseError.NO_SUCH_ELEMENT (1) –

The description contained an unknown element

Gst.ParseError.NO_SUCH_PROPERTY (2) –

An element did not have a specified property

Gst.ParseError.LINK (3) –

There was an error linking two pads.

Gst.ParseError.COULD_NOT_SET_PROPERTY (4) –

There was an error setting a property

Gst.ParseError.EMPTY_BIN (5) –

An empty bin was specified.

Gst.ParseError.EMPTY (6) –

An empty description was specified

Gst.ParseError.DELAYED_LINK (7) –

A delayed link did not get resolved.


Gst.ParseError

The different parsing errors that can occur.

Members
Gst.ParseError.SYNTAX (0) –

A syntax error occurred.

Gst.ParseError.NO_SUCH_ELEMENT (1) –

The description contained an unknown element

Gst.ParseError.NO_SUCH_PROPERTY (2) –

An element did not have a specified property

Gst.ParseError.LINK (3) –

There was an error linking two pads.

Gst.ParseError.COULD_NOT_SET_PROPERTY (4) –

There was an error setting a property

Gst.ParseError.EMPTY_BIN (5) –

An empty bin was specified.

Gst.ParseError.EMPTY (6) –

An empty description was specified

Gst.ParseError.DELAYED_LINK (7) –

A delayed link did not get resolved.


GstParseFlags

Parsing options.

Members
GST_PARSE_FLAG_NONE (0) –

Do not use any special parsing options.

GST_PARSE_FLAG_FATAL_ERRORS (1) –

Always return NULL when an error occurs (default behaviour is to return partially constructed bins or elements in some cases)

GST_PARSE_FLAG_NO_SINGLE_ELEMENT_BINS (2) –

If a bin only has a single element, just return the element.

GST_PARSE_FLAG_PLACE_IN_BIN (4) –

If more than one toplevel element is described by the pipeline description string, put them in a GstBin instead of a GstPipeline. (Since: 1.10)


Gst.ParseFlags

Parsing options.

Members
Gst.ParseFlags.NONE (0) –

Do not use any special parsing options.

Gst.ParseFlags.FATAL_ERRORS (1) –

Always return null when an error occurs (default behaviour is to return partially constructed bins or elements in some cases)

Gst.ParseFlags.NO_SINGLE_ELEMENT_BINS (2) –

If a bin only has a single element, just return the element.

Gst.ParseFlags.PLACE_IN_BIN (4) –

If more than one toplevel element is described by the pipeline description string, put them in a Gst.Bin instead of a Gst.Pipeline. (Since: 1.10)


Gst.ParseFlags

Parsing options.

Members
Gst.ParseFlags.NONE (0) –

Do not use any special parsing options.

Gst.ParseFlags.FATAL_ERRORS (1) –

Always return None when an error occurs (default behaviour is to return partially constructed bins or elements in some cases)

Gst.ParseFlags.NO_SINGLE_ELEMENT_BINS (2) –

If a bin only has a single element, just return the element.

Gst.ParseFlags.PLACE_IN_BIN (4) –

If more than one toplevel element is described by the pipeline description string, put them in a Gst.Bin instead of a Gst.Pipeline. (Since: 1.10)


Constants

GST_PARSE_ERROR

#define GST_PARSE_ERROR gst_parse_error_quark ()

Get access to the error quark of the parse subsystem.


The results of the search are