[pulseaudio-commits] r1177 - in /trunk/src/pulse: introspect.c introspect.h
svnmailer-noreply at 0pointer.de
svnmailer-noreply at 0pointer.de
Mon Jul 31 14:55:10 PDT 2006
Author: lennart
Date: Mon Jul 31 23:55:09 2006
New Revision: 1177
URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=1177&root=pulseaudio&view=rev
Log:
wrap PA_COMMAND_MOVE_SINK_INPUT for libpulse
Modified:
trunk/src/pulse/introspect.c
trunk/src/pulse/introspect.h
Modified: trunk/src/pulse/introspect.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/pulse/introspect.c?rev=1177&root=pulseaudio&r1=1176&r2=1177&view=diff
==============================================================================
--- trunk/src/pulse/introspect.c (original)
+++ trunk/src/pulse/introspect.c Mon Jul 31 23:55:09 2006
@@ -1238,3 +1238,51 @@
return o;
}
+
+pa_operation* pa_context_move_sink_input_by_name(pa_context *c, uint32_t idx, char *sink_name, pa_context_success_cb_t cb, void* userdata) {
+ pa_operation *o;
+ pa_tagstruct *t;
+ uint32_t tag;
+
+ assert(c);
+ assert(c->ref >= 1);
+
+ PA_CHECK_VALIDITY_RETURN_NULL(c, c->state == PA_CONTEXT_READY, PA_ERR_BADSTATE);
+ PA_CHECK_VALIDITY_RETURN_NULL(c, idx != PA_INVALID_INDEX, PA_ERR_INVALID);
+ PA_CHECK_VALIDITY_RETURN_NULL(c, sink_name && *sink_name, PA_ERR_INVALID);
+
+ o = pa_operation_new(c, NULL, (pa_operation_cb_t) cb, userdata);
+
+ t = pa_tagstruct_command(c, PA_COMMAND_MOVE_SINK_INPUT, &tag);
+ pa_tagstruct_putu32(t, idx);
+ pa_tagstruct_putu32(t, PA_INVALID_INDEX);
+ pa_tagstruct_puts(t, sink_name);
+ pa_pstream_send_tagstruct(c->pstream, t);
+ pa_pdispatch_register_reply(c->pdispatch, tag, DEFAULT_TIMEOUT, pa_context_simple_ack_callback, pa_operation_ref(o), (pa_free_cb_t) pa_operation_unref);
+
+ return o;
+}
+
+pa_operation* pa_context_move_sink_input_by_index(pa_context *c, uint32_t idx, uint32_t sink_idx, pa_context_success_cb_t cb, void* userdata) {
+ pa_operation *o;
+ pa_tagstruct *t;
+ uint32_t tag;
+
+ assert(c);
+ assert(c->ref >= 1);
+
+ PA_CHECK_VALIDITY_RETURN_NULL(c, c->state == PA_CONTEXT_READY, PA_ERR_BADSTATE);
+ PA_CHECK_VALIDITY_RETURN_NULL(c, idx != PA_INVALID_INDEX, PA_ERR_INVALID);
+ PA_CHECK_VALIDITY_RETURN_NULL(c, sink_idx != PA_INVALID_INDEX, PA_ERR_INVALID);
+
+ o = pa_operation_new(c, NULL, (pa_operation_cb_t) cb, userdata);
+
+ t = pa_tagstruct_command(c, PA_COMMAND_MOVE_SINK_INPUT, &tag);
+ pa_tagstruct_putu32(t, idx);
+ pa_tagstruct_putu32(t, sink_idx);
+ pa_tagstruct_puts(t, NULL);
+ pa_pstream_send_tagstruct(c->pstream, t);
+ pa_pdispatch_register_reply(c->pdispatch, tag, DEFAULT_TIMEOUT, pa_context_simple_ack_callback, pa_operation_ref(o), (pa_free_cb_t) pa_operation_unref);
+
+ return o;
+}
Modified: trunk/src/pulse/introspect.h
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/pulse/introspect.h?rev=1177&root=pulseaudio&r1=1176&r2=1177&view=diff
==============================================================================
--- trunk/src/pulse/introspect.h (original)
+++ trunk/src/pulse/introspect.h Mon Jul 31 23:55:09 2006
@@ -484,6 +484,11 @@
/** Remove an autoload entry. \since 0.6 */
pa_operation* pa_context_remove_autoload_by_index(pa_context *c, uint32_t idx, pa_context_success_cb_t cb, void* userdata);
+/** Move the specified sink input to a different sink. \since 0.9.5 */
+pa_operation* pa_context_move_sink_input_by_name(pa_context *c, uint32_t idx, char *sink_name, pa_context_success_cb_t cb, void* userdata);
+
+/** Move the specified sink input to a different sink. \since 0.9.5 */
+pa_operation* pa_context_move_sink_input_by_index(pa_context *c, uint32_t idx, uint32_t sink_idx, pa_context_success_cb_t cb, void* userdata);
PA_C_DECL_END
More information about the pulseaudio-commits
mailing list