mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
media-session: Add method to destroy a global
Destroy the stream when it is disconnected and it was marked as DONT_RECONNECT.
This commit is contained in:
parent
a86f70c13d
commit
c20100eabb
3 changed files with 9 additions and 1 deletions
|
|
@ -1182,6 +1182,13 @@ struct sm_object *sm_media_session_find_object(struct sm_media_session *sess, ui
|
|||
return find_object(impl, id);
|
||||
}
|
||||
|
||||
int sm_media_session_destroy_object(struct sm_media_session *sess, uint32_t id)
|
||||
{
|
||||
struct impl *impl = SPA_CONTAINER_OF(sess, struct impl, this);
|
||||
pw_registry_destroy(impl->registry, id);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int sm_media_session_schedule_rescan(struct sm_media_session *sess)
|
||||
{
|
||||
struct impl *impl = SPA_CONTAINER_OF(sess, struct impl, this);
|
||||
|
|
|
|||
|
|
@ -248,6 +248,7 @@ int sm_media_session_sync(struct sm_media_session *sess,
|
|||
void (*callback) (void *data), void *data);
|
||||
|
||||
struct sm_object *sm_media_session_find_object(struct sm_media_session *sess, uint32_t id);
|
||||
int sm_media_session_destroy_object(struct sm_media_session *sess, uint32_t id);
|
||||
|
||||
int sm_media_session_schedule_rescan(struct sm_media_session *sess);
|
||||
|
||||
|
|
|
|||
|
|
@ -487,7 +487,7 @@ static int rescan_node(struct impl *impl, struct node *n)
|
|||
|
||||
str = spa_dict_lookup(props, PW_KEY_NODE_DONT_RECONNECT);
|
||||
if (str != NULL && pw_properties_parse_bool(str)) {
|
||||
// pw_registry_destroy(impl->registry, n->id);
|
||||
sm_media_session_destroy_object(impl->session, n->id);
|
||||
}
|
||||
|
||||
obj = sm_media_session_find_object(impl->session, n->client_id);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue