Agora RTC Objective-C API Reference  Refactor
Properties
AgoraVideoFrame Class Reference

Inherits <NSObject>.

Properties

NSInteger format
 
CMTime time
 
int stride
 
int strideInPixels
 
int height
 
CVPixelBufferRef _Nullable textureBuf
 
IMAGE_CLASS *_Nullable image
 
NSData *_Nullable dataBuf
 
int cropLeft
 
int cropTop
 
int cropRight
 
int cropBottom
 
int rotation
 

Detailed Description

Properties of the AgoraVideoFrame object.

Property Documentation

◆ format

- (NSInteger) format
readwritenonatomicassign

Video format:

  • 1: I420
  • 2: BGRA
  • 3: NV21
  • 4: RGBA
  • 5: IMC2
  • 7: ARGB
  • 8: NV12
  • 12: iOS texture (CVPixelBufferRef)
  • 13: Still Image (UIImage for iPhone, NSImage for Mac)

◆ time

- (CMTime) time
readwritenonatomicassign

Timestamp of the incoming video frame (ms). An incorrect timestamp will result in frame loss or unsynchronized audio and video.

◆ stride

- (int) stride
readwritenonatomicassign
Deprecated:
Use strideInPixels instead.

◆ strideInPixels

- (int) strideInPixels
readwritenonatomicassign

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

◆ height

- (int) height
readwritenonatomicassign

Height of the incoming video frame.

◆ textureBuf

- (CVPixelBufferRef _Nullable) textureBuf
readwritenonatomicassign

CVPixelBuffer

◆ image

- (IMAGE_CLASS* _Nullable) image
readwritenonatomicstrong

Still Image (UIImage for iPhone, NSImage for Mac)

◆ dataBuf

- (NSData* _Nullable) dataBuf
readwritenonatomicstrong

Raw data buffer.

◆ cropLeft

- (int) cropLeft
readwritenonatomicassign

(Optional) Specifies the number of pixels trimmed from the left, which is set as 0 by default.

◆ cropTop

- (int) cropTop
readwritenonatomicassign

(Optional) Specifies the number of pixels trimmed from the top, which is set as 0 by default.

◆ cropRight

- (int) cropRight
readwritenonatomicassign

(Optional) Specifies the number of pixels trimmed from the right, which is set as 0 by default.

◆ cropBottom

- (int) cropBottom
readwritenonatomicassign

(Optional) Specifies the number of pixels trimmed from the bottom, which is set as 0 by default.

◆ rotation

- (int) rotation
readwritenonatomicassign

(Optional) Specifies whether to rotate the incoming video group. Optional values: 0, 90, 180, or 270 clockwise. Set as 0 by default.