Agora RTC Objective-C API Reference Refactor

Instance Methods
<AgoraVideoSinkDelegate> Protocol Reference

Inherits <NSObject>.

## Instance Methods
(BOOL) | - onFrame:
(NSInteger) | - setPropertyWithKey:value:
(NSInteger) | - getPropertyWithKey:value:
(BOOL) | - didDataStreamWillStart
(void) | - didDataStreamWillStop

## Detailed Description

The `AgoraVideoSinkDelegate` protocol is the base class for the custom video sink.

## Method Documentation

## ◆ onFrame:

- (BOOL) onFrame: |  | (AgoraExtVideoFrame *__nonnull) | videoFrame |

Occurs when the `AgoraVideoSinkDelegate` object receives the video frame.

Parameters

  videoFrame | The pointer to the video frame.

## ◆ setPropertyWithKey:value:

- (NSInteger) setPropertyWithKey: |  | (NSString *__nonnull) | key
value: |  | (NSData *__nonnull) | value

Sets a private property in the `AgoraVideoSinkDelegate` class.

Parameters

  key | The pointer to the property name.
  value | The pointer to the buffer of this private property.

Returns
  - The actual size of the private property, if the method call succeeds.
  - -1, if the method call fails.

## ◆ getPropertyWithKey:value:

- (NSInteger) getPropertyWithKey: |  | (NSString *__nonnull) | key
value: |  | (NSData *_Nullable *_Nullable) | value

Gets a private property in the IVideoFilter class.

Parameters

  key | The pointer to the property name.
  (in/out) | value The pointer to the buffer of this private property.

Returns
  - The actual size of the private property, if the method call succeeds.
  - -1, if the method call fails.

## ◆ didDataStreamWillStart

- (BOOL) didDataStreamWillStart |  |  |
| optional

This function is invoked right before data stream starts. Custom filter can override this function for initialization.

Returns
  - `YES`: The initialization succeeds.
  - `NO`: The initialization fails.

## ◆ didDataStreamWillStop

- (void) didDataStreamWillStop |  |  |
| optional

This function is invoked right before data stream stops. Custom filter can override this function for deinitialization.