gstlal  1.4.1
Functions
pipeutil.py File Reference

Go to the source code of this file.

Functions

def python.pipeutil.gstlal_element_register (clazz)
 
def python.pipeutil.mkelem (elemname, props={})
 
def python.pipeutil.mkelems_in_bin (bin, pipedesc)
 
def python.pipeutil.splice (bin, pad, element)
 

Function Documentation

◆ gstlal_element_register()

def python.pipeutil.gstlal_element_register (   clazz)
Class decorator for registering a Python element.  Note that decorator
syntax was extended from functions to classes in Python 2.6, so until 2.6
becomes the norm we have to invoke this as a function instead of by
saying::

    @gstlal_element_register
    class foo(Gst.Element):
        ...

Until then, you have to do::

    class foo(Gst.Element):
        ...
    gstlal_element_register(foo)

Definition at line 41 of file pipeutil.py.

◆ mkelem()

def python.pipeutil.mkelem (   elemname,
  props = {} 
)
Instantiate an element named elemname and optionally set some of its
properties from the dictionary props.

Definition at line 63 of file pipeutil.py.

◆ mkelems_in_bin()

def python.pipeutil.mkelems_in_bin (   bin,
  pipedesc 
)
Create an array of elements from a list of tuples, add them to a bin,
link them sequentially, and return the list.  Example:

mkelem(bin, ('audiotestsrc', {'wave':9}), ('audioresample',))

is equivalent to

audiotestsrc wave=9 ! audioresample

Definition at line 72 of file pipeutil.py.

◆ splice()

def python.pipeutil.splice (   bin,
  pad,
  element 
)
Splice element into an existing bin by teeing off an existing pad.

If necessary, a tee is added to the pipeline in order to splice the new element.

bin is an instance of Gst.Bin or Gst.Pipeline.  pad is a string that
describes any pad inside that bin.  The syntax used in gst-launch is
understood.  For example, the string 'foo.bar.bat' means the pad called 'bat'
on the element called 'bar' in the bin called 'foo' inside bin.  'foo.bar.'
refers to any pad on the element 'bar'.  element_or_pad is either an element
or a pad.

FIXME: implicit pad names not yet understood.

Definition at line 91 of file pipeutil.py.