[pulseaudio-commits] [SCM] PulseAudio Sound Server branch, master, updated. v0.9.16-test7-89-g12c7460

Lennart Poettering gitmailer-noreply at 0pointer.de
Wed Sep 9 17:15:43 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 branch has been updated
      from  b04320770909d36591ba74c18a40c4495178b414 (commit)

- Log -----------------------------------------------------------------
12c7460 libpulse: don't support pa_context_get_card_info_list() on servers that cannot handle it
807f2a9 native: send PA_COMMAND_PLAYBACK_BUFFER_ATTR_CHANGED messages only to clients that understand it
-----------------------------------------------------------------------

Summary of changes:
 src/pulse/introspect.c          |    2 ++
 src/pulsecore/protocol-native.c |   28 +++++++++++++++-------------
 2 files changed, 17 insertions(+), 13 deletions(-)

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

commit 807f2a9923572a8d88e10672d0cb5886688bb9ff
Author: Lennart Poettering <lennart at poettering.net>
Date:   Thu Sep 10 02:15:12 2009 +0200

    native: send PA_COMMAND_PLAYBACK_BUFFER_ATTR_CHANGED messages only to clients that understand it

diff --git a/src/pulsecore/protocol-native.c b/src/pulsecore/protocol-native.c
index 17aee4b..d06dd4e 100644
--- a/src/pulsecore/protocol-native.c
+++ b/src/pulsecore/protocol-native.c
@@ -826,24 +826,26 @@ static int playback_stream_process_msg(pa_msgobject *o, int code, void*userdata,
             pa_pstream_send_simple_ack(s->connection->pstream, PA_PTR_TO_UINT(userdata));
             break;
 
-        case PLAYBACK_STREAM_MESSAGE_UPDATE_TLENGTH: {
-            pa_tagstruct *t;
+        case PLAYBACK_STREAM_MESSAGE_UPDATE_TLENGTH:
 
             s->buffer_attr.tlength = (uint32_t) offset;
 
-            t = pa_tagstruct_new(NULL, 0);
-            pa_tagstruct_putu32(t, PA_COMMAND_PLAYBACK_BUFFER_ATTR_CHANGED);
-            pa_tagstruct_putu32(t, (uint32_t) -1); /* tag */
-            pa_tagstruct_putu32(t, s->index);
-            pa_tagstruct_putu32(t, s->buffer_attr.maxlength);
-            pa_tagstruct_putu32(t, s->buffer_attr.tlength);
-            pa_tagstruct_putu32(t, s->buffer_attr.prebuf);
-            pa_tagstruct_putu32(t, s->buffer_attr.minreq);
-            pa_tagstruct_put_usec(t, s->configured_sink_latency);
-            pa_pstream_send_tagstruct(s->connection->pstream, t);
+            if (s->connection->version >= 15) {
+                pa_tagstruct *t;
+
+                t = pa_tagstruct_new(NULL, 0);
+                pa_tagstruct_putu32(t, PA_COMMAND_PLAYBACK_BUFFER_ATTR_CHANGED);
+                pa_tagstruct_putu32(t, (uint32_t) -1); /* tag */
+                pa_tagstruct_putu32(t, s->index);
+                pa_tagstruct_putu32(t, s->buffer_attr.maxlength);
+                pa_tagstruct_putu32(t, s->buffer_attr.tlength);
+                pa_tagstruct_putu32(t, s->buffer_attr.prebuf);
+                pa_tagstruct_putu32(t, s->buffer_attr.minreq);
+                pa_tagstruct_put_usec(t, s->configured_sink_latency);
+                pa_pstream_send_tagstruct(s->connection->pstream, t);
+            }
 
             break;
-        }
     }
 
     return 0;

commit 12c7460e404c94a364a23434ca28ec2bcc698431
Author: Lennart Poettering <lennart at poettering.net>
Date:   Thu Sep 10 02:16:00 2009 +0200

    libpulse: don't support pa_context_get_card_info_list() on servers that cannot handle it

diff --git a/src/pulse/introspect.c b/src/pulse/introspect.c
index 27a587c..100413e 100644
--- a/src/pulse/introspect.c
+++ b/src/pulse/introspect.c
@@ -834,6 +834,8 @@ pa_operation* pa_context_get_card_info_by_name(pa_context *c, const char*name, p
 }
 
 pa_operation* pa_context_get_card_info_list(pa_context *c, pa_card_info_cb_t cb, void *userdata) {
+    PA_CHECK_VALIDITY_RETURN_NULL(c, c->version >= 15, PA_ERR_NOTSUPPORTED);
+
     return pa_context_send_simple_command(c, PA_COMMAND_GET_CARD_INFO_LIST, context_get_card_info_callback, (pa_operation_cb_t) cb, userdata);
 }
 

-- 
hooks/post-receive
PulseAudio Sound Server



More information about the pulseaudio-commits mailing list