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

Lennart Poettering gitmailer-noreply at 0pointer.de
Mon Apr 13 16:46:15 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-tx branch has been updated
      from  a6541550fde2354196d4e6811ed812fb4a49419d (commit)

- Log -----------------------------------------------------------------
ca9cd14 add a few missing initializations
40d71e1 explcitly ignore return values of some functions marked with gcc's warn_unused_result attribute
845b312 bump version for final 0.9.15 release
a4cea4e core: when applying delay memblockq take monitored sink latency into account
2d94c93 pacat: add missing newline
4ee4a55 core: use pa_{source|sink}_get_latency_within_thread() at one more place
16324fc sort LINGUAS
-----------------------------------------------------------------------

Summary of changes:
 configure.ac                                |    2 +-
 po/LINGUAS                                  |    2 +-
 src/daemon/cpulimit.c                       |    2 +-
 src/modules/module-default-device-restore.c |    4 ++--
 src/modules/udev-util.c                     |    4 ++--
 src/pulsecore/sink-input.c                  |    5 +----
 src/pulsecore/source-output.c               |   24 ++++++++++++++++++++----
 src/tests/alsa-time-test.c                  |    2 +-
 src/tests/mainloop-test.c                   |    2 +-
 src/utils/pacat.c                           |    2 +-
 10 files changed, 31 insertions(+), 18 deletions(-)

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

commit 16324fc7be0f915a75ec5622dcaecbbc3e9e6d41
Author: Lennart Poettering <lennart at poettering.net>
Date:   Mon Apr 13 23:41:05 2009 +0200

    sort LINGUAS

diff --git a/po/LINGUAS b/po/LINGUAS
index b97f64c..819fcc7 100644
--- a/po/LINGUAS
+++ b/po/LINGUAS
@@ -16,8 +16,8 @@ or
 pa
 pl
 pt_BR
-sr at latin
 sr
+sr at latin
 sv
 ta
 te

commit 4ee4a5561767fb96b2e98b9daa79efa58e357595
Author: Lennart Poettering <lennart at poettering.net>
Date:   Tue Apr 14 01:03:10 2009 +0200

    core: use pa_{source|sink}_get_latency_within_thread() at one more place

diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c
index 65f1fd5..0229918 100644
--- a/src/pulsecore/sink-input.c
+++ b/src/pulsecore/sink-input.c
@@ -1362,12 +1362,9 @@ int pa_sink_input_process_msg(pa_msgobject *o, int code, void *userdata, int64_t
 
         case PA_SINK_INPUT_MESSAGE_GET_LATENCY: {
             pa_usec_t *r = userdata;
-            pa_usec_t sink_usec = 0;
 
             r[0] += pa_bytes_to_usec(pa_memblockq_get_length(i->thread_info.render_memblockq), &i->sink->sample_spec);
-
-            if (i->sink->parent.process_msg(PA_MSGOBJECT(i->sink), PA_SINK_MESSAGE_GET_LATENCY, &sink_usec, 0, NULL) >= 0)
-                r[1] += sink_usec;
+            r[1] += pa_sink_get_latency_within_thread(i->sink);
 
             return 0;
         }
diff --git a/src/pulsecore/source-output.c b/src/pulsecore/source-output.c
index 3ee2673..cc0ebe6 100644
--- a/src/pulsecore/source-output.c
+++ b/src/pulsecore/source-output.c
@@ -850,12 +850,9 @@ int pa_source_output_process_msg(pa_msgobject *mo, int code, void *userdata, int
 
         case PA_SOURCE_OUTPUT_MESSAGE_GET_LATENCY: {
             pa_usec_t *r = userdata;
-            pa_usec_t source_usec = 0;
 
             r[0] += pa_bytes_to_usec(pa_memblockq_get_length(o->thread_info.delay_memblockq), &o->source->sample_spec);
-
-            if (o->source->parent.process_msg(PA_MSGOBJECT(o->source), PA_SOURCE_MESSAGE_GET_LATENCY, &source_usec, 0, NULL) >= 0)
-                r[1] += source_usec;
+            r[1] += pa_source_get_latency_within_thread(o->source);
 
             return 0;
         }

commit 2d94c939575e979132191b59a55d89ed34fa51ed
Author: Lennart Poettering <lennart at poettering.net>
Date:   Tue Apr 14 01:03:34 2009 +0200

    pacat: add missing newline

diff --git a/src/utils/pacat.c b/src/utils/pacat.c
index 180de48..15e842f 100644
--- a/src/utils/pacat.c
+++ b/src/utils/pacat.c
@@ -796,7 +796,7 @@ int main(int argc, char *argv[]) {
 
     /* Connect the context */
     if (pa_context_connect(context, server, 0, NULL) < 0) {
-        fprintf(stderr, _("pa_context_connect() failed: %s"), pa_strerror(pa_context_errno(context)));
+        fprintf(stderr, _("pa_context_connect() failed: %s\n"), pa_strerror(pa_context_errno(context)));
         goto quit;
     }
 

commit a4cea4e469d3baf27890820eba030b7acdf63daa
Author: Lennart Poettering <lennart at poettering.net>
Date:   Tue Apr 14 01:04:17 2009 +0200

    core: when applying delay memblockq take monitored sink latency into account

diff --git a/src/pulsecore/source-output.c b/src/pulsecore/source-output.c
index cc0ebe6..4ba25ae 100644
--- a/src/pulsecore/source-output.c
+++ b/src/pulsecore/source-output.c
@@ -440,6 +440,25 @@ void pa_source_output_push(pa_source_output *o, const pa_memchunk *chunk) {
 
     limit = o->process_rewind ? 0 : o->source->thread_info.max_rewind;
 
+    if (limit > 0 && o->source->monitor_of) {
+        pa_usec_t latency;
+        size_t n;
+
+        /* Hmm, check the latency for knowing how much of the buffered
+         * data is actually still unplayed and might hence still
+         * change. This is suboptimal. Ideally we'd have a call like
+         * pa_sink_get_changeable_size() or so that tells us how much
+         * of the queued data is actually still changeable. Hence
+         * FIXME! */
+
+        latency = pa_sink_get_latency_within_thread(o->source->monitor_of);
+
+        n = pa_usec_to_bytes(latency, &o->source->sample_spec);
+
+        if (n < limit)
+            limit = n;
+    }
+
     /* Implement the delay queue */
     while ((length = pa_memblockq_get_length(o->thread_info.delay_memblockq)) > limit) {
         pa_memchunk qchunk;

commit 845b312f4499eefe10a2be163ed8b5bc226b971d
Author: Lennart Poettering <lennart at poettering.net>
Date:   Tue Apr 14 01:10:47 2009 +0200

    bump version for final 0.9.15 release

diff --git a/configure.ac b/configure.ac
index e7f3753..25cee57 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,7 +26,7 @@ m4_define(pa_major, [0])
 m4_define(pa_minor, [9])
 m4_define(pa_micro, [15])
 
-AC_INIT([pulseaudio],[pa_major.pa_minor.pa_micro-test8],[mzchyfrnhqvb (at) 0pointer (dot) net])
+AC_INIT([pulseaudio],[pa_major.pa_minor.pa_micro],[mzchyfrnhqvb (at) 0pointer (dot) net])
 AC_CONFIG_SRCDIR([src/daemon/main.c])
 AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_HEADERS([config.h])

commit 40d71e1f4914e021f321425a37825933b595a860
Author: Lennart Poettering <lennart at poettering.net>
Date:   Tue Apr 14 01:22:42 2009 +0200

    explcitly ignore return values of some functions marked with gcc's warn_unused_result attribute

diff --git a/src/daemon/cpulimit.c b/src/daemon/cpulimit.c
index 64728e2..45d6a0f 100644
--- a/src/daemon/cpulimit.c
+++ b/src/daemon/cpulimit.c
@@ -139,7 +139,7 @@ static void signal_handler(int sig) {
             write_err("Soft CPU time limit exhausted, terminating.\n");
 
             /* Try a soft cleanup */
-            write(the_pipe[1], &c, sizeof(c));
+            (void) write(the_pipe[1], &c, sizeof(c));
             phase = PHASE_SOFT;
             reset_cpu_time(CPUTIME_INTERVAL_HARD);
 
diff --git a/src/modules/module-default-device-restore.c b/src/modules/module-default-device-restore.c
index a25aafc..0092d1c 100644
--- a/src/modules/module-default-device-restore.c
+++ b/src/modules/module-default-device-restore.c
@@ -63,7 +63,7 @@ static void load(struct userdata *u) {
         char ln[256] = "";
         pa_sink *s;
 
-        fgets(ln, sizeof(ln)-1, f);
+        (void) fgets(ln, sizeof(ln)-1, f);
         pa_strip_nl(ln);
         fclose(f);
 
@@ -84,7 +84,7 @@ static void load(struct userdata *u) {
         char ln[256] = "";
         pa_source *s;
 
-        fgets(ln, sizeof(ln)-1, f);
+        (void) fgets(ln, sizeof(ln)-1, f);
         pa_strip_nl(ln);
         fclose(f);
 
diff --git a/src/tests/mainloop-test.c b/src/tests/mainloop-test.c
index d892623..4ca6351 100644
--- a/src/tests/mainloop-test.c
+++ b/src/tests/mainloop-test.c
@@ -46,7 +46,7 @@ static pa_defer_event *de;
 
 static void iocb(pa_mainloop_api*a, pa_io_event *e, int fd, pa_io_event_flags_t f, void *userdata) {
     unsigned char c;
-    read(fd, &c, sizeof(c));
+    (void) read(fd, &c, sizeof(c));
     fprintf(stderr, "IO EVENT: %c\n", c < 32 ? '.' : c);
     a->defer_enable(de, 1);
 }

commit ca9cd1465905df283c56ac8e25b630aeba65273f
Author: Lennart Poettering <lennart at poettering.net>
Date:   Tue Apr 14 01:23:07 2009 +0200

    add a few missing initializations

diff --git a/src/modules/udev-util.c b/src/modules/udev-util.c
index 8ffb76a..144ad79 100644
--- a/src/modules/udev-util.c
+++ b/src/modules/udev-util.c
@@ -61,7 +61,7 @@ static int read_id(struct udev_device *d, const char *n) {
 int pa_udev_get_info(pa_core *core, pa_proplist *p, int card_idx) {
     int r = -1;
     struct udev *udev;
-    struct udev_device *card;
+    struct udev_device *card = NULL;
     char *t;
     const char *v;
     int id;
@@ -89,7 +89,7 @@ int pa_udev_get_info(pa_core *core, pa_proplist *p, int card_idx) {
             pa_proplist_sets(p, PA_PROP_DEVICE_BUS, v);
 
     if (!pa_proplist_contains(p, PA_PROP_DEVICE_VENDOR_ID))
-        if ((id = read_id(card, "ID_VENDOR_ID")) > 0 && *v)
+        if ((id = read_id(card, "ID_VENDOR_ID")) > 0)
             pa_proplist_setf(p, PA_PROP_DEVICE_VENDOR_ID, "%04x", id);
 
     if (!pa_proplist_contains(p, PA_PROP_DEVICE_VENDOR_NAME)) {
diff --git a/src/tests/alsa-time-test.c b/src/tests/alsa-time-test.c
index e852c3f..233bbe6 100644
--- a/src/tests/alsa-time-test.c
+++ b/src/tests/alsa-time-test.c
@@ -23,7 +23,7 @@ int main(int argc, char *argv[]) {
     int dir = 1;
     struct timespec start, last_timestamp = { 0, 0 };
     uint64_t start_us;
-    snd_pcm_sframes_t last_avail, last_delay;
+    snd_pcm_sframes_t last_avail = 0, last_delay = 0;
     struct pollfd *pollfds;
     int n_pollfd;
     int64_t sample_count = 0;

-- 
hooks/post-receive
PulseAudio Sound Server



More information about the pulseaudio-commits mailing list