mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
spa: set port flags on port info
This commit is contained in:
parent
16f1d6349d
commit
9071678643
5 changed files with 22 additions and 14 deletions
|
|
@ -168,8 +168,12 @@ static int impl_node_set_param(void *object, uint32_t id, uint32_t flags,
|
|||
|
||||
spa_return_val_if_fail(this != NULL, -EINVAL);
|
||||
|
||||
|
||||
switch (id) {
|
||||
case SPA_PARAM_Props:
|
||||
{
|
||||
struct port *port = &this->port;
|
||||
|
||||
if (param == NULL) {
|
||||
reset_props(this, &this->props);
|
||||
return 0;
|
||||
|
|
@ -179,11 +183,11 @@ static int impl_node_set_param(void *object, uint32_t id, uint32_t flags,
|
|||
SPA_PROP_live, SPA_POD_OPT_Bool(&this->props.live));
|
||||
|
||||
if (this->props.live)
|
||||
this->info.flags |= SPA_PORT_FLAG_LIVE;
|
||||
port->info.flags |= SPA_PORT_FLAG_LIVE;
|
||||
else
|
||||
this->info.flags &= ~SPA_PORT_FLAG_LIVE;
|
||||
port->info.flags &= ~SPA_PORT_FLAG_LIVE;
|
||||
break;
|
||||
|
||||
}
|
||||
default:
|
||||
return -ENOENT;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -181,6 +181,7 @@ static int impl_node_set_param(void *object, uint32_t id, uint32_t flags,
|
|||
case SPA_PARAM_Props:
|
||||
{
|
||||
struct props *p = &this->props;
|
||||
struct port *port = &this->port;
|
||||
|
||||
if (param == NULL) {
|
||||
reset_props(this, p);
|
||||
|
|
@ -192,9 +193,9 @@ static int impl_node_set_param(void *object, uint32_t id, uint32_t flags,
|
|||
SPA_PROP_patternType, SPA_POD_OPT_Id(&p->pattern));
|
||||
|
||||
if (p->live)
|
||||
this->info.flags |= SPA_PORT_FLAG_LIVE;
|
||||
port->info.flags |= SPA_PORT_FLAG_LIVE;
|
||||
else
|
||||
this->info.flags &= ~SPA_PORT_FLAG_LIVE;
|
||||
port->info.flags &= ~SPA_PORT_FLAG_LIVE;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue