mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-02-11 04:27:56 -05:00
module-avb: internal: destroy internal descriptors
This commit is contained in:
parent
a3ce0f3e28
commit
b60623df4d
4 changed files with 13 additions and 16 deletions
|
|
@ -311,7 +311,7 @@ void avdecc_server_free(struct server *server)
|
|||
{
|
||||
struct impl *impl = server->impl;
|
||||
|
||||
stream_destroy_all(server);
|
||||
server_destroy_descriptors(server);
|
||||
spa_list_remove(&server->link);
|
||||
if (server->source)
|
||||
pw_loop_destroy_source(impl->loop, server->source);
|
||||
|
|
|
|||
|
|
@ -83,7 +83,18 @@ struct server {
|
|||
|
||||
#include "stream.h"
|
||||
|
||||
static inline struct descriptor *server_find_descriptor(struct server *server,
|
||||
static inline void server_destroy_descriptors(struct server *server)
|
||||
{
|
||||
struct descriptor *d, *t;
|
||||
|
||||
spa_list_for_each_safe(d, t, &server->descriptors, link) {
|
||||
free(d->ptr);
|
||||
spa_list_remove(&d->link);
|
||||
free(d);
|
||||
}
|
||||
}
|
||||
|
||||
static inline const struct descriptor *server_find_descriptor(struct server *server,
|
||||
uint16_t type, uint16_t index)
|
||||
{
|
||||
struct descriptor *d;
|
||||
|
|
|
|||
|
|
@ -346,14 +346,6 @@ void stream_destroy(struct stream *stream)
|
|||
avb_mrp_attribute_destroy(stream->listener_attr->mrp);
|
||||
}
|
||||
|
||||
void stream_destroy_all(struct server *server)
|
||||
{
|
||||
struct stream *s, *t;
|
||||
spa_list_for_each_safe(s, t, &server->streams, link) {
|
||||
stream_destroy(s);
|
||||
}
|
||||
}
|
||||
|
||||
static int setup_socket(struct stream *stream)
|
||||
{
|
||||
struct server *server = stream->server;
|
||||
|
|
|
|||
|
|
@ -76,12 +76,6 @@ struct stream *server_create_stream(struct server *server, struct stream *stream
|
|||
|
||||
void stream_destroy(struct stream *stream);
|
||||
|
||||
/**
|
||||
* \brief unregister MRP attribute for the stream
|
||||
* and free the allocated resources for the stream.
|
||||
*/
|
||||
void stream_destroy_all(struct server *server);
|
||||
|
||||
int stream_activate(struct stream *stream, uint16_t index, uint64_t now);
|
||||
int stream_deactivate(struct stream *stream, uint64_t now);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue