[pulseaudio-commits] [SCM] PulseAudio Sound Server branch, master, updated. d1362b56b706aca62516b9b6e112282a7f26a896

Lennart Poettering gitmailer-noreply at 0pointer.de
Fri Jun 20 17:29:11 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  d3c1c920f05b5576c15152b70966dc7bf2b81dc1 (commit)

- Log -----------------------------------------------------------------
d1362b5... call the right function in the right context
d9f8b6a... since the sink is unlinked before the sink input we need to make sure we don't call any function for unlinked sinks from any sink input callback
947d8b4... execute detach callback before we change the state to UNLINKED
37bc240... allow sinks to be created with max_request initialized to 0, so that the data can be filled in later when attaching to some piggybacked sink
-----------------------------------------------------------------------

Summary of changes:
 src/modules/module-ladspa-sink.c |   12 ++++++------
 src/modules/module-remap-sink.c  |   12 ++++++------
 src/pulsecore/sink.c             |    5 ++---
 3 files changed, 14 insertions(+), 15 deletions(-)

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

commit 37bc240ee93fe82ef2c6f0407ab0c8de6fbd0794
Author: Lennart Poettering <lennart at poettering.net>
Date:   Sat Jun 21 02:24:23 2008 +0200

    allow sinks to be created with max_request initialized to 0, so that the data can be filled in later when attaching to some piggybacked sink

diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c
index 4d3b42c..77a0c56 100644
--- a/src/pulsecore/sink.c
+++ b/src/pulsecore/sink.c
@@ -305,7 +305,6 @@ void pa_sink_put(pa_sink* s) {
     /* The following fields must be initialized properly when calling _put() */
     pa_assert(s->asyncmsgq);
     pa_assert(s->rtpoll);
-    pa_assert(s->thread_info.max_request > 0);
     pa_assert(!s->thread_info.min_latency || !s->thread_info.max_latency ||
               s->thread_info.min_latency <= s->thread_info.max_latency);
 

commit 947d8b4c098beb13cf4822e49c5c6b41a4856135
Author: Lennart Poettering <lennart at poettering.net>
Date:   Sat Jun 21 02:24:59 2008 +0200

    execute detach callback before we change the state to UNLINKED

diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c
index 77a0c56..edb023b 100644
--- a/src/pulsecore/sink.c
+++ b/src/pulsecore/sink.c
@@ -1038,11 +1038,11 @@ int pa_sink_process_msg(pa_msgobject *o, int code, void *userdata, int64_t offse
              * sink input handling a few lines down at
              * PA_SINK_MESSAGE_PREPAPRE_MOVE, too. */
 
-            pa_sink_input_set_state_within_thread(i, i->state);
-
             if (i->detach)
                 i->detach(i);
 
+            pa_sink_input_set_state_within_thread(i, i->state);
+
             pa_assert(i->thread_info.attached);
             i->thread_info.attached = FALSE;
 

commit d9f8b6a5030f9b9ef7cf255eedbe044c97069a19
Author: Lennart Poettering <lennart at poettering.net>
Date:   Sat Jun 21 02:28:34 2008 +0200

    since the sink is unlinked before the sink input we need to make sure we don't call any function for unlinked sinks from any sink input callback

diff --git a/src/modules/module-ladspa-sink.c b/src/modules/module-ladspa-sink.c
index ca1c05c..d86a72f 100644
--- a/src/modules/module-ladspa-sink.c
+++ b/src/modules/module-ladspa-sink.c
@@ -260,7 +260,7 @@ static void sink_input_update_max_rewind_cb(pa_sink_input *i, size_t nbytes) {
     pa_sink_input_assert_ref(i);
     pa_assert_se(u = i->userdata);
 
-    if (!u->sink)
+    if (!u->sink || !PA_SINK_IS_LINKED(u->sink->thread_info.state))
         return;
 
     pa_memblockq_set_maxrewind(u->memblockq, nbytes);
@@ -274,7 +274,7 @@ static void sink_input_update_max_request_cb(pa_sink_input *i, size_t nbytes) {
     pa_sink_input_assert_ref(i);
     pa_assert_se(u = i->userdata);
 
-    if (!u->sink)
+    if (!u->sink || !PA_SINK_IS_LINKED(u->sink->thread_info.state))
         return;
 
     pa_sink_set_max_request(u->sink, nbytes);
@@ -287,7 +287,7 @@ static void sink_input_update_sink_latency_range_cb(pa_sink_input *i) {
     pa_sink_input_assert_ref(i);
     pa_assert_se(u = i->userdata);
 
-    if (!u->sink)
+    if (!u->sink || !PA_SINK_IS_LINKED(u->sink->thread_info.state))
         return;
 
     pa_sink_update_latency_range(u->sink, i->sink->thread_info.min_latency, i->sink->thread_info.max_latency);
@@ -300,7 +300,7 @@ static void sink_input_detach_cb(pa_sink_input *i) {
     pa_sink_input_assert_ref(i);
     pa_assert_se(u = i->userdata);
 
-    if (!u->sink)
+    if (!u->sink || !PA_SINK_IS_LINKED(u->sink->thread_info.state))
         return;
 
     pa_sink_detach_within_thread(u->sink);
@@ -315,7 +315,7 @@ static void sink_input_attach_cb(pa_sink_input *i) {
     pa_sink_input_assert_ref(i);
     pa_assert_se(u = i->userdata);
 
-    if (!u->sink)
+    if (!u->sink || !PA_SINK_IS_LINKED(u->sink->thread_info.state))
         return;
 
     pa_sink_set_asyncmsgq(u->sink, i->sink->asyncmsgq);
diff --git a/src/modules/module-remap-sink.c b/src/modules/module-remap-sink.c
index ac39fa1..2c9b6da 100644
--- a/src/modules/module-remap-sink.c
+++ b/src/modules/module-remap-sink.c
@@ -179,7 +179,7 @@ static void sink_input_update_max_rewind_cb(pa_sink_input *i, size_t nbytes) {
     pa_sink_input_assert_ref(i);
     pa_assert_se(u = i->userdata);
 
-    if (!u->sink)
+    if (!u->sink || !PA_SINK_IS_LINKED(u->sink->thread_info.state))
         return;
 
     pa_sink_set_max_rewind(u->sink, nbytes);
@@ -192,7 +192,7 @@ static void sink_input_update_max_request_cb(pa_sink_input *i, size_t nbytes) {
     pa_sink_input_assert_ref(i);
     pa_assert_se(u = i->userdata);
 
-    if (!u->sink)
+    if (!u->sink || !PA_SINK_IS_LINKED(u->sink->thread_info.state))
         return;
 
     pa_sink_set_max_request(u->sink, nbytes);
@@ -205,7 +205,7 @@ static void sink_input_update_sink_latency_range_cb(pa_sink_input *i) {
     pa_sink_input_assert_ref(i);
     pa_assert_se(u = i->userdata);
 
-    if (!u->sink)
+    if (!u->sink || !PA_SINK_IS_LINKED(u->sink->thread_info.state))
         return;
 
     pa_sink_update_latency_range(u->sink, i->sink->thread_info.min_latency, i->sink->thread_info.max_latency);
@@ -218,7 +218,7 @@ static void sink_input_detach_cb(pa_sink_input *i) {
     pa_sink_input_assert_ref(i);
     pa_assert_se(u = i->userdata);
 
-    if (!u->sink)
+    if (!u->sink || !PA_SINK_IS_LINKED(u->sink->thread_info.state))
         return;
 
     pa_sink_detach_within_thread(u->sink);
@@ -233,7 +233,7 @@ static void sink_input_attach_cb(pa_sink_input *i) {
     pa_sink_input_assert_ref(i);
     pa_assert_se(u = i->userdata);
 
-    if (!u->sink)
+    if (!u->sink || !PA_SINK_IS_LINKED(u->sink->thread_info.state))
         return;
 
     pa_sink_set_asyncmsgq(u->sink, i->sink->asyncmsgq);

commit d1362b56b706aca62516b9b6e112282a7f26a896
Author: Lennart Poettering <lennart at poettering.net>
Date:   Sat Jun 21 02:29:03 2008 +0200

    call the right function in the right context

diff --git a/src/modules/module-ladspa-sink.c b/src/modules/module-ladspa-sink.c
index d86a72f..3e0babf 100644
--- a/src/modules/module-ladspa-sink.c
+++ b/src/modules/module-ladspa-sink.c
@@ -322,7 +322,7 @@ static void sink_input_attach_cb(pa_sink_input *i) {
     pa_sink_set_rtpoll(u->sink, i->sink->rtpoll);
     pa_sink_attach_within_thread(u->sink);
 
-    pa_sink_set_latency_range(u->sink, u->master->thread_info.min_latency, u->master->thread_info.max_latency);
+    pa_sink_update_latency_range(u->sink, u->master->thread_info.min_latency, u->master->thread_info.max_latency);
 }
 
 /* Called from main context */
diff --git a/src/modules/module-remap-sink.c b/src/modules/module-remap-sink.c
index 2c9b6da..c87b1ec 100644
--- a/src/modules/module-remap-sink.c
+++ b/src/modules/module-remap-sink.c
@@ -240,7 +240,7 @@ static void sink_input_attach_cb(pa_sink_input *i) {
     pa_sink_set_rtpoll(u->sink, i->sink->rtpoll);
     pa_sink_attach_within_thread(u->sink);
 
-    pa_sink_set_latency_range(u->sink, u->master->thread_info.min_latency, u->master->thread_info.max_latency);
+    pa_sink_update_latency_range(u->sink, u->master->thread_info.min_latency, u->master->thread_info.max_latency);
 }
 
 /* Called from main context */

-- 
hooks/post-receive
PulseAudio Sound Server



More information about the pulseaudio-commits mailing list