AliyunIRecorderDelegate
@protocol AliyunIRecorderDelegate <NSObject>
* The protocol of recording callbacks.
-
* The callback that outputs the status of device permissions.
Declaration
Objective-C
- (void)recorderDeviceAuthorization:(AliyunIRecorderDeviceAuthor)status;
Parameters
status
The status of device permissions.
-
* The callback that outputs the recording duration.
Declaration
Objective-C
- (void)recorderVideoDuration:(CGFloat)duration;
Parameters
duration
The duration of recording.
-
* The callback when preview is started.
Declaration
Objective-C
- (void)recorderDidStartPreview;
-
* The callback when recording is stopped.
Declaration
Objective-C
- (void)recorderDidStopRecording;
-
* The callback when the maximum recording duration will reach. API_AVAILABLE(3.26.0)
Declaration
Objective-C
- (void)recorderWillStopWithMaxDuration;
-
* The callback when the maximum recording duration is reached.
Declaration
Objective-C
- (void)recorderDidStopWithMaxDuration;
-
* The callback when recording is finished.
Declaration
Objective-C
- (void)recorderDidFinishRecording;
-
* The callback when an error occurs during recording.
Declaration
Objective-C
- (void)recoderError:(NSError *)error;
Parameters
error
The error.
-
* The callback that outputs the original video data captured by the camera.
Original video data can be used for facial recognition.
Declaration
Objective-C
- (void)recorderOutputVideoRawSampleBuffer:(CMSampleBufferRef)sampleBuffer;
Parameters
sampleBuffer
Video data.
-
* The callback that outputs the original audio data.
Original audio data can be used for voice recognition.
Declaration
Objective-C
- (void)recorderOutputAudioRawSampleBuffer:(CMSampleBufferRef)sampleBuffer;
Parameters
sampleBuffer
Audio data.
-
* The callback for custom rendering. CVPixelBufferRef -> CVPixelBufferRef
Declaration
Objective-C
- (CVPixelBufferRef)customRenderedPixelBufferWithRawSampleBuffer: (CMSampleBufferRef)sampleBuffer;
Parameters
sampleBuffer
The original video data.
Return Value
The PixelBuffer after custom rendering is applied.
-
* The callback for custom rendering. CVPixelBufferRef -> Texture
Declaration
Objective-C
- (int)customRenderedTextureWithRawSampleBuffer:(CMSampleBufferRef)sampleBuffer;
Parameters
sampleBuffer
The original video data.
Return Value
The texture after custom rendering is applied.
-
* The callback for custom rendering. Original Texture -> Texture
Declaration
Objective-C
- (int)customRender:(int)srcTexture size:(CGSize)size;
Parameters
srcTexture
The texture id of the original video.
size
The texture size of the original video.
Return Value
The texture id after custom rendering is applied.
-
Undocumented
Declaration
Objective-C
- (void)destroyRender;
-
Deprecated
deprecated,use
customRenderedTextureWithRawSampleBuffer:
instead* The callback for custom rendering.
Original video data and texture id are provided for custom rendering. Video data must be in BGRA format.
Declaration
Objective-C
- (NSInteger)recorderOutputVideoPixelBuffer:(CVPixelBufferRef)pixelBuffer textureName:(NSInteger)textureName;
Parameters
pixelBuffer
The data captured by the camera.
textureName
The original texture id.
Return Value
The texture id after custom rendering is applied.
-
Deprecated
deprecated, use
customRender:size:
instead* The callback that outputs the video texture returned by the camera.
This callback must be implemented when the video data is in BGRA or YUV format.
Declaration
Objective-C
- (NSInteger)recorderOutputVideoTextureName:(NSInteger)textureName textureSize:(CGSize)textureSize;
Parameters
textureName
The original texture id.
Return Value
The texture id after rendering.
-
Deprecated
deprecated
* The callback that outputs the video texture returned by the camera.
This callback must be implemented when the video data is in YUV format.
Declaration
Objective-C
- (NSInteger)recorderOutputVideoUVTextureName:(NSInteger)textureName;
Parameters
textureName
The texture id of the original UV components.
Return Value
The texture id after rendering.