mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-02 09:01:46 -05:00
core: add functions to query max_rewind/max_request values from streams
This commit is contained in:
parent
9a95fe49c8
commit
5ee4069e9e
4 changed files with 33 additions and 0 deletions
|
|
@ -802,6 +802,25 @@ void pa_sink_input_process_rewind(pa_sink_input *i, size_t nbytes /* in sink sam
|
|||
i->thread_info.dont_rewind_render = FALSE;
|
||||
}
|
||||
|
||||
/* Called from thread context */
|
||||
size_t pa_sink_input_get_max_rewind(pa_sink_input *i) {
|
||||
pa_sink_input_assert_ref(i);
|
||||
pa_sink_input_assert_io_context(i);
|
||||
|
||||
return i->thread_info.resampler ? pa_resampler_request(i->thread_info.resampler, i->sink->thread_info.max_rewind) : i->sink->thread_info.max_rewind;
|
||||
}
|
||||
|
||||
/* Called from thread context */
|
||||
size_t pa_sink_input_get_max_request(pa_sink_input *i) {
|
||||
pa_sink_input_assert_ref(i);
|
||||
pa_sink_input_assert_io_context(i);
|
||||
|
||||
/* We're not verifying the status here, to allow this to be called
|
||||
* in the state change handler between _INIT and _RUNNING */
|
||||
|
||||
return i->thread_info.resampler ? pa_resampler_request(i->thread_info.resampler, i->sink->thread_info.max_request) : i->sink->thread_info.max_request;
|
||||
}
|
||||
|
||||
/* Called from thread context */
|
||||
void pa_sink_input_update_max_rewind(pa_sink_input *i, size_t nbytes /* in the sink's sample spec */) {
|
||||
pa_sink_input_assert_ref(i);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue