static
struct bt_port *bt_component_add_port(
struct bt_component *component, GPtrArray *ports,
- enum bt_port_type port_type, const char *name)
+ enum bt_port_type port_type, const char *name, void *user_data)
{
size_t i;
struct bt_port *new_port = NULL;
}
}
- new_port = bt_port_create(component, port_type, name);
+ new_port = bt_port_create(component, port_type, name, user_data);
if (!new_port) {
goto end;
}
type == BT_COMPONENT_CLASS_TYPE_FILTER) {
default_port = bt_component_add_port(component,
component->output_ports, BT_PORT_TYPE_OUTPUT,
- DEFAULT_OUTPUT_PORT_NAME);
+ DEFAULT_OUTPUT_PORT_NAME, NULL);
if (!default_port) {
BT_PUT(component);
goto end;
type == BT_COMPONENT_CLASS_TYPE_SINK) {
default_port = bt_component_add_port(component,
component->input_ports, BT_PORT_TYPE_INPUT,
- DEFAULT_INPUT_PORT_NAME);
+ DEFAULT_INPUT_PORT_NAME, NULL);
if (!default_port) {
BT_PUT(component);
goto end;
BT_HIDDEN
struct bt_port *bt_component_add_input_port(
- struct bt_component *component, const char *name)
+ struct bt_component *component, const char *name,
+ void *user_data)
{
return bt_component_add_port(component, component->input_ports,
- BT_PORT_TYPE_INPUT, name);
+ BT_PORT_TYPE_INPUT, name, user_data);
}
BT_HIDDEN
struct bt_port *bt_component_add_output_port(
- struct bt_component *component, const char *name)
+ struct bt_component *component, const char *name,
+ void *user_data)
{
return bt_component_add_port(component, component->output_ports,
- BT_PORT_TYPE_OUTPUT, name);
+ BT_PORT_TYPE_OUTPUT, name, user_data);
}
static