setColorEnhanceOptions abstract method

Future<void> setColorEnhanceOptions({
  1. required bool enabled,
  2. required ColorEnhanceOptions options,
  3. MediaSourceType type = MediaSourceType.primaryCameraSource,
})

Sets color enhancement.

The video images captured by the camera can have color distortion. The color enhancement feature intelligently adjusts video characteristics such as saturation and contrast to enhance the video color richness and color reproduction, making the video more vivid. You can call this method to enable the color enhancement feature and set the options of the color enhancement effect. Call this method after calling enableVideo. The color enhancement feature has certain performance requirements on devices. With color enhancement turned on, Agora recommends that you change the color enhancement level to one that consumes less performance or turn off color enhancement if your device is experiencing severe heat problems. Both this method and setExtensionProperty can enable color enhancement: When you use the SDK to capture video, Agora recommends this method (this method only works for video captured by the SDK). When you use an external video source to implement custom video capture, or send an external video source to the SDK, Agora recommends using setExtensionProperty. This method relies on the image enhancement dynamic library libagora_clear_vision_extension.dll. If the dynamic library is deleted, the function cannot be enabled normally.

  • enabled Whether to enable color enhancement: true Enable color enhancement. false : (Default) Disable color enhancement.
  • options The color enhancement options. See ColorEnhanceOptions.
  • type The type of the video source. See MediaSourceType.

Returns When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown. You need to catch the exception and handle it accordingly.

Implementation

Future<void> setColorEnhanceOptions(
    {required bool enabled,
    required ColorEnhanceOptions options,
    MediaSourceType type = MediaSourceType.primaryCameraSource});