Farstream.ElementAddedNotifier

g Farstream.ElementAddedNotifier Farstream.ElementAddedNotifier GObject.Object GObject.Object GObject.Object->Farstream.ElementAddedNotifier

Subclasses:None

Methods

Inherited:GObject.Object (37)
Structs:GObject.ObjectClass (5)
class new ()
  add (bin)
  remove (bin)
  set_default_properties (element)
  set_properties_from_file (filename)
  set_properties_from_keyfile (keyfile)

Virtual Methods

Inherited:GObject.Object (7)

Properties

None

Signals

Inherited:GObject.Object (1)
Name Short Description
element-added This signal is emitted when an element is added to a Gst.Bin that was added to this object or one of its sub-bins.

Fields

Inherited:GObject.Object (1)
Name Type Access Description
parent GObject.Object r  

Class Details

class Farstream.ElementAddedNotifier(**kwargs)
Bases:GObject.Object
Abstract:No
Structure:Farstream.ElementAddedNotifierClass

All members are private

classmethod new()
Returns:the newly-created Farstream.ElementAddedNotifier
Return type:Farstream.ElementAddedNotifier

Creates a new Farstream.ElementAddedNotifier object

add(bin)
Parameters:bin (Gst.Bin) – A Gst.Bin to watch to added elements

Add a Gst.Bin to on which the Farstream.ElementAddedNotifier ::element-added signal will be called on every element and sub-element present and added in the future.

remove(bin)
Parameters:bin (Gst.Bin) – A Gst.Bin to stop watching
Returns:True if the Gst.Bin was being watched, False otherwise
Return type:bool

Stop watching the passed bin and its subbins.

set_default_properties(element)
Parameters:element (Gst.Element) – Element for which to set the default codec preferences
Returns:The id of the signal connection, this can be used to disconnect this property setter using GObject.signal_handler_disconnect().
Return type:int

Same as first calling fs_utils_get_default_element_properties() and using the result with Farstream.ElementAddedNotifier.set_properties_from_keyfile() .

This is binding friendly (since GLib.KeyFile doesn’t have a boxed type).

set_properties_from_file(filename)
Parameters:filename (str) – The name of the keyfile to use
Raises:GLib.Error
Returns:True if the file was successfully loaded, False otherwise
Return type:bool

Same as Farstream.ElementAddedNotifier.set_properties_from_keyfile() but using the name of the file to load instead of the GLib.KeyFile directly.

set_properties_from_keyfile(keyfile)
Parameters:keyfile (GLib.KeyFile) – a GLib.KeyFile
Returns:The id of the signal connection, this can be used to disconnect this property setter using GObject.signal_handler_disconnect().
Return type:int

Using a GLib.KeyFile where the groups are the element’s type or name and the key=value are the property and its value, this function will set the properties on the elements added to this object after this function has been called. It will take ownership of the GLib.KeyFile structure. It will first try the group as the element type, if that does not match, it will check its name.

Signal Details

Farstream.ElementAddedNotifier.signals.element_added(element_added_notifier, bin, element)
Signal Name:

element-added

Flags:

RUN_LAST

Parameters:

This signal is emitted when an element is added to a Gst.Bin that was added to this object or one of its sub-bins. Be careful, there is no guarantee that this will be emitted on your main thread, it will be emitted in the thread that added the element. The bin may be None if this is the top-level bin.