io.agora.rtc

## Interface IVideoFrameObserver

-     public interface IVideoFrameObserver

  Observer interface for video frame events.

- - ### Method Summary

    All Methods Instance Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default int` | `onCaptureVideoFrame(AgoraVideoFrameObserver agora_video_frame_observer, VideoFrame frame)` Called when a captured video frame is received.
    `default int` | `onMediaPlayerVideoFrame(AgoraVideoFrameObserver agora_video_frame_observer, VideoFrame frame, int media_player_id)` Called when a media player video frame is received.
    `default int` | `onPreEncodeScreenVideoFrame(AgoraVideoFrameObserver agora_video_frame_observer, VideoFrame frame)` Called when a pre-encode screen video frame is received.
    `default int` | `onPreEncodeVideoFrame(AgoraVideoFrameObserver agora_video_frame_observer, VideoFrame frame)` Called when a pre-encode video frame is received.
    `default int` | `onRenderVideoFrame(AgoraVideoFrameObserver agora_video_frame_observer, java.lang.String channel_id, int uid, VideoFrame frame)` Called when a video frame is rendered.
    `default int` | `onScreenCaptureVideoFrame(AgoraVideoFrameObserver agora_video_frame_observer, VideoFrame frame)` Called when a screen capture video frame is received.
    `default int` | `onSecondaryCameraCaptureVideoFrame(AgoraVideoFrameObserver agora_video_frame_observer, VideoFrame frame)` Called when a secondary camera capture video frame is received.
    `default int` | `onSecondaryPreEncodeCameraVideoFrame(AgoraVideoFrameObserver agora_video_frame_observer, VideoFrame frame)` Called when a secondary pre-encode camera video frame is received.
    `default int` | `onSecondaryPreEncodeScreenVideoFrame(AgoraVideoFrameObserver agora_video_frame_observer, VideoFrame frame)` Called when a secondary pre-encode screen video frame is received.
    `default int` | `onSecondaryScreenSaptureVideoFrame(AgoraVideoFrameObserver agora_video_frame_observer, VideoFrame frame)` Called when a secondary screen capture video frame is received.
    `default int` | `onTranscodedVideoFrame(AgoraVideoFrameObserver agora_video_frame_observer, VideoFrame frame)` Called when a transcoded video frame is received.

- - ### Method Detail

    - #### onCaptureVideoFrame

          default int onCaptureVideoFrame(AgoraVideoFrameObserver agora_video_frame_observer,
                                          VideoFrame frame)

      Called when a captured video frame is received.
      Parameters:
        `agora_video_frame_observer` - The video frame observer instance
        `frame` - The video frame
      Returns:
        0 on success, non-zero on failure

    - #### onPreEncodeVideoFrame

          default int onPreEncodeVideoFrame(AgoraVideoFrameObserver agora_video_frame_observer,
                                            VideoFrame frame)

      Called when a pre-encode video frame is received.
      Parameters:
        `agora_video_frame_observer` - The video frame observer instance
        `frame` - The video frame
      Returns:
        0 on success, non-zero on failure

    - #### onSecondaryCameraCaptureVideoFrame

          default int onSecondaryCameraCaptureVideoFrame(AgoraVideoFrameObserver agora_video_frame_observer,
                                                         VideoFrame frame)

      Called when a secondary camera capture video frame is received.
      Parameters:
        `agora_video_frame_observer` - The video frame observer instance
        `frame` - The video frame
      Returns:
        0 on success, non-zero on failure

    - #### onSecondaryPreEncodeCameraVideoFrame

          default int onSecondaryPreEncodeCameraVideoFrame(AgoraVideoFrameObserver agora_video_frame_observer,
                                                           VideoFrame frame)

      Called when a secondary pre-encode camera video frame is received.
      Parameters:
        `agora_video_frame_observer` - The video frame observer instance
        `frame` - The video frame
      Returns:
        0 on success, non-zero on failure

    - #### onScreenCaptureVideoFrame

          default int onScreenCaptureVideoFrame(AgoraVideoFrameObserver agora_video_frame_observer,
                                                VideoFrame frame)

      Called when a screen capture video frame is received.
      Parameters:
        `agora_video_frame_observer` - The video frame observer instance
        `frame` - The video frame
      Returns:
        0 on success, non-zero on failure

    - #### onPreEncodeScreenVideoFrame

          default int onPreEncodeScreenVideoFrame(AgoraVideoFrameObserver agora_video_frame_observer,
                                                  VideoFrame frame)

      Called when a pre-encode screen video frame is received.
      Parameters:
        `agora_video_frame_observer` - The video frame observer instance
        `frame` - The video frame
      Returns:
        0 on success, non-zero on failure

    - #### onMediaPlayerVideoFrame

          default int onMediaPlayerVideoFrame(AgoraVideoFrameObserver agora_video_frame_observer,
                                              VideoFrame frame,
                                              int media_player_id)

      Called when a media player video frame is received.
      Parameters:
        `agora_video_frame_observer` - The video frame observer instance
        `frame` - The video frame
        `media_player_id` - Media player ID
      Returns:
        0 on success, non-zero on failure

    - #### onSecondaryScreenSaptureVideoFrame

          default int onSecondaryScreenSaptureVideoFrame(AgoraVideoFrameObserver agora_video_frame_observer,
                                                         VideoFrame frame)

      Called when a secondary screen capture video frame is received.
      Parameters:
        `agora_video_frame_observer` - The video frame observer instance
        `frame` - The video frame
      Returns:
        0 on success, non-zero on failure

    - #### onSecondaryPreEncodeScreenVideoFrame

          default int onSecondaryPreEncodeScreenVideoFrame(AgoraVideoFrameObserver agora_video_frame_observer,
                                                           VideoFrame frame)

      Called when a secondary pre-encode screen video frame is received.
      Parameters:
        `agora_video_frame_observer` - The video frame observer instance
        `frame` - The video frame
      Returns:
        0 on success, non-zero on failure

    - #### onRenderVideoFrame

          default int onRenderVideoFrame(AgoraVideoFrameObserver agora_video_frame_observer,
                                         java.lang.String channel_id,
                                         int uid,
                                         VideoFrame frame)

      Called when a video frame is rendered.
      Parameters:
        `agora_video_frame_observer` - The video frame observer instance
        `channel_id` - Channel ID
        `uid` - User ID
        `frame` - The video frame
      Returns:
        0 on success, non-zero on failure

    - #### onTranscodedVideoFrame

          default int onTranscodedVideoFrame(AgoraVideoFrameObserver agora_video_frame_observer,
                                             VideoFrame frame)

      Called when a transcoded video frame is received.
      Parameters:
        `agora_video_frame_observer` - The video frame observer instance
        `frame` - The video frame
      Returns:
        0 on success, non-zero on failure