Skip to main content

DecodedFrameConsumer

@3dverse/livelink v0.8.10


@3dverse/livelink / DecodedFrameConsumer

Interface: DecodedFrameConsumer

Defined in: livelink.js/sources/rendering/decoders/DecodedFrameConsumer.ts:27

The interface for consuming decoded frames.

flowchart LR
A(Renderer) -->|Network Packet| B(Core)
B -->|Encoded Frame| C(EncodedFrameConsumer)
C -->|Decoded Frame| D(DecodedFrameConsumer)
style D fill:#191,stroke:#333,stroke-width:4px

To consume decoded frames, implement this interface and pass an instance of your class to the encoded_frame_consumer when calling Livelink.setEncodedFrameConsumer.

The EncodedFrameConsumer will call the consumeDecodedFrame method as soon as a frame is decoded.

The Livelink SDK has an internal default implementation of this interface. It can be retrieved via the Livelink.default_decoded_frame_consumer property.

It is recommended to use the default implementation.

Methods

consumeDecodedFrame()

consumeDecodedFrame(params): void

Defined in: livelink.js/sources/rendering/decoders/DecodedFrameConsumer.ts:37

Consume a decoded frame.

This method is called as soon as a frame is decoded.

Parameters

params
decoded_frame

OffscreenCanvas | VideoFrame

The decoded frame data

meta_data

FrameMetaData

The frame meta data

Returns

void