mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
pulse-server: add module properties
This commit is contained in:
parent
27e00d1be4
commit
7afb3bc1a4
2 changed files with 30 additions and 2 deletions
|
|
@ -209,6 +209,22 @@ static const struct module_methods module_loopback_methods = {
|
||||||
.unload = module_loopback_unload,
|
.unload = module_loopback_unload,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const struct spa_dict_item module_loopback_info[] = {
|
||||||
|
{ PW_KEY_MODULE_AUTHOR, "Arun Raghavan <arun@asymptotic.io>" },
|
||||||
|
{ PW_KEY_MODULE_DESCRIPTION, "Loopback from source to sink" },
|
||||||
|
{ PW_KEY_MODULE_USAGE, "source=<source to connect to> "
|
||||||
|
"sink=<sink to connect to> "
|
||||||
|
"latency_msec=<latency in ms> "
|
||||||
|
"channels=<number of channels> "
|
||||||
|
"channel_map=<channel map> "
|
||||||
|
"sink_input_properties=<proplist> "
|
||||||
|
"source_output_properties=<proplist> "
|
||||||
|
"source_dont_move=<boolean> "
|
||||||
|
"sink_dont_move=<boolean> "
|
||||||
|
"remix=<remix channels?> " },
|
||||||
|
{ PW_KEY_MODULE_VERSION, PACKAGE_VERSION },
|
||||||
|
};
|
||||||
|
|
||||||
static struct module *create_module_loopback(struct impl *impl, const char *argument)
|
static struct module *create_module_loopback(struct impl *impl, const char *argument)
|
||||||
{
|
{
|
||||||
struct module *module;
|
struct module *module;
|
||||||
|
|
@ -218,7 +234,7 @@ static struct module *create_module_loopback(struct impl *impl, const char *argu
|
||||||
struct spa_audio_info_raw info = { 0 };
|
struct spa_audio_info_raw info = { 0 };
|
||||||
int res;
|
int res;
|
||||||
|
|
||||||
props = pw_properties_new(NULL, NULL);
|
props = pw_properties_new_dict(&SPA_DICT_INIT_ARRAY(module_loopback_info));
|
||||||
capture_props = pw_properties_new(NULL, NULL);
|
capture_props = pw_properties_new(NULL, NULL);
|
||||||
playback_props = pw_properties_new(NULL, NULL);
|
playback_props = pw_properties_new(NULL, NULL);
|
||||||
if (!props || !capture_props || !playback_props) {
|
if (!props || !capture_props || !playback_props) {
|
||||||
|
|
|
||||||
|
|
@ -104,6 +104,18 @@ static const struct module_methods module_null_sink_methods = {
|
||||||
.unload = module_null_sink_unload,
|
.unload = module_null_sink_unload,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const struct spa_dict_item module_null_sink_info[] = {
|
||||||
|
{ PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" },
|
||||||
|
{ PW_KEY_MODULE_DESCRIPTION, "A NULL sink" },
|
||||||
|
{ PW_KEY_MODULE_USAGE, "sink_name=<name of sink> "
|
||||||
|
"sink_properties=<properties for the sink> "
|
||||||
|
"format=<sample format> "
|
||||||
|
"rate=<sample rate> "
|
||||||
|
"channels=<number of channels> "
|
||||||
|
"channel_map=<channel map>" },
|
||||||
|
{ PW_KEY_MODULE_VERSION, PACKAGE_VERSION },
|
||||||
|
};
|
||||||
|
|
||||||
static struct module *create_module_null_sink(struct impl *impl, const char *argument)
|
static struct module *create_module_null_sink(struct impl *impl, const char *argument)
|
||||||
{
|
{
|
||||||
struct module *module;
|
struct module *module;
|
||||||
|
|
@ -112,7 +124,7 @@ static struct module *create_module_null_sink(struct impl *impl, const char *arg
|
||||||
const char *str;
|
const char *str;
|
||||||
int res;
|
int res;
|
||||||
|
|
||||||
props = pw_properties_new(NULL, NULL);
|
props = pw_properties_new_dict(&SPA_DICT_INIT_ARRAY(module_null_sink_info));
|
||||||
if (props == NULL) {
|
if (props == NULL) {
|
||||||
res = -EINVAL;
|
res = -EINVAL;
|
||||||
goto out;
|
goto out;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue