
# 视频管理
 #### enableLocalVideo
```
virtual int enableLocalVideo(bool enabled)
```
【**功能说明**】
设置是否开启摄像头采集视频。
【**请求参数**】
enable：true表示开启。false表示关闭。
【**返回参数**】
- 0：方法调用成功。
- \> 0：方法调用失败。具体请参见[HRTCErrorCode](https://support.huaweicloud.com/csdk-rtc/rtc_05_0125.html)。
![](https://support.huaweicloud.com/csdk-rtc/public_sys-resources/caution_3.0-zh-cn.png)
- 默认开启本地视频采集。
- 远端用户订阅了本端用户时，会收到[onRemoteVideoStateChangedNotify](https://support.huaweicloud.com/csdk-rtc/rtc_05_0107.html#rtc_05_0107__zh-cn_topic_0277015530_section17665124613313)远端流状态变化回调。
 
 #### setVideoEncoderConfig
```
virtual int setVideoEncoderConfig(const HRTCVideoEncParam &encParam)
virtual int setVideoEncoderConfig(unsigned int totalBitRate, HRTCVideoEncParam *encoderParams, unsigned int encoderCount)
```
【**功能说明**】
接口一：大小流模式设置大流发流编码参数。大小流模式大流必须开启，小流建议开启。
接口二：多流模式设置发流编码参数。可支持720P到90P的四路流同时推送。
【**请求参数】**
encParam：视频编码参数。包括流类型、宽、高、码率、帧率等。其中宽必须是16的倍数，具体请参见[HRTCVideoEncParam](https://support.huaweicloud.com/csdk-rtc/rtc_05_0128.html#rtc_05_0128__zh-cn_topic_0277015533_section202077431610)。
【**返回参数** 】
- 0：方法调用成功。
- \> 0：方法调用失败。具体请参见[HRTCErrorCode](https://support.huaweicloud.com/csdk-rtc/rtc_05_0125.html)。
 
![](https://support.huaweicloud.com/csdk-rtc/public_sys-resources/caution_3.0-zh-cn.png)
- 华为SDK系统有默认的编码设置（720P+360P），一般可以不设置发流编码参数。如果您确实需要自定义发流编码参数，请参考华为SDK系统推荐码表：[表7 不同分辨率的码率和帧率配置推荐](https://support.huaweicloud.com/csdk-rtc/rtc_05_0128.html#rtc_05_0128__zh-cn_topic_0277015533_table15806112155510)和[不同场景下帧率和码率的推荐值](https://support.huaweicloud.com/csdk-rtc/rtc_05_0128.html#rtc_05_0128__zh-cn_topic_0277015533_table293952185616)，否则可能设置失败。
- 两重构接口针对不同使用方式并不通用，如果您使用的新选看系列接口[setupRemoteView]，需配套使用接口一：大小流模式设置发流编码参数的[setVideoEncoderConfig]，[enableSmallVideoStream]接口来自定义您的发流编码参数。同理使用旧的选看接口[startRemoteStreamView]需配套使用接口二：多流模式设置发流编码参数setVideoEncoderConfig接口。
- 同一端大小流或多流模式多路流设置的分辨率需保持一致，否则会设置失败。
- 多终端发流和选看的分辨率不一致时，sdk默认自适应并匹配最接近的分辨率（以实际发流分辨率优先），可能会导致选看时设置的分辨率和实际收到的流分辨率不一致。
- 调用接口一设置编码参数的分辨率发生变化时，需要先[enableSmallVideoStream]关闭小流，否则会因为分辨率一致条件限制导致大流设置失败。即涉及分辨率变化时，先关闭小流，再设置大流，再设置小流。
 
 #### enableSmallVideoStream
```
virtual int enableSmallVideoStream(bool enable, const HRTCVideoEncParam &encParam)
```
【**功能说明**】
大小流模式设置是否开启小流，并设置编码参数。小流可关闭但一般建议开启。
【**请求参数】**
- enable：是否开启小流。
- encParam：视频编码参数。包括流类型、宽、高、码率、帧率等。具体请参见[HRTCVideoEncParam](https://support.huaweicloud.com/csdk-rtc/rtc_05_0128.html#rtc_05_0128__zh-cn_topic_0277015533_section202077431610)。
【**返回参数** 】
- 0：方法调用成功。
- \> 0：方法调用失败。具体请参见[HRTCErrorCode](https://support.huaweicloud.com/csdk-rtc/rtc_05_0125.html)。
 
 #### startLocalPreview
```
virtual int startLocalPreview();
```
【**功能说明**】
开始本地预览。
【**返回参数**】
- 0：方法调用成功。
- \> 0：方法调用失败。具体请参见[HRTCErrorCode](https://support.huaweicloud.com/csdk-rtc/rtc_05_0125.html)。
![](https://support.huaweicloud.com/csdk-rtc/public_sys-resources/caution_3.0-zh-cn.png)
- 在房间外预览：先调用startLocalPreview开启预览，成功后再调用[setupLocalView]设置有效view实现预览；进入房间前需调用stopLocalPreview关闭预览，否则将一直处于预览状态，影响房间内预览。
- 在房间内预览：可调用[setupLocalView]设置有效view开启预览，设置为0表示关闭预览，不需要调用startLocalPreview和stopLocalPreview。
 
 #### stopLocalPreview
```
virtual int stopLocalPreview();
```
【**功能说明**】
停止本地预览。
【**返回参数** 】
- 0：方法调用成功。
- \> 0：方法调用失败。具体请参见[HRTCErrorCode](https://support.huaweicloud.com/csdk-rtc/rtc_05_0125.html)。
 
![](https://support.huaweicloud.com/csdk-rtc/public_sys-resources/caution_3.0-zh-cn.png)
如果调用了[startLocalPreview]，需调用stopLocalPreview关闭预览，否则将一直处于预览状态。该接口限制在房间外调用，在房间内设置不生效。
 #### setupLocalView
```
virtual int setupLocalView(view_t view, HRTCVideoDisplayMode displayMode)
virtual int setupLocalView(view_t view)
```
【**功能说明**】
设置本地渲染视图。该方法设置本地视频显示信息。 App通过调用此接口绑定本地视频流的显示视窗(view)，并设置视频显示模式。
【**请求参数**】
- view：窗口句柄。
- displayMode：图像填充模式。具体请参见[HRTCVideoDisplayMode](https://support.huaweicloud.com/csdk-rtc/rtc_05_0128.html#rtc_05_0128__zh-cn_topic_0277015533_section162591326191818)。不设置则默认为裁剪模式。
【**返回参数**】
- 0：方法调用成功。
- \> 0：方法调用失败。具体请参见[HRTCErrorCode](https://support.huaweicloud.com/csdk-rtc/rtc_05_0125.html)。
 
 #### updateLocalRenderMode
```
virtual int updateLocalRenderMode(HRTCVideoDisplayMode displayMode, HRTCVideoMirrorType mirrorMode) = 0;
```
【**功能说明**】
设置本地视图渲染模式，镜像模式。
【**请求参数**】
- displayMode：渲染模式。具体请参见[HRTCVideoDisplayMode](https://support.huaweicloud.com/csdk-rtc/rtc_05_0128.html#rtc_05_0128__zh-cn_topic_0277015533_section162591326191818)。
- mirrorMode：镜像模式。具体请参见[HRTCVideoMirrorType](https://support.huaweicloud.com/csdk-rtc/rtc_05_0128.html#rtc_05_0128__zh-cn_topic_0277015533_section6255102815113) 。
【**返回参数**】
- 0：方法调用成功。
- \> 0：方法调用失败。具体请参见[HRTCErrorCode](https://support.huaweicloud.com/csdk-rtc/rtc_05_0125.html)。
  ![](https://support.huaweicloud.com/csdk-rtc/public_sys-resources/caution_3.0-zh-cn.png)
  当前Windows平台的displayMode参数是无效的，只能使用[setupLocalView]设置本地渲染模式。
  
 
 #### setupRemoteView
```
virtual int setupRemoteView(const char* userId, view_t view)
```
【**功能说明**】
设置远端流渲染视图（新选看接口），该接口不影响收流。
【**请求参数**】
- userId：远端用户的唯一标识。
- view：窗口句柄，view为NULL时，解除窗口绑定并结束选看。
【**返回参数**】
- 0：方法调用成功。
- \> 0：方法调用失败。具体请参见[HRTCErrorCode](https://support.huaweicloud.com/csdk-rtc/rtc_05_0125.html)。
 
 #### updateRemoteRenderMode
```
virtual int updateRemoteRenderMode(const char* userId, HRTCVideoDisplayMode displayMode, HRTCVideoMirrorType mirrorMode)
```
【**功能说明**】
设置远端用户视图渲染模式。
【**请求参数** 】
- userId：远端用户的唯一标识。
- displayMode：视图显示模式。具体请参见[HRTCVideoDisplayMode](https://support.huaweicloud.com/csdk-rtc/rtc_05_0128.html#rtc_05_0128__zh-cn_topic_0277015533_section162591326191818)，默认RTC_VIDEO_DISPLAY_HIDDEN，通过裁剪的方式保持宽高比。
- mirrorMode：镜像模式。具体请参见[HRTCVideoMirrorType](https://support.huaweicloud.com/csdk-rtc/rtc_05_0128.html#rtc_05_0128__zh-cn_topic_0277015533_section6255102815113)。
 
【**返回参数**】
- 0：方法调用成功。
- \> 0：方法调用失败。具体请参见[HRTCErrorCode](https://support.huaweicloud.com/csdk-rtc/rtc_05_0125.html)。
 
 #### setRemoteVideoStreamType
```
virtual int setRemoteVideoStreamType(const char *userId, HRTCVideoStreamType type)
```
【**功能说明**】
大小流模式，设置指定选看用户的视频流类型。在通过新选看接口发起选看时调用。
【**请求参数**】
- userId：远端用户唯一标识。
- type：视频流类型。指大流、小流，具体请参见[HRTCVideoStreamType](https://support.huaweicloud.com/csdk-rtc/rtc_05_0128.html#rtc_05_0128__zh-cn_topic_0277015533_section1936155416553)。
【**返回参数**】
- 0：方法调用成功。
- \> 0：方法调用失败。具体请参见[HRTCErrorCode](https://support.huaweicloud.com/csdk-rtc/rtc_05_0125.html)。
 
 #### setPriorRemoteVideoStreamType
```
virtual int setPriorRemoteVideoStreamType(HRTCVideoStreamType type)
```
【**功能说明**】
大小流模式，设置所有订阅的远端视频流类型。默认订阅大流，优先使用[setRemoteVideoStreamType]接口设置的用户流类型。
【**请求参数**】
type：视频流类型。指大流、小流，具体请参见[HRTCVideoStreamType](https://support.huaweicloud.com/csdk-rtc/rtc_05_0128.html#rtc_05_0128__zh-cn_topic_0277015533_section1936155416553)。
【**返回参数**】
- 0：方法调用成功。
- \> 0：方法调用失败。具体请参见[HRTCErrorCode](https://support.huaweicloud.com/csdk-rtc/rtc_05_0125.html)。
 
#### pushLocalVideo
```
virtual int pushLocalVideo(bool push)
```
【**功能说明**】
设置是否开启发送本地视频流。
【**请求参数**】
push：true表示开启，false表示关闭。
【**返回参数**】
- 0：方法调用成功。
- \> 0：方法调用失败。具体请参见[HRTCErrorCode](https://support.huaweicloud.com/csdk-rtc/rtc_05_0125.html)。
![](https://support.huaweicloud.com/csdk-rtc/public_sys-resources/caution_3.0-zh-cn.png)
- 默认开启本地视频发流。
- 关闭本地视频发流，不影响本地视图采集，仍可见本地视图。
- 远端用户订阅了本端用户时，会收到[onRemoteVideoStateChangedNotify](https://support.huaweicloud.com/csdk-rtc/rtc_05_0107.html#rtc_05_0107__zh-cn_topic_0277015530_section17665124613313)远端流状态变化回调。
 
 #### pullRemoteVideo
```
virtual int pullRemoteVideo(const char* userId, bool pull)
```
【**功能说明**】
开启/关闭接收指定远端用户的视频流。只能加入房间后调用。
【**请求参数**】
- userId：远端用户的userId，唯一标识。
- pull：true表示开始接收，false表示关闭接收。
【**返回参数**】
- 0：方法调用成功。
- \> 0：方法调用失败。具体请参见[HRTCErrorCode](https://support.huaweicloud.com/csdk-rtc/rtc_05_0125.html)。
 
#### pullAllRemoteVideo
```
virtual int pullAllRemoteVideo(bool pull)
```
【**功能说明**】
开启/关闭接收当前房间所有远端用户的视频流。
【**请求参数**】
pull：true表示开始接收，false表示关闭接收， 默认开启接收。
【**返回参数**】
- 0：方法调用成功。
- \> 0：方法调用失败。具体请参见[HRTCErrorCode](https://support.huaweicloud.com/csdk-rtc/rtc_05_0125.html)。
 
 #### startRemoteStreamView
```
virtual int startRemoteStreamView(const char* userId, view_t view, HRTCStreamType streamType, bool disableAdjustRes)
```
【**功能说明**】
设置远端用户渲染视图，并开启收流（选看）。
【**请求参数** 】
- userId：远端用户的唯一标识。
- view：窗口句柄。
- streamType：视频分辨率，具体请参见[HRTCStreamType](https://support.huaweicloud.com/csdk-rtc/rtc_05_0128.html#rtc_05_0128__zh-cn_topic_0277015533_section15659205745617)。
- disableAdjustRes：禁用分辨率自适应，默认值为false，开启分辨率自适应。若关闭，在网络环境较差情况下可能会有卡顿现象。
 
【**返回参数**】
- 0：方法调用成功。
- \> 0：方法调用失败。具体请参见[HRTCErrorCode](https://support.huaweicloud.com/csdk-rtc/rtc_05_0125.html)。
![](https://support.huaweicloud.com/csdk-rtc/public_sys-resources/caution_3.0-zh-cn.png)
该接口为选看的旧接口，通过该接口和updateRemoteRenderMode完成一次完整的选看流程。新的完成选看功能拆分为三个接口：[setupRemoteView]、[pullRemoteVideo]和[setRemoteVideoStreamType]接口，将设置渲染模式、窗口句柄、选看的流类型拆分并增加pullRemoteVideo收流控制接口，以实现更细化的选看流程控制（将窗口绑定和收流控制分开）。您可以根据需要选择调用不同的接口组合以实现视频选看。
 #### stopRemoteStreamView
```
virtual int stopRemoteStreamView(const char* userId)
```
【**功能说明**】
关闭远端用户的渲染视图，并停止收流（停止选看）。
【**请求参数**】
userId：远端用户的唯一标识。
【**返回参数**】
- 0：方法调用成功。
- \> 0：方法调用失败。具体请参见[HRTCErrorCode](https://support.huaweicloud.com/csdk-rtc/rtc_05_0125.html)。
![](https://support.huaweicloud.com/csdk-rtc/public_sys-resources/caution_3.0-zh-cn.png)
新选看建议通过[setupRemoteView]接口设置窗口句柄为空来停止选看。
 #### setRemoteVideoAdjustResolution
```
virtual int setRemoteVideoAdjustResolution(bool enable)
```
【**功能说明**】
设置是否开启远端流分辨率自适应。默认开启自适应。
【**请求参数**】
enable：是否开启自适应。默认开启。
【**返回参数**】
- 0：方法调用成功。
- \> 0：方法调用失败。具体请参见[HRTCErrorCode](https://support.huaweicloud.com/csdk-rtc/rtc_05_0125.html)。
 
![](https://support.huaweicloud.com/csdk-rtc/public_sys-resources/caution_3.0-zh-cn.png)
只改变本地摄像头预览视图，不改变远端观看视图。预览时设置不生效。
 #### setVideoEncoderMirror
```
virtual int setVideoEncoderMirror(HRTCVideoMirrorType mirrorType)
```
【**功能说明**】
设置编码器输出的（本地发流）画面镜像模式。
【**请求参数**】
mirrorType：镜像模式，是否开启镜像。具体请参见[HRTCVideoMirrorType](https://support.huaweicloud.com/csdk-rtc/rtc_05_0128.html#rtc_05_0128__zh-cn_topic_0277015533_section6255102815113)。默认值为HRTC_VIDEO_MIRROR_TYPE_DISABLE。
【**返回参数**】
- 0：方法调用成功。
- \> 0：方法调用失败。具体请参见[HRTCErrorCode](https://support.huaweicloud.com/csdk-rtc/rtc_05_0125.html)。
![](https://support.huaweicloud.com/csdk-rtc/public_sys-resources/caution_3.0-zh-cn.png)
该接口不改变本地摄像头的预览画面，但会使远端用户看到的和服务器录制的画面为指定的镜像效果。
#### setCameraConfig
```
virtual int setCameraConfig(HRTCCameraConfig &config)
```
【**功能说明**】
设置相机参数。
【**请求参数**】
config：摄像头参数，参考[HRTCCameraConfig](https://support.huaweicloud.com/csdk-rtc/rtc_05_0128.html#rtc_05_0128__section651755345118)。
【**返回参数** 】
- 0：方法调用成功。
- \>0：方法调用失败。具体请参见[HRTCErrorCode](https://support.huaweicloud.com/csdk-rtc/rtc_05_0125.html)。
 
 #### switchCamera
```
virtual int switchCamera()
```
【**功能说明**】
切换摄像头，开启摄像头后生效。
【**请求参数**】
无
【**返回参数** 】
- 0：方法调用成功。
- \>0：方法调用失败。具体请参见[HRTCErrorCode](https://support.huaweicloud.com/csdk-rtc/rtc_05_0125.html)。
 
 #### startAllRemoteView
```
virtual int startAllRemoteView(unsigned int counts, const HRTCVideoRemoteView *viewInfo)
```
【**功能说明**】
批量设置远端流视图。
【**请求参数**】
- counts：订阅的视图数量，如果设置为0，则取消所有远端流视图。
- viewInfo：订阅的视图信息，主要包括代表该视图的句柄、流类型、用户ID、是否自适应等，具体请参见[HRTCVideoRemoteView](https://support.huaweicloud.com/csdk-rtc/rtc_05_0128.html#rtc_05_0128__zh-cn_topic_0277015533_section20548163352015)。
【**返回参数** 】
- 0：方法调用成功。
- \>0：方法调用失败。具体请参见[HRTCErrorCode](https://support.huaweicloud.com/csdk-rtc/rtc_05_0125.html)。
 
 #### setRemoteViewRotation
```
virtual int setRemoteViewRotation(const char* userId, HRTCVideoRotation rotation)
```
【**功能说明**】
设置远端流视图的旋转角度。
【**请求参数**】
- userId：用户ID。
- rotation：旋转角度信息（0°，90°，270°），具体请参见[HRTCVideoRotation](https://support.huaweicloud.com/csdk-rtc/rtc_05_0128.html#rtc_05_0128__zh-cn_topic_0277015533_section169241835112016)。
【**返回参数** 】
- 0：方法调用成功。
- \>0：方法调用失败。具体请参见[HRTCErrorCode](https://support.huaweicloud.com/csdk-rtc/rtc_05_0125.html)。
 
 #### setRemoteViewOrientation
```
virtual int setRemoteViewOrientation(const char *userId, HRTCVideoOrientation orientation)
```
【**功能说明**】
设置远端流视图方向（横竖屏）。
【**请求参数**】
- userId：用户ID。
- orientation：方向（横竖屏），具体请参见[HRTCVideoOrientation](https://support.huaweicloud.com/csdk-rtc/rtc_05_0128.html#rtc_05_0128__zh-cn_topic_0277015533_section36518378205)。
【**返回参数** 】
- 0：方法调用成功。
- \>0：方法调用失败。具体请参见[HRTCErrorCode](https://support.huaweicloud.com/csdk-rtc/rtc_05_0125.html)。
 
 #### setVideoPaddingImage
```
virtual int setVideoPaddingImage(const char* imagePath, int fps)
```
【**功能说明**】
设置关闭视频发流时发送的图片。
【**请求参数**】
- imagePath：图片路径，当前限制为bmp格式图片。
- fps：发送的帧率，范围为5-20帧，建议值为10帧。
【**返回参数** 】
- 0：方法调用成功。
- \>0：方法调用失败。具体请参见[HRTCErrorCode](https://support.huaweicloud.com/csdk-rtc/rtc_05_0125.html)。
 
 #### setBeautyRetouchOption
```
virtual int  setBeautyRetouchOption(boolean enabled, HRTCBeautyOptions option)
```
【**功能说明**】
设置是否开启美颜功能。
【**请求参数**】
- enabled：true表示打开，false表示关闭。
- option : 美颜设置参数，具体请参见[HRTCBeautyOptions](https://support.huaweicloud.com/csdk-rtc/rtc_05_0128.html#rtc_05_0128__section1135101917318)。
【**返回参数** 】
- 0：方法调用成功。
- \> 0：方法调用失败。具体请参见[HRTCErrorCode](https://support.huaweicloud.com/csdk-rtc/rtc_05_0125.html)。
 
 #### enableVideoBrighten
```
virtual int enableVideoBrighten(bool enabled)
```
【**功能说明**】
设置是否开启视频增亮功能。
【**请求参数**】
enabled：true表示开启，false表示关闭。
 #### ApplyGSensorMode
```
virtual int ApplyGSensorMode(HRTCGSensorMode mode)
```
【**功能说明**】
是否开启重力感应。
【**请求参数**】
HRTCGSensorMode：重力感应模式，具体请参见[HWRTCGSensorMode](https://support.huaweicloud.com/csdk-rtc/rtc_05_0128.html#rtc_05_0128__section5892153911712)。
【**返回参数**】
- 0：方法调用成功。
- \> 0：方法调用失败。具体请参见[HRTCErrorCode](https://support.huaweicloud.com/csdk-rtc/rtc_05_0125.html)。
 
 #### startPublishStream
```
virtual int startPublishStream(const char* taskId, const HRTCRtmpUrlList &urlList, const HRTCTranscodeConfig &transcodeConfig)
```
【**功能说明**】
开始旁路推流。
【**请求参数**】
- taskId：任务id，用户自定义，需保证唯一。
- urlList：url数组，具体请参见[HRTCRtmpUrlList](https://support.huaweicloud.com/csdk-rtc/rtc_05_0128.html#rtc_05_0128__section1811071814116)。
- transcodeConfig：用户id数组和其他参数，具体请参见[HRTCTranscodeConfig](https://support.huaweicloud.com/csdk-rtc/rtc_05_0128.html#rtc_05_0128__section061253104915)。
【**返回参数**】
- 0：方法调用成功。
- \> 0：方法调用失败。具体请参见[HRTCErrorCode](https://support.huaweicloud.com/csdk-rtc/rtc_05_0125.html)。
 
 #### updateTransCoding
```
virtual int updateTransCoding(const char* taskId,  const HRTCTranscodeConfig &transcodeConfig)
```
【**功能说明**】
更新旁路推流。收到远端用户重新入会时，需要重新推流。
【**请求参数**】
- taskId：任务id，用户自定义，需保证唯一。
- transcodeConfig：用户id数组和其他参数，具体请参见[HRTCTranscodeConfig](https://support.huaweicloud.com/csdk-rtc/rtc_05_0128.html#rtc_05_0128__section061253104915)。
【**返回参数**】
- 0：方法调用成功。
- \> 0：方法调用失败。具体请参见[HRTCErrorCode](https://support.huaweicloud.com/csdk-rtc/rtc_05_0125.html)。
 #### stopPublishStream
```
virtual int stopPublishStream(const char* taskId)
```
【**功能说明**】
停止旁路推流。
【**请求参数**】
taskId：任务id，用户自定义，需保证唯一。
【**返回参数**】
- 0：方法调用成功。
- \> 0：方法调用失败。具体请参见[HRTCErrorCode](https://support.huaweicloud.com/csdk-rtc/rtc_05_0125.html)。
 #### setVideoWaterMark
```
virtual int setVideoWaterMark(const char *imagePath, float xOffset, float yOffset, float fWidthRatio)
```
【**功能说明**】
插入或删除水印，本接口支持为主流和辅流添加水印。
【请求参数】
- imagePath：水印图片本地路径（传nullptr表示去掉水印）。
- xOffset：水印显示的左上角X轴偏移，取(0,1)的浮点数。
- yOffset：水印显示的左上角y轴偏移，取(0,1)的浮点数。
- fWidthRatio：水印显示的宽度占画面宽度的比例（水印按该参数等比例缩放显示），取(0,1)的浮点数。
【**返回参数** 】
- 0：方法调用成功。
- \> 0：方法调用失败。具体请参见[HRTCErrorCode](https://support.huaweicloud.com/csdk-rtc/rtc_05_0125.html)。
 
 #### setBackgroundBlur
```
virtual int setBackgroundBlur(bool enable, int radius) = 0;
```
【**功能说明**】
设置本地视频背景虚化功能，与背景替换功能互斥。
【请求参数】
- enable：开关。
- radius：虚化半径，范围为0-25。
【**返回参数** 】
- 0：方法调用成功。
- \> 0：方法调用失败。具体请参见[HRTCErrorCode](https://support.huaweicloud.com/csdk-rtc/rtc_05_0125.html)。
 
 #### setBackgroundReplace
```
virtual int setBackgroundReplace(bool enable, const char* imagePath) = 0;
```
【**功能说明**】
设置本地视频背景替换功能，与背景虚化功能互斥。
【请求参数】
- enable：开关。
- imagePath：背景替换的图片路径，有效路径长度为255（包含结束符），支持格式为jpg、jpeg、png。
【**返回参数** 】
- 0：方法调用成功。
- \> 0：方法调用失败。具体请参见[HRTCErrorCode](https://support.huaweicloud.com/csdk-rtc/rtc_05_0125.html)。
 
 #### appendLocalView
```
virtual int appendLocalView(view_t view) = 0;
```
【**功能说明**】
设置本地视频另一个窗口显示。只有在SDK渲染的模式下有效。
【请求参数】
view：窗口句柄。 null表示取消扩展的窗口显示。
【**返回参数** 】
- 0：方法调用成功。
- \> 0：方法调用失败。具体请参见[HRTCErrorCode](https://support.huaweicloud.com/csdk-rtc/rtc_05_0125.html)。
 
 #### appendRemoteView
```
virtual int appendRemoteView(const char *userId, view_t view) = 0;
```
【**功能说明**】
设置远程视频另一个窗口显示。只有在SDK渲染的模式下有效。
【请求参数】
- view：窗口句柄。 null表示取消扩展的窗口显示。
- userid：用户ID。
【**返回参数** 】
- 0：方法调用成功。
- \> 0：方法调用失败。具体请参见[HRTCErrorCode](https://support.huaweicloud.com/csdk-rtc/rtc_05_0125.html)。
 
