diff options
author | Colin Guthrie <colin@mageia.org> | 2011-06-07 12:18:17 +0200 |
---|---|---|
committer | Colin Guthrie <colin@mageia.org> | 2011-06-22 23:12:19 +0100 |
commit | 35f99c6e31d90439f2bfbefb8b45cff323b40661 (patch) | |
tree | 3b479a58be367d5fbf015f12c74682fc31a0a28a /src/pulse/context.c | |
parent | 695d5363803b7051f85bef82b55220aa37b212a5 (diff) |
device-restore: Add a new protocol extension for device-restore.
This simply exposes the formats that a device supports
via a simple protocol extension that will allow clients
to setup what a connected receiver supports format wise.
Diffstat (limited to 'src/pulse/context.c')
-rw-r--r-- | src/pulse/context.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/pulse/context.c b/src/pulse/context.c index 1480af53..5dd780bd 100644 --- a/src/pulse/context.c +++ b/src/pulse/context.c @@ -124,6 +124,9 @@ static void reset_callbacks(pa_context *c) { c->ext_device_manager.callback = NULL; c->ext_device_manager.userdata = NULL; + c->ext_device_restore.callback = NULL; + c->ext_device_restore.userdata = NULL; + c->ext_stream_restore.callback = NULL; c->ext_stream_restore.userdata = NULL; } @@ -1425,10 +1428,12 @@ void pa_command_extension(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_t goto finish; } - if (!strcmp(name, "module-stream-restore")) - pa_ext_stream_restore_command(c, tag, t); - else if (!strcmp(name, "module-device-manager")) + if (pa_streq(name, "module-device-manager")) pa_ext_device_manager_command(c, tag, t); + else if (pa_streq(name, "module-device-restore")) + pa_ext_device_manager_command(c, tag, t); + else if (pa_streq(name, "module-stream-restore")) + pa_ext_stream_restore_command(c, tag, t); else pa_log(_("Received message for unknown extension '%s'"), name); |