This is possible now that the next-API is gone.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: James Almer <jamrial@gmail.com>
Keep on reading fragments until we got fragment_size amount of data, otherwise
we might get frames with 1-2 samples only if pa_stream_peek is called slightly
less frequently than sample rate.
Note that fragments might contain a lot less data than fragment_size, so
reading multiple fragments to get fragment_size amount of data is intentional.
Signed-off-by: Marton Balint <cus@passwd.hu>
PulseAudio expilitly requires name of the source.
This patch makes it use default source when not provided.
It simplifies programistic use.
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This fixes timestamps
Based-on: code from pulseaudio
Reviewed-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
The stream time_base has been changed to be a multiple of the
device sample_rate. Now the frame_duration computation is simpler
and a message will warn about problematic frame_size values.
Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Add ff_ prefix for internal API function.
Change type of param from int into enum AVCodecID as it is more specific.
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
In particular, fix punctuation in docs and make option help messages
grammatically consistent.
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
This make name of the file more specific
as there is also encoder implementation.
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
The frame duration was calculated without taking in account the
bytes per sample.
Thanks to Lorenzo Pistone <blaffablaffa@gmail.com> for pointing
the issue and providing an initial fix.
It currently use the simple api and is using the latency information
provided only to offset the stream start.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>