mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
module-rtp: Update SAP session if stream properties change
This allows us to propagate changes to session name, destination IP, etc.
This commit is contained in:
parent
2d0bc982bc
commit
35ba50f117
1 changed files with 10 additions and 1 deletions
|
|
@ -835,6 +835,10 @@ static struct session *session_new_announce(struct impl *impl, struct node *node
|
||||||
uint32_t port;
|
uint32_t port;
|
||||||
int res;
|
int res;
|
||||||
|
|
||||||
|
// We want to recreate the session with updated parameters, maybe
|
||||||
|
if (node->session)
|
||||||
|
session_free(node->session);
|
||||||
|
|
||||||
if (impl->n_sessions >= MAX_SESSIONS) {
|
if (impl->n_sessions >= MAX_SESSIONS) {
|
||||||
pw_log_warn("too many sessions (%u >= %u)", impl->n_sessions, MAX_SESSIONS);
|
pw_log_warn("too many sessions (%u >= %u)", impl->n_sessions, MAX_SESSIONS);
|
||||||
errno = EMFILE;
|
errno = EMFILE;
|
||||||
|
|
@ -1504,7 +1508,12 @@ static void node_event_info(void *data, const struct pw_node_info *info)
|
||||||
struct impl *impl = n->impl;
|
struct impl *impl = n->impl;
|
||||||
const char *str;
|
const char *str;
|
||||||
|
|
||||||
if (n->session != NULL || info == NULL)
|
if (info == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
|
// We only really want to do anything here if properties are updated,
|
||||||
|
// or if we don't have a session for this node already
|
||||||
|
if (!(info->change_mask & PW_NODE_CHANGE_MASK_PROPS) && n->session != NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
n->info = pw_node_info_merge(n->info, info, true);
|
n->info = pw_node_info_merge(n->info, info, true);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue