io.agora.rtc

## Class AgoraVideoFrameObserver

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

-     public class AgoraVideoFrameObserver
      extends java.lang.Object

  Wrapper for video frame observer functionality.

- - ### Field Summary

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

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AgoraVideoFrameObserver()` Constructs a video frame observer.

  - ### 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.
    `int` | `getMirrorApplied()` Gets the mirror applied to the video frame.
    `int` | `getRotationApplied()` Gets the rotation applied to the video frame.
    `int` | `getVideoPixelFormatPreference()` Gets the video pixel format preference.
    `private void` | `nativeDestroy(long cptr)` Releases the native video frame observer handle.
    `private int` | `nativeGetMirrorApplied(long cptr)` Gets the mirror applied natively.
    `private int` | `nativeGetRotationApplied(long cptr)` Gets the rotation applied natively.
    `private int` | `nativeGetVideoPixelFormatPreference(long cptr)` Gets the video pixel format preference natively.
    `private long` | `nativeInit()` Initializes the native video frame observer.
    `private int` | `nativeThroughTheInterface(long cptr)` Checks if processed through interface natively.
    `int` | `throughTheInterface()` Checks if the frame is processed through the interface.

    - ### 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.

  - ### Constructor Detail

    - #### AgoraVideoFrameObserver

          public AgoraVideoFrameObserver()

      Constructs a video frame observer.

  - ### Method Detail

    - #### destroy

          public void destroy()

      Destroys the video frame observer and releases native resources.

    - #### getVideoPixelFormatPreference

          public int getVideoPixelFormatPreference()

      Gets the video pixel format preference.
      Returns:
        Pixel format preference

    - #### getRotationApplied

          public int getRotationApplied()

      Gets the rotation applied to the video frame.
      Returns:
        Rotation value

    - #### getMirrorApplied

          public int getMirrorApplied()

      Gets the mirror applied to the video frame.
      Returns:
        Mirror value

    - #### throughTheInterface

          public int throughTheInterface()

      Checks if the frame is processed through the interface.
      Returns:
        1 if processed, 0 otherwise

    - #### nativeInit

          private long nativeInit()

      Initializes the native video frame observer.
      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

    - #### nativeGetVideoPixelFormatPreference

          private int nativeGetVideoPixelFormatPreference(long cptr)

      Gets the video pixel format preference natively.
      Parameters:
        `cptr` - Native pointer to the observer instance
      Returns:
        Pixel format preference

    - #### nativeGetRotationApplied

          private int nativeGetRotationApplied(long cptr)

      Gets the rotation applied natively.
      Parameters:
        `cptr` - Native pointer to the observer instance
      Returns:
        Rotation value

    - #### nativeGetMirrorApplied

          private int nativeGetMirrorApplied(long cptr)

      Gets the mirror applied natively.
      Parameters:
        `cptr` - Native pointer to the observer instance
      Returns:
        Mirror value

    - #### nativeThroughTheInterface

          private int nativeThroughTheInterface(long cptr)

      Checks if processed through interface natively.
      Parameters:
        `cptr` - Native pointer to the observer instance
      Returns:
        1 if processed, 0 otherwise