port: add function to get port info

This commit is contained in:
Wim Taymans 2020-02-25 15:05:31 +01:00
parent 0b4d3aee46
commit 1ab6167f35
2 changed files with 9 additions and 0 deletions

View file

@ -609,6 +609,12 @@ void pw_impl_port_add_listener(struct pw_impl_port *port,
spa_hook_list_append(&port->listener_list, listener, events, data); spa_hook_list_append(&port->listener_list, listener, events, data);
} }
SPA_EXPORT
const struct pw_port_info *pw_impl_port_get_info(struct pw_impl_port *port)
{
return &port->info;
}
SPA_EXPORT SPA_EXPORT
void * pw_impl_port_get_user_data(struct pw_impl_port *port) void * pw_impl_port_get_user_data(struct pw_impl_port *port)
{ {

View file

@ -107,6 +107,9 @@ const struct pw_properties *pw_impl_port_get_properties(struct pw_impl_port *por
/** Update the port properties */ /** Update the port properties */
int pw_impl_port_update_properties(struct pw_impl_port *port, const struct spa_dict *dict); int pw_impl_port_update_properties(struct pw_impl_port *port, const struct spa_dict *dict);
/** Get the port info */
const struct pw_port_info *pw_impl_port_get_info(struct pw_impl_port *port);
/** Get the port id */ /** Get the port id */
uint32_t pw_impl_port_get_id(struct pw_impl_port *port); uint32_t pw_impl_port_get_id(struct pw_impl_port *port);