pw_impl_port_new -> pw_context_create_port

This commit is contained in:
Wim Taymans 2019-12-11 18:07:03 +01:00
parent 930b595724
commit 2a142edadb
4 changed files with 14 additions and 11 deletions

View file

@ -156,7 +156,7 @@ static struct pw_impl_port *get_port(struct pw_impl_node *node, enum spa_directi
if (port_id == SPA_ID_INVALID)
return NULL;
p = pw_impl_port_new(direction, port_id, NULL, 0);
p = pw_context_create_port(node->context, direction, port_id, NULL, 0);
if (p == NULL)
return NULL;

View file

@ -1171,7 +1171,7 @@ static void node_port_info(void *data, enum spa_direction direction, uint32_t po
pw_log_debug(NAME" %p: %s port %d added", node,
pw_direction_as_string(direction), port_id);
if ((port = pw_impl_port_new(direction, port_id, info,
if ((port = pw_context_create_port(node->context, direction, port_id, info,
node->port_user_data_size))) {
if ((res = pw_impl_port_add(port, node)) < 0) {
pw_log_error(NAME" %p: can't add port %p: %d, %s",

View file

@ -354,7 +354,9 @@ static void update_info(struct pw_impl_port *port, const struct spa_port_info *i
}
SPA_EXPORT
struct pw_impl_port *pw_impl_port_new(enum pw_direction direction,
struct pw_impl_port *pw_context_create_port(
struct pw_context *context,
enum pw_direction direction,
uint32_t port_id,
const struct spa_port_info *info,
size_t user_data_size)

View file

@ -905,7 +905,8 @@ int pw_context_recalc_graph(struct pw_context *context);
/** Create a new port \memberof pw_impl_port
* \return a newly allocated port */
struct pw_impl_port *
pw_impl_port_new(enum pw_direction direction,
pw_context_create_port(struct pw_context *context,
enum pw_direction direction,
uint32_t port_id,
const struct spa_port_info *info,
size_t user_data_size);
@ -915,7 +916,7 @@ void pw_impl_port_update_info(struct pw_impl_port *port, const struct spa_port_i
int pw_impl_port_register(struct pw_impl_port *port,
struct pw_properties *properties);
/** Get the user data of a port, the size of the memory was given \ref in pw_impl_port_new */
/** Get the user data of a port, the size of the memory was given \ref in pw_context_create_port */
void * pw_impl_port_get_user_data(struct pw_impl_port *port);
int pw_impl_port_set_mix(struct pw_impl_port *port, struct spa_node *node, uint32_t flags);