Interfaces

CameraFrameOptions

Extended by

Type Parameters

F

F extends FrameLike = FrameLike

Properties

format?

optional format?: (frame: F) => PixelFormat;

Map the producer's pixelFormat to the one tgfx imports with. A worklet - it runs on the frame thread.

The default reads the string: rgb/rgba/bgra import as 'rgba', 709/2020 pick that matrix, anything else is BT.601, and a -full suffix selects the full-range variant. Override it for a producer that names its formats differently, or to pin one.

Parameters

frame

F

Returns

PixelFormat


rotation?

optional rotation?: (frame: F) => number;

Map the producer's orientation to the clockwise degrees that cancel it. A worklet. The default understands 'up' | 'right' | 'down' | 'left'; anything else is 0, which draws the frame unrotated.

Parameters

frame

F

Returns

number

On this page