VirtualBackgroundSource
自定义的背景。
C++
struct VirtualBackgroundSource {
enum BACKGROUND_SOURCE_TYPE {
BACKGROUND_NONE = 0,
BACKGROUND_COLOR = 1,
BACKGROUND_IMG = 2,
BACKGROUND_BLUR = 3,
BACKGROUND_VIDEO = 4,
};
enum BACKGROUND_BLUR_DEGREE {
BLUR_DEGREE_LOW = 1,
BLUR_DEGREE_MEDIUM = 2,
BLUR_DEGREE_HIGH = 3,
};
BACKGROUND_SOURCE_TYPE background_source_type;
unsigned int color;
const char* source;
BACKGROUND_BLUR_DEGREE blur_degree;
VirtualBackgroundSource() : background_source_type(BACKGROUND_COLOR), color(0xffffff), source(NULL), blur_degree(BLUR_DEGREE_HIGH) {}
};
background_source_type
自定义的背景。详见 BACKGROUND_SOURCE_TYPE
。
color
自定义的背景图颜色。格式为 RGB 定义下的十六进制整数,不要带 # 号,如 0xFFB6C1 表示浅粉色。 默认值为 0xFFFFFF,表示白色。 取值范围为 [0x000000,0xffffff]。如果取值非法,SDK 会用白色背景图替换原背景图。
注意: 该参数仅在自定义背景图类型为 BACKGROUND_COLOR 时生效。
source
自定义背景图的本地绝对路径。支持 PNG 和 JPG 格式。如果路径无效,SDK 会用白色背景图替换原背景图。
注意: 该参数仅在自定义背景图类型为 BACKGROUND_IMG 时生效。
blur_degree
自定义背景图的模糊程度。详见 BACKGROUND_BLUR_DEGREE
。注意: 该参数仅在自定义背景图类型为 BACKGROUND_BLUR 时生效。