Video SDK v3.7.1 API Reference for All Platforms (C++)
agora::rtc::IVideoFrameConsumer Class Referenceabstract

Public Member Functions

virtual void consumeRawVideoFrame (const unsigned char *buffer, agora::media::ExternalVideoFrame::VIDEO_PIXEL_FORMAT frameType, int width, int height, int rotation, long timestamp)=0
 

Detailed Description

The IVideoFrameConsumer class. The SDK uses it to receive the video frame that you capture.

Member Function Documentation

◆ consumeRawVideoFrame()

virtual void agora::rtc::IVideoFrameConsumer::consumeRawVideoFrame ( const unsigned char *  buffer,
agora::media::ExternalVideoFrame::VIDEO_PIXEL_FORMAT  frameType,
int  width,
int  height,
int  rotation,
long  timestamp 
)
pure virtual

Receives the raw video frame.

Note
Ensure that the video frame type that you specify in this method is the same as that in the getBufferType callback.
Parameters
bufferThe video buffer.
frameTypeThe video frame type. See VIDEO_PIXEL_FORMAT.
widthThe width (px) of the video frame.
heightThe height (px) of the video frame.
rotationThe angle (degree) at which the video frame rotates clockwise. If you set the rotation angle, the SDK rotates the video frame after receiving it. You can set the rotation angle as 0, 90, 180, and 270.
timestampThe Unix timestamp (ms) of the video frame. You must set a timestamp for each video frame.