Output API

Outputs are used by mopidy.gstreamer to output audio in some way.

class mopidy.outputs.BaseOutput(gstreamer)[source]

Base class for pluggable audio outputs.

connect()[source]

Attach output to GStreamer pipeline.

describe_bin()[source]

Return string describing the output bin in gst-launch format.

For simple cases this can just be a sink such as autoaudiosink, or it can be a chain like element1 ! element2 ! sink. See the manpage of gst-launch for details on the format.

MUST be implemented by subclass.

Return type:string
get_name()[source]

Get name of the output. Defaults to the output’s class name.

MAY be implemented by subclass.

Return type:string
modify_bin()[source]

Modifies self.bin before it is installed if needed.

Overriding this method allows for outputs to modify the constructed bin before it is installed. This can for instance be a good place to call set_properties on elements that need to be configured.

MAY be implemented by subclass.

on_connect()[source]

Called after output has been connected to GStreamer pipeline.

MAY be implemented by subclass.

on_remove()[source]

Called after output has been removed from GStreamer pipeline.

MAY be implemented by subclass.

remove()[source]

Remove output from GStreamer pipeline.

set_properties(element, properties)[source]

Helper method for setting of properties on elements.

Will call gst.Element.set_property() on element for each key in properties that has a value that is not None.

Parameters:
  • element (gst.Element) – element to set properties on
  • properties (dict) – properties to set on element

Project Versions

Table Of Contents

Previous topic

Data models

Next topic

Module reference

This Page