io.agora.rtc

## Class AgoraCameraCapturer

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

-     public class AgoraCameraCapturer
      extends java.lang.Object

  Wrapper around the native camera capturer handle.

- - ### Field Summary

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

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AgoraCameraCapturer(long cptr)` Creates a camera capturer wrapper.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `AgoraDeviceInfo` | `createDeviceInfo()` Creates a device info helper bound to this capturer.
    `void` | `destroy()` Destroys the capturer and releases native resources.
    `void` | `destroyCaptureFormat(VideoFormat stats)` Destroys a capture format previously returned by `getCaptureFormat()`.
    `VideoFormat` | `getCaptureFormat()` Retrieves the current capture format.
    `int` | `initWithDeviceId(java.lang.String device_id)` Initializes the capturer with a device id.
    `int` | `initWithDeviceName(java.lang.String device_name)` Initializes the capturer with a device name.
    `private void` | `ndestroy()` Releases the underlying native capturer.
    `void` | `setCaptureFormat(VideoFormat capture_format)` Sets the desired capture format.

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

  - ### Constructor Detail

    - #### AgoraCameraCapturer

          public AgoraCameraCapturer(long cptr)

      Creates a camera capturer wrapper.
      Parameters:
        `cptr` - Native pointer

  - ### Method Detail

    - #### ndestroy

          private void ndestroy()

      Releases the underlying native capturer.

    - #### destroy

          public void destroy()

      Destroys the capturer and releases native resources.

    - #### createDeviceInfo

          public AgoraDeviceInfo createDeviceInfo()

      Creates a device info helper bound to this capturer.
      Returns:
        Device information wrapper

    - #### initWithDeviceId

          public int initWithDeviceId(java.lang.String device_id)

      Initializes the capturer with a device id.
      Parameters:
        `device_id` - Device identifier
      Returns:
        Result code

    - #### initWithDeviceName

          public int initWithDeviceName(java.lang.String device_name)

      Initializes the capturer with a device name.
      Parameters:
        `device_name` - Device name
      Returns:
        Result code

    - #### setCaptureFormat

          public void setCaptureFormat(VideoFormat capture_format)

      Sets the desired capture format.
      Parameters:
        `capture_format` - Capture format

    - #### getCaptureFormat

          public VideoFormat getCaptureFormat()

      Retrieves the current capture format.
      Returns:
        Capture format

    - #### destroyCaptureFormat

          public void destroyCaptureFormat(VideoFormat stats)

      Destroys a capture format previously returned by `getCaptureFormat()`.
      Parameters:
        `stats` - Capture format to destroy