ladybird/Libraries/LibMedia
Zaggy1024 ae5e200dfc LibMedia: Move overlapping audio block correction to the data provider
This prevents PlaybackManager's seek while enabling an audio track from
causing the AudioMixingSink to push audio blocks forward unnecessarily.
Previously, the seek would cause the initial block or blocks to repeat
from the perspective of AudioMixingSink, so it would think that it
needs to shift the first block after the seek forward by a few samples.
By moving this to the AudioDataProvider, we can clear the last sample
index every time the decoder is flushed, ensuring that the block
shifting always makes sense.

By doing this in AudioMixingSink instead of the Decoder
implementations, we avoid having to duplicate this shifting logic
across multiple implementations.

This also fixes an issue where multiple audio blocks occupying the same
timestamp would be skipped while seeking, causing a significant break
in audio.
2025-11-17 16:51:18 +01:00
..
Audio LibMedia+LibWeb: Never return errors when getting PlaybackStream time 2025-10-27 17:28:49 -07:00
Color LibMedia: Make the default values of CICP unspecified 2025-11-05 18:40:02 +01:00
Containers/Matroska LibMedia+Tests: Clear the current block when seeking in MatroskaDemuxer 2025-11-13 13:48:17 +01:00
FFmpeg LibMedia: Use [from/to]_time_units in FFmpegDemuxer and AudioMixingSink 2025-11-17 16:51:18 +01:00
PlaybackStates LibMedia: Deduplicate the audio seeking code in SeekingStateHandler 2025-11-03 13:40:37 -08:00
Providers LibMedia: Move overlapping audio block correction to the data provider 2025-11-17 16:51:18 +01:00
Sinks LibMedia: Move overlapping audio block correction to the data provider 2025-11-17 16:51:18 +01:00
AudioBlock.h LibMedia: Move overlapping audio block correction to the data provider 2025-11-17 16:51:18 +01:00
AudioDecoder.h LibMedia: Allow signalling of EOF to decoders 2025-11-05 18:40:02 +01:00
CMakeLists.txt LibMedia: Implement media seeking 2025-10-27 17:28:49 -07:00
CodecID.h LibMedia: Support playing FLAC 2025-10-27 17:28:49 -07:00
CodedAudioFrameData.h LibMedia: Support coded audio frames in our demuxers 2025-10-27 17:28:49 -07:00
CodedFrame.h LibMedia: Store whether a CodedFrame is a keyframe 2025-10-27 17:28:49 -07:00
CodedVideoFrameData.h LibMedia: Move CICP values from CodedFrame to Track 2025-11-05 18:40:02 +01:00
DecoderError.h Everywhere: Slap some [[clang::lifetimebound]] where appropriate 2025-09-01 11:11:38 +02:00
Demuxer.h LibMedia: Remove redundant parameter names in Demuxer 2025-11-05 18:40:02 +01:00
Forward.h LibMedia: Play audio through PlaybackManager using Providers/Sinks 2025-10-27 17:28:49 -07:00
FrameFlags.h LibMedia: Store whether a CodedFrame is a keyframe 2025-10-27 17:28:49 -07:00
MutexedDemuxer.h LibMedia: Return whether a demuxer seek moved the stream position 2025-10-27 17:28:49 -07:00
PlaybackManager.cpp LibMedia: Allow FFmpegDemuxer to grab samples from multiple streams 2025-10-27 17:28:49 -07:00
PlaybackManager.h LibMedia: Clamp PlaybackManager::current_time() to the duration 2025-10-27 17:28:49 -07:00
SeekMode.h LibMedia: Implement media seeking 2025-10-27 17:28:49 -07:00
Subsampling.h Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
TimedImage.h LibMedia: Implement media seeking 2025-10-27 17:28:49 -07:00
Track.h LibMedia: Move CICP values from CodedFrame to Track 2025-11-05 18:40:02 +01:00
VideoDecoder.h LibMedia: Allow signalling of EOF to decoders 2025-11-05 18:40:02 +01:00
VideoFrame.cpp LibMedia: Port to Windows 2025-02-11 04:07:24 -07:00
VideoFrame.h LibMedia: Clean up #include directives 2024-11-21 14:08:33 +01:00