[pulseaudio-commits] [SCM] PulseAudio Sound Server branch, master, updated. v0.9.15-138-g2088626

Lennart Poettering gitmailer-noreply at 0pointer.de
Wed May 27 14:30:07 PDT 2009


This is an automated email from the git hooks/post-receive script. It was
generated because of a push to the "PulseAudio Sound Server" repository.

The master branch has been updated
      from  6601e099295d72bee68512b8ffd89c7529f78069 (commit)

- Log -----------------------------------------------------------------
2088626 null: introduce sink_properties= argument
-----------------------------------------------------------------------

Summary of changes:
 src/modules/module-null-sink.c |   21 ++++++++++++++-------
 1 files changed, 14 insertions(+), 7 deletions(-)

-----------------------------------------------------------------------

commit 208862698e8ebf6bebfd9a07e4cc4b43b3cd0d96
Author: Lennart Poettering <lennart at poettering.net>
Date:   Wed May 27 23:30:29 2009 +0200

    null: introduce sink_properties= argument

diff --git a/src/modules/module-null-sink.c b/src/modules/module-null-sink.c
index d9bab6b..c0c2fac 100644
--- a/src/modules/module-null-sink.c
+++ b/src/modules/module-null-sink.c
@@ -54,12 +54,12 @@ PA_MODULE_DESCRIPTION("Clocked NULL sink");
 PA_MODULE_VERSION(PACKAGE_VERSION);
 PA_MODULE_LOAD_ONCE(FALSE);
 PA_MODULE_USAGE(
+        "sink_name=<name of sink> "
+        "sink_properties=<properties for the sink> "
         "format=<sample format> "
-        "channels=<number of channels> "
         "rate=<sample rate> "
-        "sink_name=<name of sink> "
-        "channel_map=<channel map> "
-        "description=<description for the sink>");
+        "channels=<number of channels> "
+        "channel_map=<channel map>");
 
 #define DEFAULT_SINK_NAME "null"
 #define BLOCK_USEC (PA_USEC_PER_SEC * 2)
@@ -78,12 +78,13 @@ struct userdata {
 };
 
 static const char* const valid_modargs[] = {
-    "rate",
+    "sink_name",
+    "sink_properties",
     "format",
+    "rate",
     "channels",
-    "sink_name",
     "channel_map",
-    "description",
+    "description", /* supported for compatibility reasons, made redundant by sink_properties= */
     NULL
 };
 
@@ -289,6 +290,12 @@ int pa__init(pa_module*m) {
     pa_proplist_sets(data.proplist, PA_PROP_DEVICE_DESCRIPTION, pa_modargs_get_value(ma, "description", "Null Output"));
     pa_proplist_sets(data.proplist, PA_PROP_DEVICE_CLASS, "abstract");
 
+    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_DYNAMIC_LATENCY);
     pa_sink_new_data_done(&data);
 

-- 
hooks/post-receive
PulseAudio Sound Server



More information about the pulseaudio-commits mailing list