io.agora.rtc

## Interface IVideoEncodedFrameObserver

-     public interface IVideoEncodedFrameObserver

  Observer interface for encoded video frames.

- - ### Method Summary

    All Methods Instance Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default int` | `onEncodedVideoFrame(AgoraVideoEncodedFrameObserver observer, int userId, java.nio.ByteBuffer buffer, EncodedVideoFrameInfo info)` Note: To improve data transmission efficiency, the buffer of the frame object is a DirectByteBuffer.

- - ### Method Detail

    - #### onEncodedVideoFrame

          default int onEncodedVideoFrame(AgoraVideoEncodedFrameObserver observer,
                                          int userId,
                                          java.nio.ByteBuffer buffer,
                                          EncodedVideoFrameInfo info)

      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:
        `observer` - the video encoded frame observer
        `userId` - the user id
        `buffer` - the video encoded frame buffer
        `info` - the video encoded frame info
      Returns:
        0/1, the return value currently has no practical significance