diff options
author | Tanu Kaskinen <tanuk@iki.fi> | 2018-03-13 19:40:38 +0200 |
---|---|---|
committer | Tanu Kaskinen <tanuk@iki.fi> | 2018-03-16 20:05:38 +0200 |
commit | b2537a8f38ad71e4dee57263310235abdf2b95a4 (patch) | |
tree | ec877552e8aa38047f2db65775b2282c53800426 /src/modules/module-waveout.c | |
parent | 73b8a57078b94033edf84de2fc0cfbe344c10dcd (diff) | |
download | pulseaudio-b2537a8f38ad71e4dee57263310235abdf2b95a4.tar.gz |
replace sink/source SET_STATE handlers with callbacks
There are no behaviour changes, the code from almost all the SET_STATE
handlers is moved with minimal changes to the newly introduced
set_state_in_io_thread() callback. The only exception is module-tunnel,
which has to call pa_sink_render() after pa_sink.thread_info.state has
been updated. The set_state_in_io_thread() callback is called before
updating that variable, so moving the SET_STATE handler code to the
callback isn't possible.
The purpose of this change is to make it easier to get state change
handling right in modules. Hooking to the SET_STATE messages in modules
required care in calling pa_sink/source_process_msg() at the right time
(or not calling it at all, as was the case on resume failures), and
there were a few bugs (fixed before this patch). Now the core takes care
of ordering things correctly.
Another motivation for this change is that there was some talk about
adding a suspend_cause variable to pa_sink/source.thread_info. The
variable would be updated in the core SET_STATE handler, but that would
not work with the old design, because in case of resume failures modules
didn't call the core message handler.
Diffstat (limited to 'src/modules/module-waveout.c')
0 files changed, 0 insertions, 0 deletions