mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
use boolean in config
This commit is contained in:
parent
17d6d7b0b1
commit
7a190dd2ab
1 changed files with 32 additions and 7 deletions
|
|
@ -1012,6 +1012,35 @@ extern struct spa_handle_factory spa_filter_graph_factory;
|
|||
* prefixed with 'input.' and 'output.' to generate a capture and playback
|
||||
* stream node.name respectively.
|
||||
*
|
||||
* ## Control Stream
|
||||
*
|
||||
* The module can provide an input stream for control data. It can only be
|
||||
* configured with the property `control.props`, properties on the filter
|
||||
* definition will not be taken into account.
|
||||
*
|
||||
* The control stream has to be enabled by setting the attribute `enabled` of
|
||||
* the `control.props` to true.
|
||||
*
|
||||
*\code{.unparsed}
|
||||
* # ~/.config/pipewire/filter-chain.conf.d/my-filter-chain-1.conf
|
||||
*
|
||||
* context.modules = [
|
||||
* { name = libpipewire-module-filter-chain
|
||||
* args = {
|
||||
* ...
|
||||
* filter.graph = {...}
|
||||
* capture.props = {...}
|
||||
* control.props = {
|
||||
* node.name = "control_in",
|
||||
* node.autoconnect = true,
|
||||
* enabled = true,
|
||||
* media.class = "Stream/Input/Control"
|
||||
* }
|
||||
* }
|
||||
* }
|
||||
* ]
|
||||
*\endcode
|
||||
*
|
||||
* ## Example configuration of a virtual source
|
||||
*
|
||||
* This example uses the rnnoise LADSPA plugin to create a new
|
||||
|
|
@ -2133,14 +2162,10 @@ int pipewire__module_init(struct pw_impl_module *module, const char *args)
|
|||
&impl->core_listener,
|
||||
&core_events, impl);
|
||||
|
||||
if (pw_properties_get(impl->control_props, "enabled") == NULL) {
|
||||
impl->control_stream_active = false;
|
||||
} else if (strcmp(pw_properties_get(
|
||||
impl->control_props, "enabled"), "true") == 0) {
|
||||
impl->control_stream_active = true;
|
||||
} else if (strcmp(pw_properties_get(
|
||||
impl->control_props, "enabled"), "false") == 0) {
|
||||
if ((str = pw_properties_get(impl->control_props, "enabled")) == NULL) {
|
||||
impl->control_stream_active = false;
|
||||
} else {
|
||||
impl->control_stream_active = spa_atob(str);
|
||||
}
|
||||
|
||||
setup_streams(impl);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue