io.agora.rtc

## Class DefaultVideoEncodedFrameObserver

- java.lang.Object
- - io.agora.rtc.DefaultVideoEncodedFrameObserver

- All Implemented Interfaces:
    IVideoEncodedFrameObserver

      public class DefaultVideoEncodedFrameObserver
      extends java.lang.Object
      implements IVideoEncodedFrameObserver

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultVideoEncodedFrameObserver()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `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.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DefaultVideoEncodedFrameObserver

          public DefaultVideoEncodedFrameObserver()

  - ### Method Detail

    - #### onEncodedVideoFrame

          public 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)`.
      Specified by:
        `onEncodedVideoFrame` in interface `IVideoEncodedFrameObserver`
      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