mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
stream: add exclusive flag
With the exclusive flag we don't go through the audio-dsp.
This commit is contained in:
parent
eb96ed45d7
commit
27c53a31bc
3 changed files with 17 additions and 2 deletions
|
|
@ -754,10 +754,18 @@ static void client_node_initialized(void *data)
|
|||
uint8_t buffer[4096];
|
||||
struct spa_pod_builder b;
|
||||
int res;
|
||||
const struct pw_properties *props;
|
||||
const char *str;
|
||||
bool exclusive;
|
||||
|
||||
pw_log_debug("client-stream %p: initialized", &impl->this);
|
||||
|
||||
impl->cnode = pw_node_get_implementation(impl->client_node->node);
|
||||
props = pw_node_get_properties(impl->client_node->node);
|
||||
if (props != NULL && (str = pw_properties_get(props, PW_NODE_PROP_EXCLUSIVE)) != NULL)
|
||||
exclusive = pw_properties_parse_bool(str);
|
||||
else
|
||||
exclusive = false;
|
||||
|
||||
spa_graph_node_remove(&impl->client_node->node->rt.root);
|
||||
spa_graph_node_add(impl->this.node->rt.node.graph, &impl->client_node->node->rt.root);
|
||||
|
|
@ -811,7 +819,9 @@ static void client_node_initialized(void *data)
|
|||
spa_type_map_get_type(t->map, media_type),
|
||||
spa_type_map_get_type(t->map, media_subtype));
|
||||
|
||||
if (media_type == impl->type.media_type.audio &&
|
||||
|
||||
if (!exclusive &&
|
||||
media_type == impl->type.media_type.audio &&
|
||||
media_subtype == impl->type.media_subtype.raw) {
|
||||
if ((impl->adapter = pw_load_spa_interface("audioconvert/libspa-audioconvert",
|
||||
"splitter", SPA_TYPE__Node, NULL, 0, NULL)) == NULL)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue