mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-16 07:00:00 -05:00
Attribute in config to enable control port. Disable by default
This commit is contained in:
parent
6a154a0be0
commit
4c65f04337
1 changed files with 37 additions and 24 deletions
|
|
@ -1182,6 +1182,7 @@ struct impl {
|
|||
struct pw_properties *control_props;
|
||||
struct pw_stream *control;
|
||||
struct spa_hook control_listener;
|
||||
bool control_stream_active;
|
||||
|
||||
struct spa_audio_info_raw info;
|
||||
|
||||
|
|
@ -1669,6 +1670,7 @@ static int setup_streams(struct impl *impl)
|
|||
struct spa_pod_dynamic_builder b;
|
||||
struct spa_filter_graph *graph = impl->graph;
|
||||
|
||||
if (impl->control_stream_active) {
|
||||
impl->control = pw_stream_new(impl->core,
|
||||
"filter control", impl->control_props);
|
||||
impl->control_props = NULL;
|
||||
|
|
@ -1696,6 +1698,7 @@ static int setup_streams(struct impl *impl)
|
|||
PW_STREAM_FLAG_MAP_BUFFERS |
|
||||
PW_STREAM_FLAG_RT_PROCESS,
|
||||
param, 1);
|
||||
}
|
||||
|
||||
impl->capture = pw_stream_new(impl->core,
|
||||
"filter capture", impl->capture_props);
|
||||
|
|
@ -2119,6 +2122,16 @@ int pipewire__module_init(struct pw_impl_module *module, const char *args)
|
|||
&impl->core_listener,
|
||||
&core_events, impl);
|
||||
|
||||
if (pw_properties_get(props, "controlStream.enabled") == NULL) {
|
||||
impl->control_stream_active = false;
|
||||
} else if (strcmp(pw_properties_get(props, "controlStream.enabled"), "true")
|
||||
== 0) {
|
||||
impl->control_stream_active = true;
|
||||
} else if (strcmp(pw_properties_get(props, "controlStream.enabled"), "false")
|
||||
== 0) {
|
||||
impl->control_stream_active = false;
|
||||
}
|
||||
|
||||
setup_streams(impl);
|
||||
|
||||
pw_impl_module_add_listener(module, &impl->module_listener, &module_events, impl);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue