Frame
One decoded frame (video or audio), backed by an opaque native owner. Close it to release the buffers.
Ownership rule. Frames emitted by the public Flow APIs (MediaSource.decodedFrames, MediaSource.decodeStreams, FilterGraph.process) are owned by the collector. Each frame stays valid until you close it. Close every collected frame. An unclosed frame leaks its native buffers. Frames handed to a callback (FilterGraph.feedInput's onOutput) are valid only for that call. Call copy to take an owned snapshot of one.
Buffering rule. toList() is safe: every frame reaches you. Do not put frames through a channel the standard library made: buffer(), flowOn, conflate and produceIn all queue elements they cannot close, so cancelling part way through (buffer().take(1) is the ordinary case) drops whatever is still queued and leaks it. Use bufferFrames instead, which owns its channel and closes what you never receive; it takes a context for the flowOn case too.
The native representation is intentionally not exposed. Pipeline operators (FilterGraph, encoders) accept Frames directly and resolve their platform handle internally.
One decoded frame (video or audio), backed by an opaque native owner. Close it to release the buffers.
Ownership rule. Frames emitted by the public Flow APIs (MediaSource.decodedFrames, MediaSource.decodeStreams, FilterGraph.process) are owned by the collector. Each frame stays valid until you close it. Close every collected frame. An unclosed frame leaks its native buffers. Frames handed to a callback (FilterGraph.feedInput's onOutput) are valid only for that call. Call copy to take an owned snapshot of one.
Buffering rule. toList() is safe: every frame reaches you. Do not put frames through a channel the standard library made: buffer(), flowOn, conflate and produceIn all queue elements they cannot close, so cancelling part way through (buffer().take(1) is the ordinary case) drops whatever is still queued and leaks it. Use bufferFrames instead, which owns its channel and closes what you never receive; it takes a context for the flowOn case too.
The native representation is intentionally not exposed. Pipeline operators (FilterGraph, encoders) accept Frames directly and resolve their platform handle internally.
One decoded or constructed picture or block of audio, held in native memory. Read it through info and copyPlanesToByteArray, and close it when done.
One decoded frame (video or audio), backed by an opaque native owner. Close it to release the buffers.
Ownership rule. Frames emitted by the public Flow APIs (MediaSource.decodedFrames, MediaSource.decodeStreams, FilterGraph.process) are owned by the collector. Each frame stays valid until you close it. Close every collected frame. An unclosed frame leaks its native buffers. Frames handed to a callback (FilterGraph.feedInput's onOutput) are valid only for that call. Call copy to take an owned snapshot of one.
Buffering rule. toList() is safe: every frame reaches you. Do not put frames through a channel the standard library made: buffer(), flowOn, conflate and produceIn all queue elements they cannot close, so cancelling part way through (buffer().take(1) is the ordinary case) drops whatever is still queued and leaks it. Use bufferFrames instead, which owns its channel and closes what you never receive; it takes a context for the flowOn case too.
The native representation is intentionally not exposed. Pipeline operators (FilterGraph, encoders) accept Frames directly and resolve their platform handle internally.
A decoded frame, as a handle into the codec module.
The pointer is an opaque Int on this side and is never dereferenced here; every read is a call. The frame is owned: close frees it, and closing twice is a no-op because the pointer is cleared.
Types
Properties
FrameInfo.duration converted to microseconds. Null when the decoder supplied no duration. A duration is an interval, so no container start offset applies to it.
The hardware surface behind this frame, or null when its pixels are in main memory.
FrameInfo.pts converted to microseconds on the stream's own timeline. Null when the frame carries no timestamp.
Functions
Starts the Dolby Vision composition of this video frame, which turns its base layer and RPU into an HDR10 picture. See DolbyVisionComposition for what the picture is and how to spread the work over several threads.
Starts the Dolby Vision composition of this video frame, which turns its base layer and RPU into an HDR10 picture. See DolbyVisionComposition for what the picture is and how to spread the work over several threads.
Starts the Dolby Vision composition of this video frame, which turns its base layer and RPU into an HDR10 picture. See DolbyVisionComposition for what the picture is and how to spread the work over several threads.
Starts the Dolby Vision composition of this video frame, which turns its base layer and RPU into an HDR10 picture. See DolbyVisionComposition for what the picture is and how to spread the work over several threads.
Starts the Dolby Vision composition of this video frame, which turns its base layer and RPU into an HDR10 picture. See DolbyVisionComposition for what the picture is and how to spread the work over several threads.
The CEA-608 and CEA-708 closed captions this video frame carries: the cc_data of its ATSC A/53 part 4 side data, three bytes per caption pair. In each triplet the first byte holds the valid flag and the caption type, and the other two hold the caption data.
The CEA-608 and CEA-708 closed captions this video frame carries: the cc_data of its ATSC A/53 part 4 side data, three bytes per caption pair. In each triplet the first byte holds the valid flag and the caption type, and the other two hold the caption data.
The CEA-608 and CEA-708 closed captions this video frame carries: the cc_data of its ATSC A/53 part 4 side data, three bytes per caption pair. In each triplet the first byte holds the valid flag and the caption type, and the other two hold the caption data.
The CEA-608 and CEA-708 closed captions this video frame carries: the cc_data of its ATSC A/53 part 4 side data, three bytes per caption pair. In each triplet the first byte holds the valid flag and the caption type, and the other two hold the caption data.
The CEA-608 and CEA-708 closed captions this video frame carries: the cc_data of its ATSC A/53 part 4 side data, three bytes per caption pair. In each triplet the first byte holds the valid flag and the caption type, and the other two hold the caption data.
The Dolby Vision composition of this video frame in one call, on the calling thread: beginDolbyVisionComposition, every row, and the picture. The frame itself is untouched.
The Dolby Vision composition of this video frame in one call, on the calling thread: beginDolbyVisionComposition, every row, and the picture. The frame itself is untouched.
The Dolby Vision composition of this video frame in one call, on the calling thread: beginDolbyVisionComposition, every row, and the picture. The frame itself is untouched.
The Dolby Vision composition of this video frame in one call, on the calling thread: beginDolbyVisionComposition, every row, and the picture. The frame itself is untouched.
The Dolby Vision composition of this video frame in one call, on the calling thread: beginDolbyVisionComposition, every row, and the picture. The frame itself is untouched.
An owned snapshot of this frame. Use it to keep a callback-scoped frame past that call. O(1): it takes new references to the same refcounted buffers, with no pixel copy. The returned frame survives the source being recycled. Close it yourself.
An owned snapshot of this frame. Use it to keep a callback-scoped frame past that call. O(1): it takes new references to the same refcounted buffers, with no pixel copy. The returned frame survives the source being recycled. Close it yourself.
An owned snapshot of this frame. Use it to keep a callback-scoped frame past that call. O(1): it takes new references to the same refcounted buffers, with no pixel copy. The returned frame survives the source being recycled. Close it yourself.
An owned snapshot of this frame. Use it to keep a callback-scoped frame past that call. O(1): it takes new references to the same refcounted buffers, with no pixel copy. The returned frame survives the source being recycled. Close it yourself.
Copies the same bytes as copyPlanesToByteArray into destination, from index 0, and leaves the rest of destination as it was. A converter that keeps one array for every frame of a stream allocates nothing per frame. Size the array with planesByteCount.
Copies the same bytes as copyPlanesToByteArray into destination, from index 0, and leaves the rest of destination as it was. A converter that keeps one array for every frame of a stream allocates nothing per frame. Size the array with planesByteCount.
Copies the same bytes as copyPlanesToByteArray into destination, from index 0, and leaves the rest of destination as it was. A converter that keeps one array for every frame of a stream allocates nothing per frame. Size the array with planesByteCount.
Copies the same bytes as copyPlanesToByteArray into destination, from index 0, and leaves the rest of destination as it was. A converter that keeps one array for every frame of a stream allocates nothing per frame. Size the array with planesByteCount.
Copies the same bytes as copyPlanesToByteArray into destination, from index 0, and leaves the rest of destination as it was. A converter that keeps one array for every frame of a stream allocates nothing per frame. Size the array with planesByteCount.
Copy the frame's pixel planes (video) or samples (audio) into a flat ByteArray. Planar formats stay planar and packed formats stay packed, with no linesize padding (align=1, tightly packed). For yuv420p at WxH this returns W*H*3/2 bytes (Y plane, then U, then V); for fltp stereo it returns the left plane followed by the right. Frame.ofVideo / Frame.ofAudio accept exactly this layout back.
Copy the frame's pixel planes (video) or samples (audio) into a flat ByteArray. Planar formats stay planar and packed formats stay packed, with no linesize padding (align=1, tightly packed). For yuv420p at WxH this returns W*H*3/2 bytes (Y plane, then U, then V); for fltp stereo it returns the left plane followed by the right. Frame.ofVideo / Frame.ofAudio accept exactly this layout back.
Copy the frame's pixel planes (video) or samples (audio) into a flat ByteArray. Planar formats stay planar and packed formats stay packed, with no linesize padding (align=1, tightly packed). For yuv420p at WxH this returns W*H*3/2 bytes (Y plane, then U, then V); for fltp stereo it returns the left plane followed by the right. Frame.ofVideo / Frame.ofAudio accept exactly this layout back.
Copy the frame's pixel planes (video) or samples (audio) into a flat ByteArray. Planar formats stay planar and packed formats stay packed, with no linesize padding (align=1, tightly packed). For yuv420p at WxH this returns W*H*3/2 bytes (Y plane, then U, then V); for fltp stereo it returns the left plane followed by the right. Frame.ofVideo / Frame.ofAudio accept exactly this layout back.
Copy the frame's pixel planes (video) or samples (audio) into a flat ByteArray. Planar formats stay planar and packed formats stay packed, with no linesize padding (align=1, tightly packed). For yuv420p at WxH this returns W*H*3/2 bytes (Y plane, then U, then V); for fltp stereo it returns the left plane followed by the right. Frame.ofVideo / Frame.ofAudio accept exactly this layout back.
The Dolby Vision metadata of this video frame, from the RPU that FFmpeg's HEVC or AV1 decoder parsed and attached to it. A decoder attaches it on its own, with no option, to every frame of a stream that carries an RPU, whether the decoder runs in software or hands the picture to hardware.
The Dolby Vision metadata of this video frame, from the RPU that FFmpeg's HEVC or AV1 decoder parsed and attached to it. A decoder attaches it on its own, with no option, to every frame of a stream that carries an RPU, whether the decoder runs in software or hands the picture to hardware.
The Dolby Vision metadata of this video frame, from the RPU that FFmpeg's HEVC or AV1 decoder parsed and attached to it. A decoder attaches it on its own, with no option, to every frame of a stream that carries an RPU, whether the decoder runs in software or hands the picture to hardware.
The Dolby Vision metadata of this video frame, from the RPU that FFmpeg's HEVC or AV1 decoder parsed and attached to it. A decoder attaches it on its own, with no option, to every frame of a stream that carries an RPU, whether the decoder runs in software or hands the picture to hardware.
The Dolby Vision metadata of this video frame, from the RPU that FFmpeg's HEVC or AV1 decoder parsed and attached to it. A decoder attaches it on its own, with no option, to every frame of a stream that carries an RPU, whether the decoder runs in software or hands the picture to hardware.
The whole Dolby Vision RPU of this video frame as FFmpeg's decoder parsed it: the reshaping curves, the inverse quantization and the colour matrices, which dolbyVision leaves out. See DolbyVisionRpu.
The whole Dolby Vision RPU of this video frame as FFmpeg's decoder parsed it: the reshaping curves, the inverse quantization and the colour matrices, which dolbyVision leaves out. See DolbyVisionRpu.
The whole Dolby Vision RPU of this video frame as FFmpeg's decoder parsed it: the reshaping curves, the inverse quantization and the colour matrices, which dolbyVision leaves out. See DolbyVisionRpu.
The whole Dolby Vision RPU of this video frame as FFmpeg's decoder parsed it: the reshaping curves, the inverse quantization and the colour matrices, which dolbyVision leaves out. See DolbyVisionRpu.
The whole Dolby Vision RPU of this video frame as FFmpeg's decoder parsed it: the reshaping curves, the inverse quantization and the colour matrices, which dolbyVision leaves out. See DolbyVisionRpu.
The software download of a hardware frame: copies the pixels out of GPU memory into a new ordinary frame and carries the presentation properties (pts, colour, rotation side data) with them. It is the fallback made explicit: a renderer that cannot take the hardware surface calls this once per frame and pays the copy knowingly, and can report that it did.
The software download of a hardware frame: copies the pixels out of GPU memory into a new ordinary frame and carries the presentation properties (pts, colour, rotation side data) with them. It is the fallback made explicit: a renderer that cannot take the hardware surface calls this once per frame and pays the copy knowingly, and can report that it did.
The software download of a hardware frame: copies the pixels out of GPU memory into a new ordinary frame and carries the presentation properties (pts, colour, rotation side data) with them. It is the fallback made explicit: a renderer that cannot take the hardware surface calls this once per frame and pays the copy knowingly, and can report that it did.
The software download of a hardware frame: copies the pixels out of GPU memory into a new ordinary frame and carries the presentation properties (pts, colour, rotation side data) with them. It is the fallback made explicit: a renderer that cannot take the hardware surface calls this once per frame and pays the copy knowingly, and can report that it did.
Refused, because no hardware frame exists on this backend: the wasm decoder is software by construction, so every frame here is already the software one this would produce.
Encode this (video) frame as a standalone compressed image: MJPEG (.jpg) by default, or CodecId.Png. This converts the pixel format automatically when the image codec does not accept the frame's own (e.g. yuv420p → rgb24 for PNG). It leaves this frame untouched, timestamp included, so a frame can be thumbnailed and still encoded into a video.
Encode this (video) frame as a standalone compressed image: MJPEG (.jpg) by default, or CodecId.Png. This converts the pixel format automatically when the image codec does not accept the frame's own (e.g. yuv420p → rgb24 for PNG). It leaves this frame untouched, timestamp included, so a frame can be thumbnailed and still encoded into a video.
Encode this (video) frame as a standalone compressed image: MJPEG (.jpg) by default, or CodecId.Png. This converts the pixel format automatically when the image codec does not accept the frame's own (e.g. yuv420p → rgb24 for PNG). It leaves this frame untouched, timestamp included, so a frame can be thumbnailed and still encoded into a video.
Encode this (video) frame as a standalone compressed image: MJPEG (.jpg) by default, or CodecId.Png. This converts the pixel format automatically when the image codec does not accept the frame's own (e.g. yuv420p → rgb24 for PNG). It leaves this frame untouched, timestamp included, so a frame can be thumbnailed and still encoded into a video.
Encode this (video) frame as a standalone compressed image: MJPEG (.jpg) by default, or CodecId.Png. This converts the pixel format automatically when the image codec does not accept the frame's own (e.g. yuv420p → rgb24 for PNG). It leaves this frame untouched, timestamp included, so a frame can be thumbnailed and still encoded into a video.
The number of bytes copyPlanesToByteArray returns for this frame, which is the size copyPlanesInto needs.
The number of bytes copyPlanesToByteArray returns for this frame, which is the size copyPlanesInto needs.
The number of bytes copyPlanesToByteArray returns for this frame, which is the size copyPlanesInto needs.
The number of bytes copyPlanesToByteArray returns for this frame, which is the size copyPlanesInto needs.
The number of bytes copyPlanesToByteArray returns for this frame, which is the size copyPlanesInto needs.