[pulseaudio-commits] [SCM] PulseAudio Sound Server branch, master, updated. v0.9.11-114-g8d596a9

Lennart Poettering gitmailer-noreply at 0pointer.de
Fri Aug 15 05:41:12 PDT 2008


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  916899a9737613a06ff50c9616f1a1016805f8bc (commit)

- Log -----------------------------------------------------------------
8d596a9... Make Multicast TTL for RTP configurable, patch from 'dfort'
f84536b... apply newly configured rules properly
63402b3... apply volumes properly more than once in a row
512c24c... apply the correct rules to sink inputs
f68a6e5... don't restore devices for direct-on-input streams
5a0e014... disable hotplug sounds by default
-----------------------------------------------------------------------

Summary of changes:
 src/daemon/default.pa.in            |    2 +-
 src/modules/module-stream-restore.c |   11 +++++++----
 src/modules/rtp/module-rtp-send.c   |   19 +++++++++++++++++--
 3 files changed, 25 insertions(+), 7 deletions(-)

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

commit 5a0e01404a7647c4776c91ac52a4e99f1ab24d03
Author: Lennart Poettering <lennart at poettering.net>
Date:   Fri Aug 15 14:32:33 2008 +0200

    disable hotplug sounds by default

diff --git a/src/daemon/default.pa.in b/src/daemon/default.pa.in
index cdaa8bb..5f35e3e 100755
--- a/src/daemon/default.pa.in
+++ b/src/daemon/default.pa.in
@@ -23,7 +23,7 @@
 
 ### Load something into the sample cache
 #load-sample-lazy x11-bell /usr/share/sounds/gtk-events/activate.wav
-load-sample-lazy pulse-hotplug /usr/share/sounds/startup3.wav
+#load-sample-lazy pulse-hotplug /usr/share/sounds/startup3.wav
 #load-sample-lazy pulse-coldplug /usr/share/sounds/startup3.wav
 #load-sample-lazy pulse-access /usr/share/sounds/generic.wav
 

commit f68a6e5cab772184caf89895766eec32da4c7598
Author: Lennart Poettering <lennart at poettering.net>
Date:   Fri Aug 15 14:33:18 2008 +0200

    don't restore devices for direct-on-input streams

diff --git a/src/modules/module-stream-restore.c b/src/modules/module-stream-restore.c
index b999304..bf62f94 100644
--- a/src/modules/module-stream-restore.c
+++ b/src/modules/module-stream-restore.c
@@ -360,6 +360,7 @@ static pa_hook_result_t source_output_new_hook_callback(pa_core *c, pa_source_ou
         pa_source *s;
 
         if (u->restore_device &&
+            !new_data->direct_on_input &&
             (s = pa_namereg_get(c, e->device, PA_NAMEREG_SOURCE, TRUE))) {
 
             pa_log_info("Restoring device for stream %s.", name);

commit 512c24c65abf42d2546491607da4fed286c79e1f
Author: Lennart Poettering <lennart at poettering.net>
Date:   Fri Aug 15 14:37:26 2008 +0200

    apply the correct rules to sink inputs

diff --git a/src/modules/module-stream-restore.c b/src/modules/module-stream-restore.c
index bf62f94..e0683e7 100644
--- a/src/modules/module-stream-restore.c
+++ b/src/modules/module-stream-restore.c
@@ -409,7 +409,7 @@ static void apply_entry(struct userdata *u, const char *name, struct entry *e) {
         char *n;
         pa_sink *s;
 
-        if (!(n = get_name(si->proplist, "sink_input")))
+        if (!(n = get_name(si->proplist, "sink-input")))
             continue;
 
         if (strcmp(name, n)) {

commit 63402b392be251ca5519cc668c3bf698aa33aed0
Author: Lennart Poettering <lennart at poettering.net>
Date:   Fri Aug 15 14:37:54 2008 +0200

    apply volumes properly more than once in a row

diff --git a/src/modules/module-stream-restore.c b/src/modules/module-stream-restore.c
index e0683e7..5b9922e 100644
--- a/src/modules/module-stream-restore.c
+++ b/src/modules/module-stream-restore.c
@@ -418,8 +418,9 @@ static void apply_entry(struct userdata *u, const char *name, struct entry *e) {
         }
 
         if (u->restore_volume) {
+            pa_cvolume v = e->volume;
             pa_log_info("Restoring volume for sink input %s.", name);
-            pa_sink_input_set_volume(si, pa_cvolume_remap(&e->volume, &e->channel_map, &si->channel_map));
+            pa_sink_input_set_volume(si, pa_cvolume_remap(&v, &e->channel_map, &si->channel_map));
         }
 
         if (u->restore_muted) {

commit f84536bc0a76d751fe5adaef76d227a41b3285fc
Author: Lennart Poettering <lennart at poettering.net>
Date:   Fri Aug 15 14:38:18 2008 +0200

    apply newly configured rules properly

diff --git a/src/modules/module-stream-restore.c b/src/modules/module-stream-restore.c
index 5b9922e..73b3250 100644
--- a/src/modules/module-stream-restore.c
+++ b/src/modules/module-stream-restore.c
@@ -554,7 +554,7 @@ static int extension_cb(pa_native_protocol *p, pa_module *m, pa_native_connectio
 
         case SUBCOMMAND_WRITE: {
             uint32_t mode;
-            pa_bool_t apply_immediately;
+            pa_bool_t apply_immediately = FALSE;
 
             if (pa_tagstruct_getu32(t, &mode) < 0 ||
                 pa_tagstruct_get_boolean(t, &apply_immediately) < 0)
@@ -573,6 +573,7 @@ static int extension_cb(pa_native_protocol *p, pa_module *m, pa_native_connectio
                 pa_bool_t muted;
                 struct entry entry;
                 datum key, data;
+                int k;
 
                 memset(&entry, 0, sizeof(entry));
 
@@ -595,7 +596,7 @@ static int extension_cb(pa_native_protocol *p, pa_module *m, pa_native_connectio
                 data.dptr = (void*) &entry;
                 data.dsize = sizeof(entry);
 
-                if (gdbm_store(u->gdbm_file, key, data, mode == PA_UPDATE_REPLACE ? GDBM_REPLACE : GDBM_INSERT) == 1)
+                if ((k = gdbm_store(u->gdbm_file, key, data, mode == PA_UPDATE_REPLACE ? GDBM_REPLACE : GDBM_INSERT)) == 0)
                     if (apply_immediately)
                         apply_entry(u, name, &entry);
             }

commit 8d596a9bc560eb6740e2f303cda712eb7169c3ce
Author: Lennart Poettering <lennart at poettering.net>
Date:   Fri Aug 15 14:40:08 2008 +0200

    Make Multicast TTL for RTP configurable, patch from 'dfort'
    
    Signed-off-by: Lennart Poettering <lennart at poettering.net>

diff --git a/src/modules/rtp/module-rtp-send.c b/src/modules/rtp/module-rtp-send.c
index 5e54225..aad2126 100644
--- a/src/modules/rtp/module-rtp-send.c
+++ b/src/modules/rtp/module-rtp-send.c
@@ -67,10 +67,12 @@ PA_MODULE_USAGE(
         "destination=<destination IP address> "
         "port=<port number> "
         "mtu=<maximum transfer unit> "
-        "loop=<loopback to local host?>"
+        "loop=<loopback to local host?> "
+        "ttl=<ttl value>"
 );
 
 #define DEFAULT_PORT 46000
+#define DEFAULT_TTL 1
 #define SAP_PORT 9875
 #define DEFAULT_DESTINATION "224.0.0.56"
 #define MEMBLOCKQ_MAXLENGTH (1024*170)
@@ -86,6 +88,7 @@ static const char* const valid_modargs[] = {
     "port",
     "mtu" ,
     "loop",
+    "ttl",
     NULL
 };
 
@@ -167,6 +170,7 @@ int pa__init(pa_module*m) {
     pa_modargs *ma = NULL;
     const char *dest;
     uint32_t port = DEFAULT_PORT, mtu;
+    unsigned char ttl = DEFAULT_TTL;
     int af, fd = -1, sap_fd = -1;
     pa_source *s;
     pa_sample_spec ss;
@@ -235,6 +239,11 @@ int pa__init(pa_module*m) {
     if (port & 1)
         pa_log_warn("Port number not even as suggested in RFC3550!");
 
+    if (pa_modargs_get_value_u32(ma, "ttl", &ttl) < 0 || ttl < 1 || ttl > 0xFF) {
+        pa_log("ttl= expects a numerical argument between 1 and 255.");
+        goto fail;
+    }
+
     dest = pa_modargs_get_value(ma, "destination", DEFAULT_DESTINATION);
 
     if (inet_pton(AF_INET6, dest, &sa6.sin6_addr) > 0) {
@@ -279,6 +288,11 @@ int pa__init(pa_module*m) {
         goto fail;
     }
 
+    if (ttl != DEFAULT_TTL && setsockopt(fd, IPPROTO_IP, IP_MULTICAST_TTL, &ttl, sizeof(ttl)) < 0) {
+        pa_log("IP_MULTICAST_TTL failed: %s", pa_cstrerror(errno));
+        goto fail;
+    }
+
     /* If the socket queue is full, let's drop packets */
     pa_make_fd_nonblock(fd);
     pa_make_udp_socket_low_delay(fd);
@@ -290,6 +304,7 @@ int pa__init(pa_module*m) {
     pa_proplist_sets(data.proplist, "rtp.destination", dest);
     pa_proplist_setf(data.proplist, "rtp.mtu", "%lu", (unsigned long) mtu);
     pa_proplist_setf(data.proplist, "rtp.port", "%lu", (unsigned long) port);
+    pa_proplist_setf(data.proplist, "rtp.ttl", "%lu", (unsigned long) ttl);
     data.driver = __FILE__;
     data.module = m;
     data.source = s;
@@ -342,7 +357,7 @@ int pa__init(pa_module*m) {
     pa_rtp_context_init_send(&u->rtp_context, fd, m->core->cookie, payload, pa_frame_size(&ss));
     pa_sap_context_init_send(&u->sap_context, sap_fd, p);
 
-    pa_log_info("RTP stream initialized with mtu %u on %s:%u, SSRC=0x%08x, payload=%u, initial sequence #%u", mtu, dest, port, u->rtp_context.ssrc, payload, u->rtp_context.sequence);
+    pa_log_info("RTP stream initialized with mtu %u on %s:%u ttl=%u, SSRC=0x%08x, payload=%u, initial sequence #%u", mtu, dest, port, ttl, u->rtp_context.ssrc, payload, u->rtp_context.sequence);
     pa_log_info("SDP-Data:\n%s\nEOF", p);
 
     pa_sap_send(&u->sap_context, 0);

-- 
hooks/post-receive
PulseAudio Sound Server



More information about the pulseaudio-commits mailing list