mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
stream: add pw_stream_get_time_n()
Deprecate pw_stream_get_time() in favour of _get_time_n() that contains the size of the pw_time structure. Make the old one fill in the fields up to the buffered field. Make the new one use the size to decide how much info to fill in. Add a new buffered field in pw_time that contains the buffered data inside the converter/resampler. This leaves the queued field with purely the user provided size in the buffers. Use get_time_n() in places.
This commit is contained in:
parent
421b3b6ece
commit
5a9d2679ca
6 changed files with 81 additions and 35 deletions
|
|
@ -389,7 +389,7 @@ static void on_stream_process(void *data)
|
|||
struct pw_buffer *b;
|
||||
snd_pcm_uframes_t hw_avail, before, want, xfer;
|
||||
|
||||
pw_stream_get_time(pw->stream, &pw->time);
|
||||
pw_stream_get_time_n(pw->stream, &pw->time, sizeof(pw->time));
|
||||
|
||||
if (pw->time.rate.num != 0) {
|
||||
pw->time.delay = pw->time.delay * io->rate * pw->time.rate.num / pw->time.rate.denom;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue