mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-20 06:50:03 +01:00
module-avb: avdecc: destroy stream
This commit is contained in:
parent
c10f869836
commit
a3ce0f3e28
3 changed files with 15 additions and 0 deletions
|
|
@ -311,6 +311,7 @@ void avdecc_server_free(struct server *server)
|
||||||
{
|
{
|
||||||
struct impl *impl = server->impl;
|
struct impl *impl = server->impl;
|
||||||
|
|
||||||
|
stream_destroy_all(server);
|
||||||
spa_list_remove(&server->link);
|
spa_list_remove(&server->link);
|
||||||
if (server->source)
|
if (server->source)
|
||||||
pw_loop_destroy_source(impl->loop, server->source);
|
pw_loop_destroy_source(impl->loop, server->source);
|
||||||
|
|
|
||||||
|
|
@ -346,6 +346,14 @@ void stream_destroy(struct stream *stream)
|
||||||
avb_mrp_attribute_destroy(stream->listener_attr->mrp);
|
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)
|
static int setup_socket(struct stream *stream)
|
||||||
{
|
{
|
||||||
struct server *server = stream->server;
|
struct server *server = stream->server;
|
||||||
|
|
|
||||||
|
|
@ -76,6 +76,12 @@ struct stream *server_create_stream(struct server *server, struct stream *stream
|
||||||
|
|
||||||
void stream_destroy(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_activate(struct stream *stream, uint16_t index, uint64_t now);
|
||||||
int stream_deactivate(struct stream *stream, uint64_t now);
|
int stream_deactivate(struct stream *stream, uint64_t now);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue