diff options
author | Lennart Poettering <lennart@poettering.net> | 2009-05-28 02:39:22 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2009-05-28 02:39:22 +0200 |
commit | 1c4393acf0a641a4f462cfa6c368d23d9e55a1b8 (patch) | |
tree | d6c28d7e2c0ada5c091c404f0d6144aebafe4c04 /src/modules/module-pipe-source.c | |
parent | 208862698e8ebf6bebfd9a07e4cc4b43b3cd0d96 (diff) | |
download | pulseaudio-1c4393acf0a641a4f462cfa6c368d23d9e55a1b8.tar.gz |
modules: add {sink|source|card}_properties argument to all modules
Diffstat (limited to 'src/modules/module-pipe-source.c')
-rw-r--r-- | src/modules/module-pipe-source.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/modules/module-pipe-source.c b/src/modules/module-pipe-source.c index 6ed4fbfe2..61c9fc0eb 100644 --- a/src/modules/module-pipe-source.c +++ b/src/modules/module-pipe-source.c @@ -54,10 +54,11 @@ PA_MODULE_VERSION(PACKAGE_VERSION); PA_MODULE_LOAD_ONCE(FALSE); PA_MODULE_USAGE( "source_name=<name for the source> " + "source_properties=<properties for the source> " "file=<path of the FIFO> " "format=<sample format> " - "channels=<number of channels> " "rate=<sample rate> " + "channels=<number of channels> " "channel_map=<channel map>"); #define DEFAULT_FILE_NAME "/tmp/music.input" @@ -81,11 +82,12 @@ struct userdata { }; static const char* const valid_modargs[] = { + "source_name", + "source_properties", "file", + "format", "rate", "channels", - "format", - "source_name", "channel_map", NULL }; @@ -264,6 +266,12 @@ int pa__init(pa_module*m) { pa_source_new_data_set_sample_spec(&data, &ss); pa_source_new_data_set_channel_map(&data, &map); + if (pa_modargs_get_proplist(ma, "source_properties", data.proplist, PA_UPDATE_REPLACE) < 0) { + pa_log("Invalid properties"); + pa_source_new_data_done(&data); + goto fail; + } + u->source = pa_source_new(m->core, &data, PA_SOURCE_LATENCY); pa_source_new_data_done(&data); |