GstAudioSink: It is unclear what reset() should do
The documentation says reset the audio device, unblock from a write
. I guess the goal is for example when doing a seek, it has to unblock current write, flush the device, so next write() will play right away with audio from the new position? But then what should it return in the write()
function?
I check implementation of audioringbuffer_thread_func()
in gstaudiosink.c
and the inner do{}
loop will only stop when writefunc()
claimed that everything has been written. So I my guess is that on reset()
the implementation should unblock current write() and return the full length as written, no matter if that has effectively been written on not?
Similarly, what should it do in unprepare()
? I guess I should also unblock current write and return the full length as written so audioringbuffer_thread_func()
can return?