com.aliyun.svideosdk.common

## Class NativeAdaptiveUtil

- java.lang.Object
- - AbstractNativeLoader
  - - com.aliyun.svideosdk.common.NativeAdaptiveUtil

-     public class NativeAdaptiveUtil
      extends AbstractNativeLoader

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `NativeAdaptiveUtil()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `decoderAdaptiveList(java.lang.String[] models, int[] versions)` Adds a model to the whitelist.
    `static void` | `disableHardDecoderAdaptiveList(java.lang.String[] models, int[] versions)` Adds a model to the blacklist.
    `static void` | `encoderAdaptiveList(java.lang.String[] models, int[] versions)` Adds a model to the blacklist.
    `static boolean` | `isDeviceDecoderEnable()` Gets whether a device is in the whitelist.
    `static void` | `setFastEncode(boolean isFaster)` Deprecated. It is not recommended to call this method.
    `static void` | `setHWDecoderEnable(boolean hwDecoderEnable)` Enables or disables hardware decoding.
    `static void` | `setHWEncoderEnable(boolean hwEncoderEnable)` Enables or disables hardware encoding.

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

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

- - ### Constructor Detail

    - #### NativeAdaptiveUtil

          public NativeAdaptiveUtil()

  - ### Method Detail

    - #### decoderAdaptiveList

          public static void decoderAdaptiveList(java.lang.String[] models,
                                                 int[] versions)

      Adds a model to the whitelist. Hardware decoding is used for whitelisted models when hardware decoding is enabled. Deprecated.
      Parameters:
        `models` - The model list. `Build#MODEL`
        `versions` - The OS version list. `Build.VERSION#SDK_INT` Enter 0 if there is no need to match models with OS versions.
      See Also:
        `setHWDecoderEnable(boolean)`

    - #### disableHardDecoderAdaptiveList

          public static void disableHardDecoderAdaptiveList(java.lang.String[] models,
                                                            int[] versions)

      Adds a model to the blacklist. Software decoding is used for blacklisted models when hardware decoding is enabled. Models and OS versions must match each other. Hardware decoding is used for models not in the blacklist when hardware decoding is enabled.
      Parameters:
        `models` - The model list. `Build#MODEL`
        `versions` - The OS version list. `Build.VERSION#SDK_INT` Enter 0 if there is no need to match models with OS versions.
      See Also:
        `setHWDecoderEnable(boolean)`

    - #### setHWDecoderEnable

          public static void setHWDecoderEnable(boolean hwDecoderEnable)

      Enables or disables hardware decoding. Default is true. When hardware decoding is enabled, hardware decoding is used for all whitelisted models. When disabled, software decoding is used for all models.
      Parameters:
        `hwDecoderEnable` - true indicates enable hardware decoding. false indicates disable hardware decoding.
      See Also:
        `decoderAdaptiveList(String[], int[])`

    - #### encoderAdaptiveList

          public static void encoderAdaptiveList(java.lang.String[] models,
                                                 int[] versions)

      Adds a model to the blacklist. Models and OS versions must match each other. When hardware encoding is enabled, software encoding is used for blacklisted models while hardware encoding is used for models not in the blacklist.
      Parameters:
        `models` - The model list. `Build#MODEL`
        `versions` - The OS version list. `Build.VERSION#SDK_INT` Enter 0 if there is no need to match models with OS versions.

    - #### setHWEncoderEnable

          public static void setHWEncoderEnable(boolean hwEncoderEnable)

      Enables or disables hardware encoding. Default is true. When hardware encoding is enabled, hardware encoding is used for all whitelisted models. When disabled, software encoding is used for all models.
      Parameters:
        `hwEncoderEnable` - true indicates enable hardware encoding. false indicates disable hardware encoding.
      See Also:
        `encoderAdaptiveList(String[], int[])`

    - #### isDeviceDecoderEnable

          public static boolean isDeviceDecoderEnable()

      Gets whether a device is in the whitelist.
      Returns:
        true indicates yes. false indicates no.

    - #### setFastEncode

          public static void setFastEncode(boolean isFaster)

      Deprecated. It is not recommended to call this method.
      Sets whether to separate audio and video tracks during encoding.
      Parameters:
        `isFaster` -