setFilterEffectOptions

Sets the filter effect options and specifies the media source.

virtual int setFilterEffectOptions(bool enabled, const FilterEffectOptions& options, agora::media::MEDIA_SOURCE_TYPE type = agora::media::PRIMARY_CAMERA_SOURCE) = 0;
Since
v4.5.0

Call timing

Call this method after calling enableVideo.

Restrictions

  • 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.
  • This feature has high requirements on device performance. When calling this method, the SDK automatically checks the capabilities of the current device.

Parameters

enabled
Whether to enable the filter effect:
  • true: Yes.
  • false: (Default) No.
options
The filter effect options. See FilterEffectOptions.
type
The type of the media source to which the filter effect is applied. See MEDIA_SOURCE_TYPE.
Attention: In this method, this parameter supports only the following two settings:
  • Use the default value PRIMARY_CAMERA_SOURCE if you use camera to capture local video.
  • Set this parameter to CUSTOM_VIDEO_SOURCE if you use custom video source.

Returns

  • 0: Success.
  • < 0: Failure.