文档中心
互动直播 (Legacy)
API 参考
AgoraVideoFrameConsumer Protocol Reference
Objective-C API Reference for iOS/macOS
AgoraVideoFrameConsumer Protocol Reference
Conforms to |
NSObject |
Declared in |
AgoraMediaIO.h |
Overview
AgoraVideoFrameConsumer 支持接收两种 Buffer 类型的视频帧数据:PixelBuffer 和裸数据。 自定义视频源时,开发者需要通过 bufferType 来指定一种 Buffer 类型,并在自定义视频源中只使用与其对应的方法来传递视频帧数据。 各类型包含的视频帧信息如下:
- (void)consumePixelBuffer:(CVPixelBufferRef _Nonnull)pixelBuffer withTimestamp:(CMTime)timestamp rotation:(AgoraVideoRotation)rotation
Parameters
pixelBuffer |
PixelBuffer 类型的视频 Buffer |
timestamp |
传入的视频帧的时间戳,开发者必须为每一个视频帧设置一个时间戳。 |
rotation |
视频的顺时针旋转角度, 详见 AgoraVideoRotation |
Declared In
AgoraMediaIO.h
- (void)consumeRawData:(void *_Nonnull)rawData withTimestamp:(CMTime)timestamp format:(AgoraVideoPixelFormat)format size:(CGSize)size rotation:(AgoraVideoRotation)rotation
Declared In
AgoraMediaIO.h