[pulseaudio-commits] r2155 - /branches/prepare-0.9.10/src/modules/module-tunnel.c
svnmailer-noreply at 0pointer.de
svnmailer-noreply at 0pointer.de
Thu Mar 27 16:23:58 PDT 2008
Author: lennart
Date: Fri Mar 28 00:23:58 2008
New Revision: 2155
URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=2155&root=pulseaudio&view=rev
Log:
merge r2096 from trunk
Modified:
branches/prepare-0.9.10/src/modules/module-tunnel.c
Modified: branches/prepare-0.9.10/src/modules/module-tunnel.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/prepare-0.9.10/src/modules/module-tunnel.c?rev=2155&root=pulseaudio&r1=2154&r2=2155&view=diff
==============================================================================
--- branches/prepare-0.9.10/src/modules/module-tunnel.c (original)
+++ branches/prepare-0.9.10/src/modules/module-tunnel.c Fri Mar 28 00:23:58 2008
@@ -129,6 +129,8 @@
static void command_stream_killed(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata);
static void command_overflow(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata);
static void command_underflow(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata);
+static void command_suspend(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata);
+static void command_moved(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata);
static const pa_pdispatch_cb_t command_table[PA_COMMAND_MAX] = {
#ifdef TUNNEL_SINK
@@ -139,6 +141,10 @@
[PA_COMMAND_UNDERFLOW] = command_underflow,
[PA_COMMAND_PLAYBACK_STREAM_KILLED] = command_stream_killed,
[PA_COMMAND_RECORD_STREAM_KILLED] = command_stream_killed,
+ [PA_COMMAND_PLAYBACK_STREAM_SUSPENDED] = command_suspend,
+ [PA_COMMAND_RECORD_STREAM_SUSPENDED] = command_suspend,
+ [PA_COMMAND_PLAYBACK_STREAM_MOVED] = command_moved,
+ [PA_COMMAND_RECORD_STREAM_MOVED] = command_moved,
};
struct userdata {
@@ -224,6 +230,28 @@
pa_assert(u->pdispatch == pd);
pa_log_warn("Server signalled buffer underrun.");
+}
+
+static void command_suspend(pa_pdispatch *pd, PA_GCC_UNUSED uint32_t command, PA_GCC_UNUSED uint32_t tag, pa_tagstruct *t, void *userdata) {
+ struct userdata *u = userdata;
+
+ pa_assert(pd);
+ pa_assert(t);
+ pa_assert(u);
+ pa_assert(u->pdispatch == pd);
+
+ pa_log_debug("Server reports a stream suspension.");
+}
+
+static void command_moved(pa_pdispatch *pd, PA_GCC_UNUSED uint32_t command, PA_GCC_UNUSED uint32_t tag, pa_tagstruct *t, void *userdata) {
+ struct userdata *u = userdata;
+
+ pa_assert(pd);
+ pa_assert(t);
+ pa_assert(u);
+ pa_assert(u->pdispatch == pd);
+
+ pa_log_debug("Server reports a stream move.");
}
static void stream_cork(struct userdata *u, pa_bool_t cork) {
@@ -1058,6 +1086,18 @@
pa_tagstruct_putu32(reply, u->fragsize);
#endif
+ /* New flags added in 0.9.8 */
+ if (u->version >= 12) {
+ /* TODO: set these to useful values */
+ pa_tagstruct_put_boolean(reply, FALSE); /*no_remap*/
+ pa_tagstruct_put_boolean(reply, FALSE); /*no_remix*/
+ pa_tagstruct_put_boolean(reply, FALSE); /*fix_format*/
+ pa_tagstruct_put_boolean(reply, FALSE); /*fix_rate*/
+ pa_tagstruct_put_boolean(reply, FALSE); /*fix_channels*/
+ pa_tagstruct_put_boolean(reply, FALSE); /*no_move*/
+ pa_tagstruct_put_boolean(reply, FALSE); /*variable_rate*/
+ }
+
pa_pstream_send_tagstruct(u->pstream, reply);
pa_pdispatch_register_reply(u->pdispatch, tag, DEFAULT_TIMEOUT, create_stream_callback, u, NULL);
More information about the pulseaudio-commits
mailing list