Files
ladybird/Libraries/LibWeb/MediaSourceExtensions/SourceBuffer.idl
Zaggy1024 51c3f7c41e LibWeb: Implement appending and demuxing WebM MSE segments
The segments are parsed for the SourceBufferProcessor by the
WebMByteStreamParser. It parses the initialization segment to update
its internal set of tracks, then SourceBufferProcessor/SourceBuffer set
them up for playback. When a media segment is received, it also parses
as much of it as is available, returning all the coded frames found so
far. SourceBufferProcessor then tells TrackBufferDemuxer to remove any
overlapping frames and insert the new ones.

TrackBufferDemuxer implements the Demuxer interface in terms of the
coded frame store maintained by the SourceBufferProcessor. It returns
the frames in decode order when requested by a data provider. When a
is needed, it finds the keyframe prior to the target timestamp, and
checks that there are no gaps in data up to the target timestamp. If
there are any gaps, it blocks until the gaps are gone.
2026-04-01 02:54:22 -05:00

37 lines
1.2 KiB
Plaintext

#import <DOM/EventHandler.idl>
#import <HTML/AudioTrackList.idl>
#import <HTML/TextTrackList.idl>
#import <HTML/VideoTrackList.idl>
#import <HTML/TimeRanges.idl>
// https://w3c.github.io/media-source/#dom-sourcebuffer
enum AppendMode {
"segments",
"sequence",
};
// https://w3c.github.io/media-source/#dom-sourcebuffer
[Exposed=(Window,DedicatedWorker)]
interface SourceBuffer : EventTarget {
attribute AppendMode mode;
readonly attribute boolean updating;
[FIXME] readonly attribute TimeRanges buffered;
[FIXME] attribute double timestampOffset;
[FIXME] readonly attribute AudioTrackList audioTracks;
[FIXME] readonly attribute VideoTrackList videoTracks;
[FIXME] readonly attribute TextTrackList textTracks;
[FIXME] attribute double appendWindowStart;
[FIXME] attribute unrestricted double appendWindowEnd;
attribute EventHandler onupdatestart;
attribute EventHandler onupdate;
attribute EventHandler onupdateend;
attribute EventHandler onerror;
attribute EventHandler onabort;
undefined appendBuffer(BufferSource data);
[FIXME] undefined abort();
undefined changeType(DOMString type);
[FIXME] undefined remove(double start, unrestricted double end);
};