MjpegFrameDecoder class

Splits an MJPEG byte stream (multipart/x-mixed-replace) into individual JPEG images.

Instead of parsing multipart headers, this decoder scans for JPEG Start of Image (FF D8) and End of Image (FF D9) markers, so it works regardless of boundary formatting. Inside JPEG entropy-coded data, FF bytes are byte-stuffed with 00, so FF D9 only appears at the end of a frame (excluding EXIF thumbnails, which web_video_server does not emit).

Inheritance

Constructors

MjpegFrameDecoder({int maxFrameBytes = 8 * 1024 * 1024})
Creates an MjpegFrameDecoder that rejects frames larger than maxFrameBytes.
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
maxFrameBytes → int
Maximum buffered bytes before an image without an EOI marker is treated as a malformed stream.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

bind(Stream<List<int>> stream) → Stream<Uint8List>
Transforms the provided stream.
override
cast<RS, RT>() → StreamTransformer<RS, RT>
Provides a StreamTransformer<RS, RT> view of this stream transformer.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited