ZegoVideoSampleBufferPool Protocol Reference

Conforms to NSObject
Declared in zego-api-external-video-filter-oc.h

Overview

外部滤镜内存池协议,数据类型为 CMSampleBuffer,仅 iOS 平台有效,且通过 ZegoVideoBufferPool 给 SDK 返回处理过的 CVPixelBuffer 数据

– dequeueInputBuffer:height:stride: required method

SDK 获取 CMSampleBufferRef 对象

- (nullable CMSampleBufferRef)dequeueInputBuffer:(int)width height:(int)height stride:(int)stride

Parameters

width

高度

height

宽度

stride

视频帧数据每一行字节数

Return Value

CMSampleBufferRef CMSampleBufferRef 对象

Discussion

开发者调用此 API 向 SDK 返回 CMSampleBufferRef 对象,用于保存视频帧数据

Declared In

zego-api-external-video-filter-oc.h

– queueInputBuffer:width:height:stride:timestamp: required method

异步处理视频帧数据

- (void)queueInputBuffer:(nonnull CMSampleBufferRef)sample_buffer width:(int)width height:(int)height stride:(int)stride timestamp:(unsigned long long)timestamp_100n

Parameters

sample_buffer

视频帧数据

width

宽度

height

高度

stride

视频帧数据每一行字节数

timestamp_100n

当前时间戳

Discussion

开发者在此 API 中获取采集的视频帧数据

Declared In

zego-api-external-video-filter-oc.h