io.agora.rtc

## Interface IVideoFrameObserver2

- All Known Implementing Classes:
    DefaultVideoFrameObserver2

      public interface IVideoFrameObserver2

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `onFrame(AgoraVideoFrameObserver2 agoraVideoFrameObserver2, java.lang.String channelId, java.lang.String remoteUserId, VideoFrame frame)` Note: To improve data transmission efficiency, the buffer of the frame object is a DirectByteBuffer.

- - ### Method Detail

    - #### onFrame

          void onFrame(AgoraVideoFrameObserver2 agoraVideoFrameObserver2,
                       java.lang.String channelId,
                       java.lang.String remoteUserId,
                       VideoFrame frame)

      Note: To improve data transmission efficiency, the buffer of the frame object is a DirectByteBuffer. Be sure to extract the byte array value in the callback synchronously and then transfer it to the asynchronous thread for processing. You can refer to `Utils.getBytes(ByteBuffer)`.
      Parameters:
        `agoraVideoFrameObserver2` - the video frame observer
        `channelId` - the channel id
        `remoteUserId` - the remote user id
        `frame` - the video frame