mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-26 07:00:07 -05:00
protocol-native: Add signal receiving capability
This patch extends the client subscription API, so that signals sent from PulseAudio can be processed. Within PulseAudio, a signal can be emitted using pa_signal_post(). The interface can be used to notify the client of events that are not covered by the subscription API (for example a button press event on a bluetooth headset). Setting up signal notification is very similar to using subscriptions. First the client needs to subscribe with pa_context_subscribe_signals() and then sets up a signal handler using pa_context_set_signal_callback(). The signal handler will receive three arguments in addition to the usual context and userdata: object_path - string that specifies the origin of the signal signal - string that specifies the type of the signal signal_parameters - optional string for additional information
This commit is contained in:
parent
ed3d4f0837
commit
6f07cd10ec
12 changed files with 183 additions and 7 deletions
8
PROTOCOL
8
PROTOCOL
|
|
@ -452,6 +452,14 @@ parameters:
|
|||
The command returns a string, which may be empty or NULL (NULL should be
|
||||
treated the same as an empty string).
|
||||
|
||||
## v36, implemented by >= 16.0
|
||||
|
||||
Added signal sending capability and command PA_COMMAND_SUBSCRIBE_SIGNALS.
|
||||
This command allows clients to subscribe to signals that PulseAudio sends.
|
||||
|
||||
parameters:
|
||||
uint64_t facility_mask - subscription mask
|
||||
|
||||
#### If you just changed the protocol, read this
|
||||
## module-tunnel depends on the sink/source/sink-input/source-input protocol
|
||||
## internals, so if you changed these, you might have broken module-tunnel.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue