mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-31 22:25:33 -04:00
modules: add {sink|source|card}_properties argument to all modules
This commit is contained in:
parent
208862698e
commit
1c4393acf0
20 changed files with 231 additions and 48 deletions
|
|
@ -72,11 +72,11 @@ PA_MODULE_VERSION(PACKAGE_VERSION);
|
|||
PA_MODULE_LOAD_ONCE(FALSE);
|
||||
PA_MODULE_USAGE(
|
||||
"sink_name=<name for the sink> "
|
||||
"description=<description for the sink> "
|
||||
"sink_properties=<properties for the sink> "
|
||||
"server=<address> "
|
||||
"format=<sample format> "
|
||||
"channels=<number of channels> "
|
||||
"rate=<sample rate>");
|
||||
"rate=<sample rate> "
|
||||
"channels=<number of channels>");
|
||||
|
||||
#define DEFAULT_SINK_NAME "raop"
|
||||
|
||||
|
|
@ -118,12 +118,13 @@ struct userdata {
|
|||
};
|
||||
|
||||
static const char* const valid_modargs[] = {
|
||||
"server",
|
||||
"rate",
|
||||
"format",
|
||||
"channels",
|
||||
"sink_name",
|
||||
"description",
|
||||
"sink_properties",
|
||||
"server",
|
||||
"format",
|
||||
"rate",
|
||||
"channels",
|
||||
"description", /* supported for compatibility reasons, made redundant by sink_properties= */
|
||||
NULL
|
||||
};
|
||||
|
||||
|
|
@ -587,6 +588,12 @@ int pa__init(pa_module*m) {
|
|||
else
|
||||
pa_proplist_setf(data.proplist, PA_PROP_DEVICE_DESCRIPTION, "RAOP sink '%s'", server);
|
||||
|
||||
if (pa_modargs_get_proplist(ma, "sink_properties", data.proplist, PA_UPDATE_REPLACE) < 0) {
|
||||
pa_log("Invalid properties");
|
||||
pa_sink_new_data_done(&data);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
u->sink = pa_sink_new(m->core, &data, PA_SINK_LATENCY|PA_SINK_NETWORK);
|
||||
pa_sink_new_data_done(&data);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue