BtWire

BtWire — class for a connection of two BtMachines

Functions

Properties

gpointer analyzers Read / Write
gpointer construction-error Read / Write / Construct Only
BtMachine * dst Read / Write / Construct Only
GstElement * gain Read
gulong num-params Read / Write
GstElement * pan Read
gpointer properties Read
BtSong * song Read / Write / Construct Only
BtMachine * src Read / Write / Construct Only

Signals

void pattern-created No Hooks

Types and Values

Object Hierarchy

    GObject
    ╰── GstObject
        ╰── GstElement
            ╰── GstBin
                ╰── BtWire

Implemented Interfaces

BtWire implements GstChildProxy.

Includes

#include <libbtcore/core.h>

Description

Abstracts connection between two BtMachines. After creation, the elements are connected. In contrast to directly wiring GstElements this insert needed conversion elements automatically.

Furthermore each wire has a volume and if possible panorama/balance element. Volume and panorama/balance can be sequenced like machine parameters in BtWirePattern objects.

Functions

bt_wire_add_wire_pattern ()

void
bt_wire_add_wire_pattern (const BtWire * const self,
                          const BtPattern * const pattern,
                          const BtWirePattern * const wire_pattern);

Add the supplied wire-pattern to the wire. This is automatically done by bt_wire_pattern_new().

Parameters

self

the wire to add the wire-pattern to

 

pattern

the pattern that the wire-pattern is associated with

 

wire_pattern

the new wire-pattern instance

 

bt_wire_controller_change_value ()

void
bt_wire_controller_change_value (const BtWire * const self,
                                 const gulong param,
                                 const GstClockTime timestamp,
                                 GValue * const value);

Depending on wheter the given value is NULL, sets or unsets the controller value for the specified param and at the given time.

Parameters

self

the wire to change the param for

 

param

the parameter index

 

timestamp

the time stamp of the change

 

value

the new value or NULL to unset a previous one

 

bt_wire_get_param_details ()

void
bt_wire_get_param_details (const BtWire * const self,
                           const gulong index,
                           GParamSpec **pspec,
                           GValue **min_val,
                           GValue **max_val);

Retrieves the details of a voice param. Any detail can be NULL if its not wanted.

Parameters

self

the wire to search for the param details

 

index

the offset in the list of params

 

pspec

place for the param spec

 

min_val

place to hold new GValue with minimum

 

max_val

place to hold new GValue with maximum

 

bt_wire_get_param_index ()

glong
bt_wire_get_param_index (const BtWire *const self,
                         const gchar * const name,
                         GError **error);

Searches the list of registered param of a wire for a param of the given name and returns the index if found.

Parameters

self

the wire to search for the param

 

name

the name of the param

 

error

the location of an error instance to fill with a message, if an error occures

 

Returns

the index or sets error if it is not found and returns -1.


bt_wire_get_param_name ()

const gchar *
bt_wire_get_param_name (const BtWire * const self,
                        const gulong index);

Gets the param name. Do not modify returned content.

Parameters

self

the wire to get the param name from

 

index

the offset in the list of params

 

Returns

the requested name


bt_wire_get_param_spec ()

GParamSpec *
bt_wire_get_param_spec (const BtWire * const self,
                        const gulong index);

Retrieves the parameter specification for the param

Parameters

self

the wire to search for the param

 

index

the offset in the list of params

 

Returns

the GParamSpec for the requested param


bt_wire_get_param_type ()

GType
bt_wire_get_param_type (const BtWire * const self,
                        const gulong index);

Retrieves the GType of a param

Parameters

self

the wire to search for the param type

 

index

the offset in the list of params

 

Returns

the requested GType


bt_wire_get_pattern ()

BtWirePattern *
bt_wire_get_pattern (const BtWire * const self,
                     const BtPattern * const pattern);

Gets the wire-pattern that hold the automation data for this wire .

Parameters

self

the wire that has the pattern

 

pattern

the pattern that the wire-pattern is associated with

 

Returns

a reference to the wire-pattern, unref when done.


bt_wire_new ()

BtWire *
bt_wire_new (const BtSong *song,
             const BtMachine *src_machine,
             const BtMachine *dst_machine,
             GError **err);

Create a new instance. The new wire is automaticall added to a songs setup. You don't need to call

bt_setup_add_wire(setup,wire);.

Parameters

song

the song the new instance belongs to

 

src_machine

the data source (BtSourceMachine or BtProcessorMachine)

 

dst_machine

the data sink (BtSinkMachine or BtProcessorMachine)

 

err

inform about failed instance creation

 

Returns

the new instance or NULL in case of an error


bt_wire_reconnect ()

gboolean
bt_wire_reconnect (BtWire *self);

Call this method after internal elements in a BtMachine have changed, but failed to link.

Parameters

self

the wire to re-link

 

Returns

TRUE for success and FALSE otherwise

Types and Values

BT_WIRE_MAX_NUM_PARAMS

#define BT_WIRE_MAX_NUM_PARAMS 2

Maximum number of parameters per wire.


struct BtWire

struct BtWire;

A link between two BtMachine instances.

Property Details

The “analyzers” property

  “analyzers”                gpointer

list of wire analyzers.

Flags: Read / Write


The “construction-error” property

  “construction-error”       gpointer

signal failed instance creation.

Flags: Read / Write / Construct Only


The “dst” property

  “dst”                      BtMachine *

dst machine object, the wire links to.

Flags: Read / Write / Construct Only


The “gain” property

  “gain”                     GstElement *

the gain element for the connection.

Flags: Read


The “num-params” property

  “num-params”               gulong

number of params for the wire.

Flags: Read / Write

Allowed values: <= 2


The “pan” property

  “pan”                      GstElement *

the panorama element for the connection.

Flags: Read


The “properties” property

  “properties”               gpointer

list of wire properties.

Flags: Read


The “song” property

  “song”                     BtSong *

the song object, the wire belongs to.

Flags: Read / Write / Construct Only


The “src” property

  “src”                      BtMachine *

src machine object, the wire links to.

Flags: Read / Write / Construct Only

Signal Details

The “pattern-created” signal

void
user_function (BtWire        *self,
               BtWirePattern *tick,
               gpointer       user_data)

signals that a param of this wire-pattern has been changed

Parameters

self

the wire-pattern object that emitted the signal

 

tick

the tick position inside the pattern

 

param

the parameter index

 

user_data

user data set when the signal handler was connected.

 

Flags: No Hooks