mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
Fix leaks
Add some docs Add properties to loop objects for future use
This commit is contained in:
parent
600055bd68
commit
eeda53dbef
25 changed files with 92 additions and 53 deletions
|
|
@ -98,6 +98,16 @@ static void transport_reset_area(struct pw_client_node_transport *trans)
|
|||
spa_ringbuffer_init(trans->output_buffer, OUTPUT_BUFFER_SIZE);
|
||||
}
|
||||
|
||||
static void destroy(struct pw_client_node_transport *trans)
|
||||
{
|
||||
struct transport *impl = (struct transport *) trans;
|
||||
|
||||
pw_log_debug("transport %p: destroy", trans);
|
||||
|
||||
pw_memblock_free(&impl->mem);
|
||||
free(impl);
|
||||
}
|
||||
|
||||
static int add_message(struct pw_client_node_transport *trans, struct pw_client_node_message *message)
|
||||
{
|
||||
struct transport *impl = (struct transport *) trans;
|
||||
|
|
@ -194,6 +204,7 @@ pw_client_node_transport_new(uint32_t max_input_ports, uint32_t max_output_ports
|
|||
transport_setup_area(impl->mem.ptr, trans);
|
||||
transport_reset_area(trans);
|
||||
|
||||
trans->destroy = destroy;
|
||||
trans->add_message = add_message;
|
||||
trans->next_message = next_message;
|
||||
trans->parse_message = parse_message;
|
||||
|
|
@ -236,6 +247,7 @@ pw_client_node_transport_new_from_info(struct pw_client_node_transport_info *inf
|
|||
trans->output_data = trans->input_data;
|
||||
trans->input_data = tmp;
|
||||
|
||||
trans->destroy = destroy;
|
||||
trans->add_message = add_message;
|
||||
trans->next_message = next_message;
|
||||
trans->parse_message = parse_message;
|
||||
|
|
@ -247,20 +259,6 @@ pw_client_node_transport_new_from_info(struct pw_client_node_transport_info *inf
|
|||
return NULL;
|
||||
}
|
||||
|
||||
/** Destroy a transport
|
||||
* \param trans a transport to destroy
|
||||
* \memberof pw_client_node_transport
|
||||
*/
|
||||
void pw_client_node_transport_destroy(struct pw_client_node_transport *trans)
|
||||
{
|
||||
struct transport *impl = (struct transport *) trans;
|
||||
|
||||
pw_log_debug("transport %p: destroy", trans);
|
||||
|
||||
pw_memblock_free(&impl->mem);
|
||||
free(impl);
|
||||
}
|
||||
|
||||
/** Get transport info
|
||||
* \param trans the transport to get info of
|
||||
* \param[out] info transport info
|
||||
|
|
|
|||
|
|
@ -44,9 +44,6 @@ pw_client_node_transport_new(uint32_t max_input_ports, uint32_t max_output_ports
|
|||
struct pw_client_node_transport *
|
||||
pw_client_node_transport_new_from_info(struct pw_client_node_transport_info *info);
|
||||
|
||||
void
|
||||
pw_client_node_transport_destroy(struct pw_client_node_transport *trans);
|
||||
|
||||
int
|
||||
pw_client_node_transport_get_info(struct pw_client_node_transport *trans,
|
||||
struct pw_client_node_transport_info *info);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue