gstreamer/gst-libs/gst/audio
Sebastian Dröge 71e46bcf38 audioaggregator: Resync on the next buffer when dropping a buffer on discont resyncing
If a buffer is dropped during resyncing on a discont because either its
end offset is already before the current output offset of the
aggregator or because it fully overlaps with the part of the current
output buffer that was already filled, then don't just assume that the
next buffer is going to start at exactly the expected offset. It might
still require some more dropping of samples.

This caused the input to be mixed with an offset to its actual position
in the output stream, causing additional latency and wrong
synchronization between the different input streams.

Instead consider each buffer after a discont as a discont until the
aggregator actually resynced and starts mixing samples from the input
again.

Also update the start output offset of a new input buffer if samples
have to be dropped at the beginning. Otherwise it might be mixed too
early into the output and overwrite part of the output buffer that
already took samples from this input into account.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/912
which is a regression introduced by https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1180/

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1224>
2021-07-12 09:42:39 +03:00
..
audio-buffer.c audio/audio-buffer: @buffer in audio_buffer_map is out caller-allocates 2021-01-14 11:53:10 +00:00
audio-buffer.h libs: audio: Implement GstAudioBuffer & GstAudioMeta 2018-07-03 14:06:43 +03:00
audio-channel-mixer.c libs: audio-channel-mixer: add support for non-interleaved audio buffers 2018-07-11 16:26:13 +03:00
audio-channel-mixer.h audio: GST_EXPORT -> GST_AUDIO_API 2018-03-13 10:36:56 +00:00
audio-channels.c libs: Fix various Since markers 2019-04-23 12:28:26 +00:00
audio-channels.h Pass the code through codespell 2019-08-30 13:05:36 +00:00
audio-converter.c audio-converter: Free config when gst_audio_converter_new fails 2021-06-25 13:55:39 +00:00
audio-converter.h Fix up and add various "Since" markers and other related docs fixes 2020-06-19 12:17:55 +03:00
audio-format.c audio,video-format: Make generate_raw_formats idempotent for assertions 2021-05-26 23:35:16 +02:00
audio-format.h audio: Move fill_silence into audio_format_info 2020-11-25 19:18:25 +01:00
audio-info.c audio,video: Add out caller-allocates to init and from_caps 2021-01-14 11:53:10 +00:00
audio-info.h audio: add gst_audio_make_raw_caps() 2020-06-02 11:57:42 +00:00
audio-prelude.h libs: fix API export/import and 'inconsistent linkage' on MSVC 2018-09-24 08:45:34 +01:00
audio-quantize.c gst-libs: include config.h in all source files 2018-08-13 09:23:34 +01:00
audio-quantize.h audio: GST_EXPORT -> GST_AUDIO_API 2018-03-13 10:36:56 +00:00
audio-resampler-macros.h audioresample: Separate out CFLAGS used for SSE* code 2016-09-29 18:37:08 +05:30
audio-resampler-neon.h audio-resampler: Update NEON to handle remainders not multiples of 4 2019-09-02 23:25:39 -04:00
audio-resampler-private.h audioresample: Separate out CFLAGS used for SSE* code 2016-09-29 18:37:08 +05:30
audio-resampler-x86-sse.c audioresample: Separate out CFLAGS used for SSE* code 2016-09-29 18:37:08 +05:30
audio-resampler-x86-sse.h audioresample: Separate out CFLAGS used for SSE* code 2016-09-29 18:37:08 +05:30
audio-resampler-x86-sse2.c audioresample: Separate out CFLAGS used for SSE* code 2016-09-29 18:37:08 +05:30
audio-resampler-x86-sse2.h audioresample: Separate out CFLAGS used for SSE* code 2016-09-29 18:37:08 +05:30
audio-resampler-x86-sse41.c audio-resampler: Fix integer overflow in clamping code 2017-01-30 12:35:04 +02:00
audio-resampler-x86-sse41.h audioresample: Separate out CFLAGS used for SSE* code 2016-09-29 18:37:08 +05:30
audio-resampler-x86.h audiorsample: Fix build on 32-bit x86 2016-09-29 19:45:16 +05:30
audio-resampler.c Fix up and add various "Since" markers and other related docs fixes 2020-06-19 12:17:55 +03:00
audio-resampler.h Fix up and add various "Since" markers and other related docs fixes 2020-06-19 12:17:55 +03:00
audio.c audio: Use GST_BUFFER_PTS instead of deprecated GST_BUFFER_TIMESTAMP 2021-02-25 02:04:44 +00:00
audio.h audio: use right export decorator 2018-08-26 11:16:10 +02:00
dbesi0.c audio-converter: add resampler 2016-03-28 13:13:59 +02:00
gstaudioaggregator.c audioaggregator: Resync on the next buffer when dropping a buffer on discont resyncing 2021-07-12 09:42:39 +03:00
gstaudioaggregator.h *aggregator: Add g_autoptr support for *ConvertPad 2020-03-16 15:47:58 +00:00
gstaudiobasesink.c audiobasesink: Fix of double lock release 2021-06-21 15:58:01 +00:00
gstaudiobasesink.h Drop @ documentation references from functions and external types 2021-04-15 15:49:39 +02:00
gstaudiobasesrc.c audiobasesrc: Fix divide by zero assertion 2021-05-27 07:51:48 +00:00
gstaudiobasesrc.h Use G_DEFINE_AUTOPTR_CLEANUP_FUNC unconditionally 2019-06-04 20:31:09 -04:00
gstaudiocdsrc.c audio: Use GST_BUFFER_PTS instead of deprecated GST_BUFFER_TIMESTAMP 2021-02-25 02:04:44 +00:00
gstaudiocdsrc.h Use G_DEFINE_AUTOPTR_CLEANUP_FUNC unconditionally 2019-06-04 20:31:09 -04:00
gstaudioclock.c audioclock: Sink the reference in the constructor 2017-05-17 10:40:52 +03:00
gstaudioclock.h Use G_DEFINE_AUTOPTR_CLEANUP_FUNC unconditionally 2019-06-04 20:31:09 -04:00
gstaudiodecoder.c Check mandatory ClockTime arguments 2021-06-16 14:52:38 +00:00
gstaudiodecoder.h Use G_DEFINE_AUTOPTR_CLEANUP_FUNC unconditionally 2019-06-04 20:31:09 -04:00
gstaudioencoder.c Check mandatory ClockTime arguments 2021-06-16 14:52:38 +00:00
gstaudioencoder.h Use G_DEFINE_AUTOPTR_CLEANUP_FUNC unconditionally 2019-06-04 20:31:09 -04:00
gstaudiofilter.c audio: video: Fix in/outbuf confusion of transform_meta 2020-10-08 18:30:39 +02:00
gstaudiofilter.h Use G_DEFINE_AUTOPTR_CLEANUP_FUNC unconditionally 2019-06-04 20:31:09 -04:00
gstaudioiec61937.c docs: Convert gtkdoc comments to markdown 2017-03-10 18:19:17 -03:00
gstaudioiec61937.h audio: GST_EXPORT -> GST_AUDIO_API 2018-03-13 10:36:56 +00:00
gstaudiometa.c gst: don't use volatile to mean atomic 2021-03-19 04:20:19 +00:00
gstaudiometa.h audio: add GstAudioLevelMeta 2021-02-04 10:25:24 +01:00
gstaudiopack-dist.c Update disted backup ORC files 2018-02-15 07:14:20 +01:00
gstaudiopack-dist.h audio: update ORC dist files 2015-11-06 17:54:21 +01:00
gstaudiopack.orc gstaudiopack.orc: pack_u32be_swap: actually swap 2018-02-15 01:32:54 +01:00
gstaudioringbuffer.c audio: Move fill_silence into audio_format_info 2020-11-25 19:18:25 +01:00
gstaudioringbuffer.h audiosink: expose more audioringbuffer vmethods to child sinks 2019-09-27 05:34:57 +00:00
gstaudiosink.c audio/alsa: Exit write loop if underlying device is already paused. 2021-04-08 07:28:21 +00:00
gstaudiosink.h audiosink: Keep baseclass extensible 2020-05-28 19:14:29 +09:00
gstaudiosrc.c audio: Move fill_silence into audio_format_info 2020-11-25 19:18:25 +01:00
gstaudiosrc.h Use G_DEFINE_AUTOPTR_CLEANUP_FUNC unconditionally 2019-06-04 20:31:09 -04:00
gstaudiostreamalign.c Check mandatory ClockTime arguments 2021-06-16 14:52:38 +00:00
gstaudiostreamalign.h gstaudiostreamalign: Pass self as const pointer in getter functions 2021-01-29 21:42:47 +01:00
gstaudioutilsprivate.c audioutilsprivate: restore thread priority before ending 2020-07-18 13:00:00 +02:00
gstaudioutilsprivate.h audioutilsprivate: restore thread priority before ending 2020-07-18 13:00:00 +02:00
meson.build Meson: Use pkg-config generator 2020-10-23 11:19:11 -04:00
streamvolume.c gst: don't use volatile to mean atomic 2021-03-19 04:20:19 +00:00
streamvolume.h streamvolume: Use G_DECLARE_INTERFACE 2020-03-20 06:20:43 +00:00
TODO gst-libs/gst/audio/TODO: Update TODO 2006-02-17 10:15:52 +00:00