[pulseaudio-commits] [SCM] PulseAudio Sound Server branch, master, updated. v0.9.19-524-g7ba2227

Colin Guthrie gitmailer-noreply at 0pointer.de
Thu Aug 19 16:13:44 PDT 2010


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  9b6c84ad6e572854f199379177226e24c317d0d8 (commit)

- Log -----------------------------------------------------------------
7ba2227 core: New function: pa_module_update_proplist().
614eef8 loopback: Make stream names and roles configurable.
-----------------------------------------------------------------------

Summary of changes:
 src/modules/module-loopback.c |   41 ++++++++++++++++++++++++++++++++++-------
 src/pulsecore/module.c        |    9 +++++++++
 src/pulsecore/module.h        |    2 ++
 3 files changed, 45 insertions(+), 7 deletions(-)

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

commit 614eef8331028f5b11c669b8656939cffb37537a
Author: Tanu Kaskinen <tanu.kaskinen at digia.com>
Date:   Thu Jul 1 15:49:38 2010 +0300

    loopback: Make stream names and roles configurable.

diff --git a/src/modules/module-loopback.c b/src/modules/module-loopback.c
index 15ef96e..0695889 100644
--- a/src/modules/module-loopback.c
+++ b/src/modules/module-loopback.c
@@ -53,7 +53,11 @@ PA_MODULE_USAGE(
         "format=<sample format> "
         "rate=<sample rate> "
         "channels=<number of channels> "
-        "channel_map=<channel map>");
+        "channel_map=<channel map> "
+        "sink_input_name=<custom name for the sink input> "
+        "source_output_name=<custom name for the source output> "
+        "sink_input_role=<media.role for the sink input> "
+        "source_output_role=<media.role for the source output>");
 
 #define DEFAULT_LATENCY_MSEC 200
 
@@ -107,6 +111,10 @@ static const char* const valid_modargs[] = {
     "rate",
     "channels",
     "channel_map",
+    "sink_input_name",
+    "source_output_name",
+    "sink_input_role",
+    "source_output_role",
     NULL,
 };
 
@@ -669,11 +677,20 @@ int pa__init(pa_module *m) {
     sink_input_data.module = m;
     sink_input_data.sink = sink;
 
-    pa_proplist_setf(sink_input_data.proplist, PA_PROP_MEDIA_NAME, "Loopback of %s",
-                     pa_strnull(pa_proplist_gets(source->proplist, PA_PROP_DEVICE_DESCRIPTION)));
+    if ((n = pa_modargs_get_value(ma, "sink_input_name", NULL)))
+        pa_proplist_sets(sink_input_data.proplist, PA_PROP_MEDIA_NAME, n);
+    else
+        pa_proplist_setf(sink_input_data.proplist, PA_PROP_MEDIA_NAME, "Loopback from %s",
+                         pa_strnull(pa_proplist_gets(source->proplist, PA_PROP_DEVICE_DESCRIPTION)));
+
+    if ((n = pa_modargs_get_value(ma, "sink_input_role", NULL)))
+        pa_proplist_sets(sink_input_data.proplist, PA_PROP_MEDIA_ROLE, n);
+    else
+        pa_proplist_sets(sink_input_data.proplist, PA_PROP_MEDIA_ROLE, "abstract");
+
     if ((n = pa_proplist_gets(source->proplist, PA_PROP_DEVICE_ICON_NAME)))
         pa_proplist_sets(sink_input_data.proplist, PA_PROP_MEDIA_ICON_NAME, n);
-    pa_proplist_sets(sink_input_data.proplist, PA_PROP_MEDIA_ROLE, "abstract");
+
     pa_sink_input_new_data_set_sample_spec(&sink_input_data, &ss);
     pa_sink_input_new_data_set_channel_map(&sink_input_data, &map);
     sink_input_data.flags = PA_SINK_INPUT_VARIABLE_RATE;
@@ -702,11 +719,21 @@ int pa__init(pa_module *m) {
     source_output_data.driver = __FILE__;
     source_output_data.module = m;
     source_output_data.source = source;
-    pa_proplist_setf(source_output_data.proplist, PA_PROP_MEDIA_NAME, "Loopback to %s",
-                     pa_strnull(pa_proplist_gets(sink->proplist, PA_PROP_DEVICE_DESCRIPTION)));
+
+    if ((n = pa_modargs_get_value(ma, "source_output_name", NULL)))
+        pa_proplist_sets(source_output_data.proplist, PA_PROP_MEDIA_NAME, n);
+    else
+        pa_proplist_setf(source_output_data.proplist, PA_PROP_MEDIA_NAME, "Loopback to %s",
+                         pa_strnull(pa_proplist_gets(sink->proplist, PA_PROP_DEVICE_DESCRIPTION)));
+
+    if ((n = pa_modargs_get_value(ma, "source_output_role", NULL)))
+        pa_proplist_sets(source_output_data.proplist, PA_PROP_MEDIA_ROLE, n);
+    else
+        pa_proplist_sets(source_output_data.proplist, PA_PROP_MEDIA_ROLE, "abstract");
+
     if ((n = pa_proplist_gets(sink->proplist, PA_PROP_DEVICE_ICON_NAME)))
         pa_proplist_sets(source_output_data.proplist, PA_PROP_MEDIA_ICON_NAME, n);
-    pa_proplist_sets(source_output_data.proplist, PA_PROP_MEDIA_ROLE, "abstract");
+
     pa_source_output_new_data_set_sample_spec(&source_output_data, &ss);
     pa_sink_input_new_data_set_channel_map(&sink_input_data, &map);
 

commit 7ba22276d232270691dfb44328c6e794569a0c17
Author: Tanu Kaskinen <tanu.kaskinen at digia.com>
Date:   Fri Aug 13 13:25:41 2010 +0300

    core: New function: pa_module_update_proplist().

diff --git a/src/pulsecore/module.c b/src/pulsecore/module.c
index 5bcdd89..74e94da 100644
--- a/src/pulsecore/module.c
+++ b/src/pulsecore/module.c
@@ -263,3 +263,12 @@ int pa_module_get_n_used(pa_module*m) {
 
     return m->get_n_used(m);
 }
+
+void pa_module_update_proplist(pa_module *m, pa_update_mode_t mode, pa_proplist *p) {
+    pa_assert(m);
+
+    if (p)
+        pa_proplist_update(m->proplist, mode, p);
+
+    pa_subscription_post(m->core, PA_SUBSCRIPTION_EVENT_MODULE|PA_SUBSCRIPTION_EVENT_CHANGE, m->index);
+}
diff --git a/src/pulsecore/module.h b/src/pulsecore/module.h
index af89d79..0b6cb7c 100644
--- a/src/pulsecore/module.h
+++ b/src/pulsecore/module.h
@@ -62,6 +62,8 @@ void pa_module_unload_all(pa_core *c);
 
 int pa_module_get_n_used(pa_module*m);
 
+void pa_module_update_proplist(pa_module *m, pa_update_mode_t mode, pa_proplist *p);
+
 #define PA_MODULE_AUTHOR(s)                                     \
     const char *pa__get_author(void) { return s; }              \
     struct __stupid_useless_struct_to_allow_trailing_semicolon

-- 
hooks/post-receive
PulseAudio Sound Server



More information about the pulseaudio-commits mailing list