AgoraVideoFrame Class Reference

Inherits from NSObject
Declared in AgoraObjects.h

Overview

Video frame containing the Agora SDK’s encoded video data.

  format

Video format:

@property (assign, nonatomic) NSInteger format

Discussion

  • 1: I420
  • 2: BGRA
  • 3: NV21
  • 4: RGBA
  • 5: IMC2
  • 7: ARGB
  • 8: NV12
  • 12: iOS texture (CVPixelBufferRef)
  • 16: I422

Declared In

AgoraObjects.h

  time

Timestamp of the incoming video frame (ms).

@property (assign, nonatomic) CMTime time

Discussion

An incorrect timestamp results in frame loss or unsynchronized audio and video.

Declared In

AgoraObjects.h

  strideInPixels

Line spacing of the incoming video frame, which must be in pixels instead of bytes. For textures, it is the width of the texture.

@property (assign, nonatomic) int strideInPixels

Declared In

AgoraObjects.h

  height

Height of the incoming video frame

@property (assign, nonatomic) int height

Declared In

AgoraObjects.h

  textureBuf

CVPixelBuffer

@property (assign, nonatomic) CVPixelBufferRef _Nullable textureBuf

Declared In

AgoraObjects.h

  dataBuf

Raw data buffer

@property (strong, nonatomic) NSData *dataBuf

Declared In

AgoraObjects.h

  cropLeft

(Optional) The number of pixels trimmed from the left. The default value is 0.

@property (assign, nonatomic) int cropLeft

Declared In

AgoraObjects.h

  cropTop

(Optional) The number of pixels trimmed from the top. The default value is 0.

@property (assign, nonatomic) int cropTop

Declared In

AgoraObjects.h

  cropRight

(Optional) The number of pixels trimmed from the right. The default value is 0.

@property (assign, nonatomic) int cropRight

Declared In

AgoraObjects.h

  cropBottom

(Optional) The number of pixels trimmed from the bottom. The default value is 0.

@property (assign, nonatomic) int cropBottom

Declared In

AgoraObjects.h

  rotation

(Optional) The clockwise rotation of the incoming video frame.

@property (assign, nonatomic) int rotation

Discussion

Optional values: 0, 90, 180, or 270. The default value is 0.

Declared In

AgoraObjects.h