[PATCH 2/9] Create nodes for source outputs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



All user-routable source outputs should have a node, so that those
entities stay user-routable also after source output routing has been
converted to be node-based.
---
 src/modules/echo-cancel/module-echo-cancel.c | 3 +++
 src/modules/module-loopback.c                | 4 ++++
 src/modules/module-remap-source.c            | 3 +++
 src/modules/module-virtual-source.c          | 3 +++
 src/modules/rtp/module-rtp-send.c            | 3 +++
 src/pulsecore/protocol-esound.c              | 3 +++
 src/pulsecore/protocol-http.c                | 3 +++
 src/pulsecore/protocol-simple.c              | 3 +++
 todo                                         | 1 -
 9 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/src/modules/echo-cancel/module-echo-cancel.c b/src/modules/echo-cancel/module-echo-cancel.c
index 7c3a039..2adce22 100644
--- a/src/modules/echo-cancel/module-echo-cancel.c
+++ b/src/modules/echo-cancel/module-echo-cancel.c
@@ -1867,6 +1867,9 @@ int pa__init(pa_module*m) {
     pa_source_output_new_data_set_sample_spec(&source_output_data, &source_output_ss);
     pa_source_output_new_data_set_channel_map(&source_output_data, &source_output_map);
 
+    pa_source_output_new_data_set_create_node(&source_output_data, true);
+    pa_node_new_data_set_fallback_name_prefix(&source_output_data.node_data, "echo-cancel");
+
     pa_source_output_new(&u->source_output, m->core, &source_output_data);
     pa_source_output_new_data_done(&source_output_data);
 
diff --git a/src/modules/module-loopback.c b/src/modules/module-loopback.c
index 4361fc7..c589e09 100644
--- a/src/modules/module-loopback.c
+++ b/src/modules/module-loopback.c
@@ -934,6 +934,10 @@ int pa__init(pa_module *m) {
 
     if (source_dont_move)
         source_output_data.flags |= PA_SOURCE_OUTPUT_DONT_MOVE;
+    else {
+        pa_source_output_new_data_set_create_node(&source_output_data, true);
+        pa_node_new_data_set_fallback_name_prefix(&source_output_data.node_data, "loopback");
+    }
 
     pa_source_output_new(&u->source_output, m->core, &source_output_data);
     pa_source_output_new_data_done(&source_output_data);
diff --git a/src/modules/module-remap-source.c b/src/modules/module-remap-source.c
index 2b6236c..4cdd7aa 100644
--- a/src/modules/module-remap-source.c
+++ b/src/modules/module-remap-source.c
@@ -359,6 +359,9 @@ int pa__init(pa_module*m) {
     pa_source_output_new_data_set_channel_map(&source_output_data, &stream_map);
     source_output_data.flags = remix ? 0 : PA_SOURCE_OUTPUT_NO_REMIX;
 
+    pa_source_output_new_data_set_create_node(&source_output_data, true);
+    pa_node_new_data_set_fallback_name_prefix(&source_output_data.node_data, "remap");
+
     pa_source_output_new(&u->source_output, m->core, &source_output_data);
     pa_source_output_new_data_done(&source_output_data);
 
diff --git a/src/modules/module-virtual-source.c b/src/modules/module-virtual-source.c
index e71a9b6..9d7fd31 100644
--- a/src/modules/module-virtual-source.c
+++ b/src/modules/module-virtual-source.c
@@ -585,6 +585,9 @@ int pa__init(pa_module*m) {
     pa_source_output_new_data_set_sample_spec(&source_output_data, &ss);
     pa_source_output_new_data_set_channel_map(&source_output_data, &map);
 
+    pa_source_output_new_data_set_create_node(&source_output_data, true);
+    pa_node_new_data_set_fallback_name_prefix(&source_output_data.node_data, "virtual");
+
     pa_source_output_new(&u->source_output, m->core, &source_output_data);
     pa_source_output_new_data_done(&source_output_data);
 
diff --git a/src/modules/rtp/module-rtp-send.c b/src/modules/rtp/module-rtp-send.c
index 7f05277..ff4c844 100644
--- a/src/modules/rtp/module-rtp-send.c
+++ b/src/modules/rtp/module-rtp-send.c
@@ -373,6 +373,9 @@ int pa__init(pa_module*m) {
     pa_source_output_new_data_set_channel_map(&data, &cm);
     data.flags = PA_SOURCE_OUTPUT_DONT_INHIBIT_AUTO_SUSPEND;
 
+    pa_source_output_new_data_set_create_node(&data, true);
+    pa_node_new_data_set_fallback_name_prefix(&data.node_data, "rtp-send");
+
     pa_source_output_new(&o, m->core, &data);
     pa_source_output_new_data_done(&data);
 
diff --git a/src/pulsecore/protocol-esound.c b/src/pulsecore/protocol-esound.c
index d69b554..3a17cd6 100644
--- a/src/pulsecore/protocol-esound.c
+++ b/src/pulsecore/protocol-esound.c
@@ -531,6 +531,9 @@ static int esd_proto_stream_record(connection *c, esd_proto_t request, const voi
         pa_source_output_new_data_set_source(&sdata, source, false);
     pa_source_output_new_data_set_sample_spec(&sdata, &ss);
 
+    pa_source_output_new_data_set_create_node(&sdata, true);
+    pa_node_new_data_set_fallback_name_prefix(&sdata.node_data, "esound");
+
     pa_source_output_new(&c->source_output, c->protocol->core, &sdata);
     pa_source_output_new_data_done(&sdata);
 
diff --git a/src/pulsecore/protocol-http.c b/src/pulsecore/protocol-http.c
index c2d9b60..bb55d2d 100644
--- a/src/pulsecore/protocol-http.c
+++ b/src/pulsecore/protocol-http.c
@@ -566,6 +566,9 @@ static void handle_listen_prefix(struct connection *c, const char *source_name)
     pa_source_output_new_data_set_sample_spec(&data, &ss);
     pa_source_output_new_data_set_channel_map(&data, &cm);
 
+    pa_source_output_new_data_set_create_node(&data, true);
+    pa_node_new_data_set_fallback_name_prefix(&data.node_data, "http");
+
     pa_source_output_new(&c->source_output, c->protocol->core, &data);
     pa_source_output_new_data_done(&data);
 
diff --git a/src/pulsecore/protocol-simple.c b/src/pulsecore/protocol-simple.c
index f155809..2e93636 100644
--- a/src/pulsecore/protocol-simple.c
+++ b/src/pulsecore/protocol-simple.c
@@ -599,6 +599,9 @@ void pa_simple_protocol_connect(pa_simple_protocol *p, pa_iochannel *io, pa_simp
         pa_proplist_update(data.proplist, PA_UPDATE_MERGE, c->client->proplist);
         pa_source_output_new_data_set_sample_spec(&data, &o->sample_spec);
 
+        pa_source_output_new_data_set_create_node(&data, true);
+        pa_node_new_data_set_fallback_name_prefix(&data.node_data, "simple");
+
         pa_source_output_new(&c->source_output, p->core, &data);
         pa_source_output_new_data_done(&data);
 
diff --git a/todo b/todo
index a28a79e..edf66e5 100644
--- a/todo
+++ b/todo
@@ -47,6 +47,5 @@ Backends for:
 - portaudio  (semi-done)
 
 Routing:
-- Create nodes for source outputs.
 - Create nodes for sinks.
 - Create nodes for sources.
-- 
1.8.3.1



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux