TVIVideoFrame Class Reference

Inherits from NSObject
Declared in TVIVideoFrame.h

Overview

A video frame which has been captured or decoded.

TVIVideoFrame represents a CoreVideo buffer, along with metadata important for rendering and encoding.

– init

Developers shouldn’t use this initializer.

- (null_unspecified instancetype)init

Discussion

Create using initWithTimestamp:buffer:orientation: instead.

Declared In

TVIVideoFrame.h

– initWithTimestamp:buffer:orientation:

A video frame which has either been captured or decoded.

- (null_unspecified instancetype)initWithTimestamp:(int64_t)timestamp buffer:(nonnull CVImageBufferRef)imageBuffer orientation:(TVIVideoOrientation)orientation

Parameters

timestamp

The timestamp at which this frame was captured, or decoded.

imageBuffer

A CVImageBufferRef which conforms to one of the pixel formats defined by TVIPixelFormat.

orientation

The orientation at which this frame was captured, or decoded.

Declared In

TVIVideoFrame.h

  timestamp

The timestamp in microseconds at which this frame was captured, or should be rendered.

@property (nonatomic, assign, readonly) int64_t timestamp

Discussion

For decoded frames this is the display time measured using the system monotomic clock. For captured frames this should be the capture time measured using the timebase of the capturer.

Declared In

TVIVideoFrame.h

  width

A convenience getter which returns the width of imageBuffer.

@property (nonatomic, assign, readonly) size_t width

Declared In

TVIVideoFrame.h

  height

A convenience getter which returns the height of imageBuffer.

@property (nonatomic, assign, readonly) size_t height

Declared In

TVIVideoFrame.h

  imageBuffer

A CVImageBuffer which contains the image data for the frame.

@property (nonatomic, assign, readonly, nonnull) CVImageBufferRef imageBuffer

Declared In

TVIVideoFrame.h

  orientation

The orientation metadata for the frame.

@property (nonatomic, assign, readonly) TVIVideoOrientation orientation

Declared In

TVIVideoFrame.h