io.agora.rtc

## Class AgoraDeviceInfo

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

-     public class AgoraDeviceInfo
      extends java.lang.Object

  Provides access to camera device enumeration and capabilities.

- - ### Field Summary

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

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AgoraDeviceInfo(long cptr)` Creates a device info wrapper.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `destroy()` Destroys the wrapper and releases native resources.
    `int` | `getCapability(java.lang.String device_unique_id_utf8, int device_capability_number, Out<VideoFormat> capability)` Retrieves a specific device capability.
    `int` | `getDeviceName(int deviceNum, Out<java.lang.String> deviceName, Out<java.lang.String> deviceUniqueId, Out<java.lang.String> productUniqueId)` Retrieves information about a device.
    `private void` | `ndestroy()` Releases the native device info object.
    `int` | `numberOfCapabilities(java.lang.String device_unique_id_utf8)` Gets the number of capabilities for the specified device.
    `int` | `numberOfDevices()` Gets the number of available devices.

    - ### 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 device info instance.

  - ### Constructor Detail

    - #### AgoraDeviceInfo

          public AgoraDeviceInfo(long cptr)

      Creates a device info wrapper.
      Parameters:
        `cptr` - Native pointer

  - ### Method Detail

    - #### ndestroy

          private void ndestroy()

      Releases the native device info object.

    - #### destroy

          public void destroy()

      Destroys the wrapper and releases native resources.

    - #### numberOfDevices

          public int numberOfDevices()

      Gets the number of available devices.
      Returns:
        Device count

    - #### getDeviceName

          public int getDeviceName(int deviceNum,
                                   Out<java.lang.String> deviceName,
                                   Out<java.lang.String> deviceUniqueId,
                                   Out<java.lang.String> productUniqueId)

      Retrieves information about a device.
      Parameters:
        `deviceNum` - Index of the device
        `deviceName` - Output buffer for the device name
        `deviceUniqueId` - Output buffer for the unique id
        `productUniqueId` - Output buffer for the product id
      Returns:
        Result code

    - #### numberOfCapabilities

          public int numberOfCapabilities(java.lang.String device_unique_id_utf8)

      Gets the number of capabilities for the specified device.
      Parameters:
        `device_unique_id_utf8` - Device unique id
      Returns:
        Capability count

    - #### getCapability

          public int getCapability(java.lang.String device_unique_id_utf8,
                                   int device_capability_number,
                                   Out<VideoFormat> capability)

      Retrieves a specific device capability.
      Parameters:
        `device_unique_id_utf8` - Device unique id
        `device_capability_number` - Capability index
        `capability` - Output capability descriptor
      Returns:
        Result code