Agora C++ API Reference for All Platforms

Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
agora::media::base::VideoFrame Struct Reference

`#include <AgoraMediaBase.h>`

## Public Member Functions
| VideoFrame ()

## Public Attributes
VIDEO_PIXEL_FORMAT | type
int | width
int | height
int | yStride
int | uStride
int | vStride
uint8_t * | yBuffer
uint8_t * | uBuffer
uint8_t * | vBuffer
int | rotation
int64_t | renderTimeMs
int | avsync_type
uint8_t * | metadata_buffer
int | metadata_size
void * | sharedContext
int | textureId
void * | d3d11Texture2d
float | matrix [16]
uint8_t * | alphaBuffer
ALPHA_STITCH_MODE | alphaStitchMode
void * | pixelBuffer
IVideoFrameMetaInfo * | metaInfo
Hdr10MetadataInfo | hdr10MetadataInfo
ColorSpace | colorSpace

## Detailed Description

The definition of the VideoFrame struct.

## Constructor & Destructor Documentation

## ◆ VideoFrame()

agora::media::base::VideoFrame::VideoFrame | ( |  | ) |
| inline

## Member Data Documentation

## ◆ type

VIDEO_PIXEL_FORMAT agora::media::base::VideoFrame::type

The video pixel format: VIDEO_PIXEL_FORMAT.

## ◆ width

int agora::media::base::VideoFrame::width

The width of the video frame.

## ◆ height

int agora::media::base::VideoFrame::height

The height of the video frame.

## ◆ yStride

int agora::media::base::VideoFrame::yStride

The line span of Y buffer in the YUV data.

## ◆ uStride

int agora::media::base::VideoFrame::uStride

The line span of U buffer in the YUV data.

## ◆ vStride

int agora::media::base::VideoFrame::vStride

The line span of V buffer in the YUV data.

## ◆ yBuffer

uint8_t* agora::media::base::VideoFrame::yBuffer

The pointer to the Y buffer in the YUV data.

## ◆ uBuffer

uint8_t* agora::media::base::VideoFrame::uBuffer

The pointer to the U buffer in the YUV data.

## ◆ vBuffer

uint8_t* agora::media::base::VideoFrame::vBuffer

The pointer to the V buffer in the YUV data.

## ◆ rotation

int agora::media::base::VideoFrame::rotation

The clockwise rotation information of this frame. You can set it as 0, 90, 180 or 270.

## ◆ renderTimeMs

int64_t agora::media::base::VideoFrame::renderTimeMs

The timestamp to render the video stream. Use this parameter for audio-video synchronization when rendering the video.

Note
  This parameter is for rendering the video, not capturing the video.

## ◆ avsync_type

int agora::media::base::VideoFrame::avsync_type

The type of audio-video synchronization.

## ◆ metadata_buffer

uint8_t* agora::media::base::VideoFrame::metadata_buffer

[Texture related parameter] The MetaData buffer. The default value is NULL

## ◆ metadata_size

int agora::media::base::VideoFrame::metadata_size

[Texture related parameter] The MetaData size. The default value is 0

## ◆ sharedContext

void* agora::media::base::VideoFrame::sharedContext

[Texture related parameter], egl context.

## ◆ textureId

int agora::media::base::VideoFrame::textureId

[Texture related parameter], Texture ID used by the video frame.

## ◆ d3d11Texture2d

void* agora::media::base::VideoFrame::d3d11Texture2d

[Texture related parameter] The pointer of ID3D11Texture2D used by the video frame,for Windows only.

## ◆ matrix

float agora::media::base::VideoFrame::matrix[16]

[Texture related parameter], Incoming 4 × 4 transformational matrix.

## ◆ alphaBuffer

uint8_t* agora::media::base::VideoFrame::alphaBuffer

Indicates the alpha channel of current frame, which is consistent with the dimension of the video frame. The value range of each pixel is [0,255], where 0 represents the background; 255 represents the foreground. The default value is NULL.

## ◆ alphaStitchMode

ALPHA_STITCH_MODE agora::media::base::VideoFrame::alphaStitchMode

The relative position between alphabuffer and the frame. 0: Normal frame; 1: Alphabuffer is above the frame; 2: Alphabuffer is below the frame; 3: Alphabuffer is on the left of frame; 4: Alphabuffer is on the right of frame; The default value is 0.

## ◆ pixelBuffer

void* agora::media::base::VideoFrame::pixelBuffer

The type of CVPixelBufferRef, for iOS and macOS only.

## ◆ metaInfo

IVideoFrameMetaInfo* agora::media::base::VideoFrame::metaInfo

The pointer to IVideoFrameMetaInfo, which is the interface to get metainfo contents from VideoFrame.

## ◆ hdr10MetadataInfo

Hdr10MetadataInfo agora::media::base::VideoFrame::hdr10MetadataInfo

metadata info used for hdr video data

## ◆ colorSpace

ColorSpace agora::media::base::VideoFrame::colorSpace

The ColorSpace of the video frame