ladybird/Libraries/LibMedia
Zaggy1024 16f5a3405f LibMedia: Implement buffered ranges for MP3
A new MP3Navigator class is added, which determines timestamps for byte
positions by resyncing to a frame and then interpolating between known
points on either side. The known points start out as the first frame's
position in the file at timestamp 0, and EOF at the timestamp for
FFmpeg's file duration estimate. New buffered ranges are interpolated
between those two points, but also between the end of a prior range and
the start of the next.

Since MP3 can have variable bitrate without declaring it in the file
header, we have to allow buffered ranges to shift forward as new data
arrives to make room for underestimated durations. This is done for all
ranges following the first that has been appended to, keeping the start
of the current range consistent, so that subsequent seeks within that
range remain consistent.

Seeking is also implemented within the navigator to ensure that the
byte<->timestamp mapping is consistent and the buffered ranges begin
exactly where the seek landed.
2026-05-28 10:30:20 -05:00
..
Audio LibMedia: Prevent PulseAudio write callbacks doing anything if parked 2026-05-28 10:33:57 +02:00
Codecs LibMedia: Calculate accurate buffered ranges for FLAC 2026-05-28 10:30:20 -05:00
Color LibMedia: Remove reserved values from CICP enums 2026-04-18 01:25:00 -05:00
Containers LibMedia: Implement buffered ranges for MP3 2026-05-28 10:30:20 -05:00
FFmpeg LibMedia: Implement buffered ranges for MP3 2026-05-28 10:30:20 -05:00
PlaybackStates LibMedia: Implement suspension at the decoded data providers 2026-05-22 09:30:10 -05:00
Processors LibMedia: Ensure that AudioMixer status() matches pull() 2026-05-23 11:23:09 -05:00
Producers LibMedia: Only clear decoder thread queues if the demuxer seek moves 2026-05-23 11:23:09 -05:00
Sinks LibMedia: Ensure that AudioMixer status() matches pull() 2026-05-23 11:23:09 -05:00
AudioBlock.h LibMedia+Tests: Refer to raw audio frames/samples consistently 2026-05-13 02:05:35 -05:00
AudioDecoder.h LibMedia: Allow signalling of EOF to decoders 2025-11-05 18:40:02 +01:00
CMakeLists.txt LibMedia: Implement buffered ranges for MP3 2026-05-28 10:30:20 -05:00
CodecID.h LibMedia: Add WAV PCM codecs to CodecID 2025-12-15 18:03:03 -06:00
CodedAudioFrameData.h LibMedia: Support coded audio frames in our demuxers 2025-10-27 17:28:49 -07:00
CodedFrame.h LibMedia: Store a duration in CodedFrame 2025-12-10 16:02:40 -06:00
CodedVideoFrameData.h LibMedia: Move CICP values from CodedFrame to Track 2025-11-05 18:40:02 +01:00
DecoderError.h LibMedia: Add a formatter for DecoderErrorCategory 2026-02-24 16:55:40 -06:00
Demuxer.h LibMedia+LibWeb: Speculatively find keyframes near fast seek targets 2026-05-13 02:05:35 -05:00
Forward.h LibMedia: Implement buffered ranges for FFmpegDemuxer 2026-05-28 10:30:20 -05:00
FrameFlags.h LibMedia: Move the bitwise operators for FrameFlags to Media:: 2026-05-28 10:30:20 -05:00
GenericTimeProvider.cpp LibMedia: Transmit seeks and resolve them through the pipeline 2026-05-13 02:05:35 -05:00
GenericTimeProvider.h LibMedia: Transmit seeks and resolve them through the pipeline 2026-05-13 02:05:35 -05:00
IncrementallyPopulatedStream.cpp LibMedia: Actually adjust incremental stream's request positions 2026-05-28 10:30:20 -05:00
IncrementallyPopulatedStream.h LibMedia: Implement buffered ranges for MP3 2026-05-28 10:30:20 -05:00
MediaPipelineNode.h LibMedia: Remove WrapperTimeProvider in favor of diamond inheritance 2026-05-13 02:05:35 -05:00
MediaStream.h LibMedia: Implement buffered ranges for MP3 2026-05-28 10:30:20 -05:00
MediaTimeProvider.h LibMedia: Transmit seeks and resolve them through the pipeline 2026-05-13 02:05:35 -05:00
PipelineStatus.h LibMedia: Signal downstream nodes whether to clear data after seeks 2026-05-19 15:20:58 -05:00
PlaybackManager.cpp LibMedia: Explicitly pause the time provider in ~PlaybackManager() 2026-05-27 19:47:22 -05:00
PlaybackManager.h LibMedia: Implement suspension at the decoded data providers 2026-05-22 09:30:10 -05:00
ReadonlyBytesCursor.h LibMedia: Allow MediaStreamCursor to never block on missing data 2026-05-28 10:30:20 -05: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
TimeRanges.cpp LibMedia: Add a TimeRanges class to be used for buffered attributes 2026-04-01 02:54:22 -05:00
TimeRanges.h LibMedia: Add a TimeRanges class to be used for buffered attributes 2026-04-01 02:54:22 -05:00
Track.h LibMedia+LibWeb: Align Media::Track more to the web spec 2026-04-01 02:54:22 -05:00
TrackType.h LibMedia: Set Matroska "complex" tracks' types based on the codec 2025-11-21 16:51:58 -06:00
VideoDecoder.h LibMedia: Make video frames ref-counted 2026-05-05 14:39:17 -05:00
VideoFrame.cpp LibGfx+LibMedia: Add IPC serialization for VideoFrame 2026-05-21 11:45:06 +01:00
VideoFrame.h LibGfx+LibMedia: Add IPC serialization for VideoFrame 2026-05-21 11:45:06 +01:00