AliyunIRecorderDelegate
@protocol AliyunIRecorderDelegate <NSObject>
录制回调协议
-
设备权限
Declaration
Objective-C
- (void)recorderDeviceAuthorization:(AliyunIRecorderDeviceAuthor)status;
Parameters
status
设备权限状态
-
录制实时时长
Declaration
Objective-C
- (void)recorderVideoDuration:(CGFloat)duration;
Parameters
duration
录制时长
-
开始预览回调
Declaration
Objective-C
- (void)recorderDidStartPreview;
-
停止录制回调
Declaration
Objective-C
- (void)recorderDidStopRecording;
-
即将到达最大时长时回调 API_AVAILABLE(3.26.0)
Declaration
Objective-C
- (void)recorderWillStopWithMaxDuration;
-
当录至最大时长时回调
Declaration
Objective-C
- (void)recorderDidStopWithMaxDuration;
-
结束录制回调
Declaration
Objective-C
- (void)recorderDidFinishRecording;
-
录制异常
Declaration
Objective-C
- (void)recoderError:(NSError *)error;
Parameters
error
异常
-
摄像头返回的原始视频数据
开放出来的目的是用于做人脸识别
Declaration
Objective-C
- (void)recorderOutputVideoRawSampleBuffer:(CMSampleBufferRef)sampleBuffer;
Parameters
sampleBuffer
视频数据
-
返回原始的音频数据
用来做语音识别一类的业务
Declaration
Objective-C
- (void)recorderOutputAudioRawSampleBuffer:(CMSampleBufferRef)sampleBuffer;
Parameters
sampleBuffer
音频数据
-
用户自定义渲染 CVPixelBufferRef -> CVPixelBufferRef
Declaration
Objective-C
- (CVPixelBufferRef)customRenderedPixelBufferWithRawSampleBuffer: (CMSampleBufferRef)sampleBuffer;
Parameters
sampleBuffer
原始视频数据
Return Value
用户自渲染后的PixelBuffer
-
用户自定义渲染 CVPixelBufferRef -> Texture
Declaration
Objective-C
- (int)customRenderedTextureWithRawSampleBuffer:(CMSampleBufferRef)sampleBuffer;
Parameters
sampleBuffer
原始视频数据
Return Value
用户自渲染后的纹理id
-
用户自定义渲染接口 Original Texture -> Texture
Declaration
Objective-C
- (int)customRender:(int)srcTexture size:(CGSize)size;
Parameters
srcTexture
原始视频帧纹理id
size
原始视频帧纹理size
Return Value
返回纹理id
-
渲染销毁回调
Declaration
Objective-C
- (void)destroyRender;
-
Deprecated
deprecated,use
customRenderedTextureWithRawSampleBuffer:
instead用户自定义渲染
开放pixelBuffer和纹理id给用户自渲染 (仅支持BGRA格式)
Declaration
Objective-C
- (NSInteger)recorderOutputVideoPixelBuffer:(CVPixelBufferRef)pixelBuffer textureName:(NSInteger)textureName;
Parameters
pixelBuffer
摄像头数据
textureName
摄像头数据纹理
Return Value
自定义渲染后的纹理id
-
Deprecated
deprecated, use
customRender:size:
instead摄像头返回的原始视频纹理
摄像头数据格式为BGRA、YUV时都需实现
Declaration
Objective-C
- (NSInteger)recorderOutputVideoTextureName:(NSInteger)textureName textureSize:(CGSize)textureSize;
Parameters
textureName
原始纹理ID
Return Value
处理后的纹理ID
-
Deprecated
deprecated
摄像头返回的原始视频纹理
摄像头数据格式仅为YUV时须实现,反之不实现
Declaration
Objective-C
- (NSInteger)recorderOutputVideoUVTextureName:(NSInteger)textureName;
Parameters
textureName
原始UV分量的纹理ID
Return Value
处理后的纹理ID