mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
adapter: produce output when we have a monitor
This commit is contained in:
parent
6f672c883e
commit
00c2f6fe4f
1 changed files with 7 additions and 0 deletions
|
|
@ -75,6 +75,7 @@ struct impl {
|
|||
unsigned int active:1;
|
||||
unsigned int driver:1;
|
||||
unsigned int master:1;
|
||||
unsigned int monitor:1;
|
||||
};
|
||||
|
||||
/** \endcond */
|
||||
|
|
@ -780,6 +781,9 @@ static int impl_node_process(void *object)
|
|||
|
||||
status = spa_node_process(this->slave);
|
||||
|
||||
if (this->monitor)
|
||||
status |= SPA_STATUS_HAVE_BUFFER;
|
||||
|
||||
if (this->direction == SPA_DIRECTION_OUTPUT && !this->master) {
|
||||
if (this->use_converter)
|
||||
status = spa_node_process(this->convert);
|
||||
|
|
@ -887,6 +891,9 @@ impl_init(const struct spa_handle_factory *factory,
|
|||
if (this->slave == NULL)
|
||||
return -EINVAL;
|
||||
|
||||
if ((str = spa_dict_lookup(info, "merger.monitor")) != NULL)
|
||||
this->monitor = atoi(str);
|
||||
|
||||
spa_node_add_listener(this->slave,
|
||||
&this->slave_listener, &slave_node_events, this);
|
||||
spa_node_set_callbacks(this->slave, &slave_node_callbacks, this);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue