io.agora.rtc

## Class AgoraVideoFrameObserver2

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

-     public class AgoraVideoFrameObserver2
      extends java.lang.Object

  Wrapper for video frame observer V2 functionality.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private long` | `cptr` Native pointer to the video frame observer instance.
    `private IVideoFrameObserver2` | `videoFrameObserver2` Observer for video frame events

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AgoraVideoFrameObserver2(IVideoFrameObserver2 observer)` Constructs a video frame observer V2.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `destroy()` Destroys the video frame observer and releases native resources.
    `private void` | `nativeDestroy(long cptr)` Releases the native video frame observer handle.
    `private long` | `nativeInit(IVideoFrameObserver2 observer)` Initializes the native video frame observer.

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

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

- - ### Field Detail

    - #### cptr

          private long cptr

      Native pointer to the video frame observer instance.

    - #### videoFrameObserver2

          private IVideoFrameObserver2 videoFrameObserver2

      Observer for video frame events

  - ### Constructor Detail

    - #### AgoraVideoFrameObserver2

          public AgoraVideoFrameObserver2(IVideoFrameObserver2 observer)

      Constructs a video frame observer V2.
      Parameters:
        `observer` - Video frame observer interface

  - ### Method Detail

    - #### destroy

          public void destroy()

      Destroys the video frame observer and releases native resources.

    - #### nativeInit

          private long nativeInit(IVideoFrameObserver2 observer)

      Initializes the native video frame observer.
      Parameters:
        `observer` - Video frame observer interface
      Returns:
        Native pointer to the observer instance

    - #### nativeDestroy

          private void nativeDestroy(long cptr)

      Releases the native video frame observer handle.
      Parameters:
        `cptr` - Native pointer to the observer instance