AgoraVideoFrameConsumer Protocol Reference

Conforms to NSObject
Declared in AgoraMediaIO.h

Overview

An object supporting video data in two formats; pixel buffer and raw data.

When the video source is initialized, the media engine passes this object to you and you need to reserve it, and then pass the video frame to the media engine through this object once the video source is initialized. Call bufferType to specify a buffer type. The video data can only be transmitted in the corresponding type.

– consumePixelBuffer:withTimestamp:rotation: required method

Uses the video information in the pixel buffer.

- (void)consumePixelBuffer:(CVPixelBufferRef _Nonnull)pixelBuffer withTimestamp:(CMTime)timestamp rotation:(AgoraVideoRotation)rotation

Parameters

pixelBuffer

Buffer type

timestamp

Timestamp (ms) of the video frame. For each video frame, you need to set a timestamp.

rotation

AgoraVideoRotation

Declared In

AgoraMediaIO.h

– consumeRawData:withTimestamp:format:size:rotation: required method

Uses the video information in the raw data.

- (void)consumeRawData:(void *_Nonnull)rawData withTimestamp:(CMTime)timestamp format:(AgoraVideoPixelFormat)format size:(CGSize)size rotation:(AgoraVideoRotation)rotation

Parameters

rawData

Raw data of the video frame.

timestamp

Timestamp (ms) of the video frame.

format

AgoraVideoPixelFormat

size

Size of the raw video data.

rotation

AgoraVideoRotation

Declared In

AgoraMediaIO.h