allow sending meta/policy events to clients

This commit is contained in:
Lennart Poettering 2009-02-12 03:18:05 +01:00
parent 4bd9737725
commit 823431e447
17 changed files with 369 additions and 2 deletions

View file

@ -238,6 +238,18 @@ static void stream_moved_callback(pa_stream *s, void *userdata) {
fprintf(stderr, _("Stream moved to device %s (%u, %ssuspended).%s \n"), pa_stream_get_device_name(s), pa_stream_get_device_index(s), pa_stream_is_suspended(s) ? "" : _("not "), CLEAR_LINE);
}
static void stream_event_callback(pa_stream *s, const char *name, pa_proplist *pl, void *userdata) {
char *t;
assert(s);
assert(name);
assert(pl);
t = pa_proplist_to_string_sep(pl, ", ");
fprintf(stderr, "Got event '%s', properties '%s'\n", name, t);
pa_xfree(t);
}
/* This is called whenever the context status changes */
static void context_state_callback(pa_context *c, void *userdata) {
assert(c);
@ -271,6 +283,7 @@ static void context_state_callback(pa_context *c, void *userdata) {
pa_stream_set_underflow_callback(stream, stream_underflow_callback, NULL);
pa_stream_set_overflow_callback(stream, stream_overflow_callback, NULL);
pa_stream_set_started_callback(stream, stream_started_callback, NULL);
pa_stream_set_event_callback(stream, stream_event_callback, NULL);
if (latency > 0) {
memset(&buffer_attr, 0, sizeof(buffer_attr));