VideoSampleInit
Metadata used for VideoSample initialization.
type VideoSampleInit = {
format?: VideoSamplePixelFormat;
codedWidth?: number;
codedHeight?: number;
rotation?: Rotation;
timestamp?: number;
duration?: number;
colorSpace?: VideoColorSpaceInit;
layout?: PlaneLayout[];
visibleRect?: Rectangle | undefined;
displayWidth?: number | undefined;
displayHeight?: number | undefined;
encodeOptions?: DeepReadonly<VideoEncoderEncodeOptions>;
};See VideoSamplePixelFormat, Rotation, Rectangle, and DeepReadonly.
Used by
Properties
format
format?: VideoSamplePixelFormat;The internal pixel format in which the frame is stored. See pixel formats
codedWidth
codedWidth?: number;The width of the frame in pixels.
codedHeight
codedHeight?: number;The height of the frame in pixels.
rotation
rotation?: Rotation;The rotation of the frame in degrees, clockwise.
See Rotation.
timestamp
timestamp?: number;The presentation timestamp of the frame in seconds.
duration
duration?: number;The duration of the frame in seconds.
colorSpace
colorSpace?: VideoColorSpaceInit;The color space of the frame.
layout
layout?: PlaneLayout[];The byte layout of the planes of the frame.
visibleRect
visibleRect?: Rectangle | undefined;Visible region in the coded frame. When omitted, the rect defaults to (0, 0, codedWidth, codedHeight).
See Rectangle.
displayWidth
displayWidth?: number | undefined;Width of the frame in pixels after applying aspect ratio adjustments and rotation.
displayHeight
displayHeight?: number | undefined;Height of the frame in pixels after applying aspect ratio adjustments and rotation.
encodeOptions
encodeOptions?: DeepReadonly<VideoEncoderEncodeOptions>;The encode options to use when this sample is passed to an encoder.
See DeepReadonly.