Top | ![]() |
![]() |
![]() |
![]() |
gpointer | machines | Read |
gpointer | missing-machines | Read |
gpointer | properties | Read |
BtSong * | song | Read / Write / Construct Only |
gpointer | wires | Read |
void | machine-added | No Hooks |
void | machine-removed | No Hooks |
void | wire-added | No Hooks |
void | wire-removed | No Hooks |
The setup manages virtual gear in a BtSong. This is a list of BtMachines that are used and the BtWires that connect them.
The setup manages the actual GStreamer GstPipeline content. Freshly created machines are not yet added to the pipeline. Only once a subgraph from a source is fully connected to the sink, that subgraph is added o the pipeline. Changing the machines and wires also works while the song is playing.
Applications can watch the GstObject:parent property to see whether a machine is physically inserted into the processing pipeline.
The setup takes ownership of the machines and wires. They are automatically added when they are created and destroyed together with the setup.
gboolean bt_setup_add_machine (const BtSetup * const self
,const BtMachine * const machine
);
Let the setup know that the supplied machine is now part of the song.
gboolean bt_setup_add_wire (const BtSetup * const self
,const BtWire * const wire
);
Let the setup know that the supplied wire is now part of the song.
BtMachine * bt_setup_get_machine_by_id (const BtSetup * const self
,const gchar * const id
);
Search the setup for a machine by the supplied id.
The machine must have been added previously to this setup with
bt_setup_add_machine()
.
BtMachine * bt_setup_get_machine_by_type (const BtSetup * const self
,const GType type
);
Search the setup for the first machine with the given type.
The machine must have been added previously to this setup with
bt_setup_add_machine()
.
GList * bt_setup_get_machines_by_type (const BtSetup * const self
,const GType type
);
Gathers all machines of the given type from the setup.
the list instance or
NULL
if not found. Free the list (and unref the machines), when done with
it.
[element-type BuzztraxCore.Machine][transfer full]
gchar * bt_setup_get_unique_machine_id (const BtSetup * const self
,const gchar * const base_name
);
The function makes the supplied base_name unique in this setup by eventually adding a number postfix. This method should be used when adding new machines.
BtWire * bt_setup_get_wire_by_dst_machine (const BtSetup * const self
,const BtMachine * const dst
);
Searches for the first wire in setup that uses the given BtMachine as a target. In other words - it returns the first wire that ends at the given BtMachine.
BtWire * bt_setup_get_wire_by_machines (const BtSetup * const self
,const BtMachine * const src
,const BtMachine * const dst
);
Searches for a wire in setup that uses the given BtMachine instances as a source and dest.
BtWire * bt_setup_get_wire_by_src_machine (const BtSetup * const self
,const BtMachine * const src
);
Searches for the first wire in setup that uses the given BtMachine as a source. In other words - it returns the first wire that starts at the given BtMachine.
GList * bt_setup_get_wires_by_dst_machine (const BtSetup * const self
,const BtMachine * const dst
);
Searches for all wires in setup that use the given BtMachine as a target.
GList * bt_setup_get_wires_by_src_machine (const BtSetup * const self
,const BtMachine * const src
);
Searches for all wires in setup that use the given BtMachine as a source.
void bt_setup_remember_missing_machine (const BtSetup * const self
,const gchar * const str
);
Loaders can use this function to collect information about machines that failed to load. The front-end can access this later by reading BtSetup::missing-machines property.
void bt_setup_remove_machine (const BtSetup * const self
,const BtMachine * const machine
);
Let the setup know that the supplied machine is removed from the song.
“missing-machines”
property“missing-machines” gpointer
The list of missing machines, don't change.
Flags: Read
“song”
property“song” BtSong *
Set song object, the setup belongs to.
Flags: Read / Write / Construct Only
“machine-added”
signalvoid user_function (BtSetup *self, BtMachine *machine, gpointer user_data)
A new machine item has been added to the setup.
self |
the setup object that emitted the signal |
|
machine |
the new machine |
|
user_data |
user data set when the signal handler was connected. |
Flags: No Hooks
“machine-removed”
signalvoid user_function (BtSetup *self, BtMachine *machine, gpointer user_data)
A machine item has been removed from the setup.
self |
the setup object that emitted the signal |
|
machine |
the old machine |
|
user_data |
user data set when the signal handler was connected. |
Flags: No Hooks
“wire-added”
signalvoid user_function (BtSetup *self, BtWire *wire, gpointer user_data)
A new wire item has been added to the setup.
self |
the setup object that emitted the signal |
|
wire |
the new wire |
|
user_data |
user data set when the signal handler was connected. |
Flags: No Hooks