mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-01 22:58:47 -04:00
allow sending meta/policy events to clients
This commit is contained in:
parent
4bd9737725
commit
823431e447
17 changed files with 369 additions and 2 deletions
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue