\hypertarget{classio_1_1agora_1_1rtc2_1_1video_1_1_virtual_background_source}{}\doxysection{io.\+agora.\+rtc2.\+video.\+Virtual\+Background\+Source Class Reference}
\label{classio_1_1agora_1_1rtc2_1_1video_1_1_virtual_background_source}\index{io.agora.rtc2.video.VirtualBackgroundSource@{io.agora.rtc2.video.VirtualBackgroundSource}}


The custom background.  


\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1video_1_1_virtual_background_source_aca94ab29617ec98f28505fd8e6acf312}\label{classio_1_1agora_1_1rtc2_1_1video_1_1_virtual_background_source_aca94ab29617ec98f28505fd8e6acf312}} 
{\bfseries Virtual\+Background\+Source} (int \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1video_1_1_virtual_background_source_ae17ef9216ce0e45bfc94d2635b99bee8}{background\+Source\+Type}}, int \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1video_1_1_virtual_background_source_a4a4c963410d3898de303145ca05c14e5}{color}}, String \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1video_1_1_virtual_background_source_af578224dd53835cb03290469dc7356fb}{source}}, int \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1video_1_1_virtual_background_source_a29266d3877cf7c02b43dbc36ad96ed8c}{blur\+Degree}})
\end{DoxyCompactItemize}
\doxysubsection*{Public Attributes}
\begin{DoxyCompactItemize}
\item 
int \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1video_1_1_virtual_background_source_ae17ef9216ce0e45bfc94d2635b99bee8}{background\+Source\+Type}}
\item 
int \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1video_1_1_virtual_background_source_a4a4c963410d3898de303145ca05c14e5}{color}}
\item 
String \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1video_1_1_virtual_background_source_af578224dd53835cb03290469dc7356fb}{source}} = null
\item 
int \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1video_1_1_virtual_background_source_a29266d3877cf7c02b43dbc36ad96ed8c}{blur\+Degree}}
\end{DoxyCompactItemize}
\doxysubsection*{Static Public Attributes}
\begin{DoxyCompactItemize}
\item 
static final int \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1video_1_1_virtual_background_source_a57ce2ccb87b5192dbdb2d99eed379ee5}{B\+A\+C\+K\+G\+R\+O\+U\+N\+D\+\_\+\+N\+O\+NE}} = 0
\item 
static final int \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1video_1_1_virtual_background_source_a52790d0f2cfbe336a95caa45c3030589}{B\+A\+C\+K\+G\+R\+O\+U\+N\+D\+\_\+\+C\+O\+L\+OR}} = 1
\item 
static final int \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1video_1_1_virtual_background_source_ac23f8511eda39d9160a3b356a7e9fc25}{B\+A\+C\+K\+G\+R\+O\+U\+N\+D\+\_\+\+I\+MG}} = 2
\item 
static final int \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1video_1_1_virtual_background_source_a68472e70b99aba339821e80d9f6be91e}{B\+A\+C\+K\+G\+R\+O\+U\+N\+D\+\_\+\+B\+L\+UR}} = 3
\item 
static final int \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1video_1_1_virtual_background_source_aa33b19363de3b7fb8af14dc67d7d73b8}{B\+A\+C\+K\+G\+R\+O\+U\+N\+D\+\_\+\+V\+I\+D\+EO}} = 4
\item 
static final int \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1video_1_1_virtual_background_source_ac848779b61f5b2ac2a0ddc61c55a5bf5}{B\+L\+U\+R\+\_\+\+D\+E\+G\+R\+E\+E\+\_\+\+L\+OW}} = 1
\item 
static final int \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1video_1_1_virtual_background_source_a646ecab356ad8948fc2a381c13bbffbd}{B\+L\+U\+R\+\_\+\+D\+E\+G\+R\+E\+E\+\_\+\+M\+E\+D\+I\+UM}} = 2
\item 
static final int \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1video_1_1_virtual_background_source_a2479eda1953f754432e05479f8598c9b}{B\+L\+U\+R\+\_\+\+D\+E\+G\+R\+E\+E\+\_\+\+H\+I\+GH}} = 3
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
The custom background. 

\doxysubsection{Member Data Documentation}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1video_1_1_virtual_background_source_a57ce2ccb87b5192dbdb2d99eed379ee5}\label{classio_1_1agora_1_1rtc2_1_1video_1_1_virtual_background_source_a57ce2ccb87b5192dbdb2d99eed379ee5}} 
\index{io.agora.rtc2.video.VirtualBackgroundSource@{io.agora.rtc2.video.VirtualBackgroundSource}!BACKGROUND\_NONE@{BACKGROUND\_NONE}}
\index{BACKGROUND\_NONE@{BACKGROUND\_NONE}!io.agora.rtc2.video.VirtualBackgroundSource@{io.agora.rtc2.video.VirtualBackgroundSource}}
\doxysubsubsection{\texorpdfstring{BACKGROUND\_NONE}{BACKGROUND\_NONE}}
{\footnotesize\ttfamily final int io.\+agora.\+rtc2.\+video.\+Virtual\+Background\+Source.\+B\+A\+C\+K\+G\+R\+O\+U\+N\+D\+\_\+\+N\+O\+NE = 0\hspace{0.3cm}{\ttfamily [static]}}

0\+: Enable segementation with the captured video frame without replacing the background. \mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1video_1_1_virtual_background_source_a52790d0f2cfbe336a95caa45c3030589}\label{classio_1_1agora_1_1rtc2_1_1video_1_1_virtual_background_source_a52790d0f2cfbe336a95caa45c3030589}} 
\index{io.agora.rtc2.video.VirtualBackgroundSource@{io.agora.rtc2.video.VirtualBackgroundSource}!BACKGROUND\_COLOR@{BACKGROUND\_COLOR}}
\index{BACKGROUND\_COLOR@{BACKGROUND\_COLOR}!io.agora.rtc2.video.VirtualBackgroundSource@{io.agora.rtc2.video.VirtualBackgroundSource}}
\doxysubsubsection{\texorpdfstring{BACKGROUND\_COLOR}{BACKGROUND\_COLOR}}
{\footnotesize\ttfamily final int io.\+agora.\+rtc2.\+video.\+Virtual\+Background\+Source.\+B\+A\+C\+K\+G\+R\+O\+U\+N\+D\+\_\+\+C\+O\+L\+OR = 1\hspace{0.3cm}{\ttfamily [static]}}

1\+: The background is a solid color(eg\+: Oxffffff). \mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1video_1_1_virtual_background_source_ac23f8511eda39d9160a3b356a7e9fc25}\label{classio_1_1agora_1_1rtc2_1_1video_1_1_virtual_background_source_ac23f8511eda39d9160a3b356a7e9fc25}} 
\index{io.agora.rtc2.video.VirtualBackgroundSource@{io.agora.rtc2.video.VirtualBackgroundSource}!BACKGROUND\_IMG@{BACKGROUND\_IMG}}
\index{BACKGROUND\_IMG@{BACKGROUND\_IMG}!io.agora.rtc2.video.VirtualBackgroundSource@{io.agora.rtc2.video.VirtualBackgroundSource}}
\doxysubsubsection{\texorpdfstring{BACKGROUND\_IMG}{BACKGROUND\_IMG}}
{\footnotesize\ttfamily final int io.\+agora.\+rtc2.\+video.\+Virtual\+Background\+Source.\+B\+A\+C\+K\+G\+R\+O\+U\+N\+D\+\_\+\+I\+MG = 2\hspace{0.3cm}{\ttfamily [static]}}

2\+: Image source in P\+NG or J\+PG format. \mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1video_1_1_virtual_background_source_a68472e70b99aba339821e80d9f6be91e}\label{classio_1_1agora_1_1rtc2_1_1video_1_1_virtual_background_source_a68472e70b99aba339821e80d9f6be91e}} 
\index{io.agora.rtc2.video.VirtualBackgroundSource@{io.agora.rtc2.video.VirtualBackgroundSource}!BACKGROUND\_BLUR@{BACKGROUND\_BLUR}}
\index{BACKGROUND\_BLUR@{BACKGROUND\_BLUR}!io.agora.rtc2.video.VirtualBackgroundSource@{io.agora.rtc2.video.VirtualBackgroundSource}}
\doxysubsubsection{\texorpdfstring{BACKGROUND\_BLUR}{BACKGROUND\_BLUR}}
{\footnotesize\ttfamily final int io.\+agora.\+rtc2.\+video.\+Virtual\+Background\+Source.\+B\+A\+C\+K\+G\+R\+O\+U\+N\+D\+\_\+\+B\+L\+UR = 3\hspace{0.3cm}{\ttfamily [static]}}

3\+: Background blur. blur your background, not including your body. \mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1video_1_1_virtual_background_source_aa33b19363de3b7fb8af14dc67d7d73b8}\label{classio_1_1agora_1_1rtc2_1_1video_1_1_virtual_background_source_aa33b19363de3b7fb8af14dc67d7d73b8}} 
\index{io.agora.rtc2.video.VirtualBackgroundSource@{io.agora.rtc2.video.VirtualBackgroundSource}!BACKGROUND\_VIDEO@{BACKGROUND\_VIDEO}}
\index{BACKGROUND\_VIDEO@{BACKGROUND\_VIDEO}!io.agora.rtc2.video.VirtualBackgroundSource@{io.agora.rtc2.video.VirtualBackgroundSource}}
\doxysubsubsection{\texorpdfstring{BACKGROUND\_VIDEO}{BACKGROUND\_VIDEO}}
{\footnotesize\ttfamily final int io.\+agora.\+rtc2.\+video.\+Virtual\+Background\+Source.\+B\+A\+C\+K\+G\+R\+O\+U\+N\+D\+\_\+\+V\+I\+D\+EO = 4\hspace{0.3cm}{\ttfamily [static]}}

4\+: Video source in M\+P4, A\+VI, M\+KV, F\+LV format. \mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1video_1_1_virtual_background_source_ac848779b61f5b2ac2a0ddc61c55a5bf5}\label{classio_1_1agora_1_1rtc2_1_1video_1_1_virtual_background_source_ac848779b61f5b2ac2a0ddc61c55a5bf5}} 
\index{io.agora.rtc2.video.VirtualBackgroundSource@{io.agora.rtc2.video.VirtualBackgroundSource}!BLUR\_DEGREE\_LOW@{BLUR\_DEGREE\_LOW}}
\index{BLUR\_DEGREE\_LOW@{BLUR\_DEGREE\_LOW}!io.agora.rtc2.video.VirtualBackgroundSource@{io.agora.rtc2.video.VirtualBackgroundSource}}
\doxysubsubsection{\texorpdfstring{BLUR\_DEGREE\_LOW}{BLUR\_DEGREE\_LOW}}
{\footnotesize\ttfamily final int io.\+agora.\+rtc2.\+video.\+Virtual\+Background\+Source.\+B\+L\+U\+R\+\_\+\+D\+E\+G\+R\+E\+E\+\_\+\+L\+OW = 1\hspace{0.3cm}{\ttfamily [static]}}

blur degree low, have few blur effect \mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1video_1_1_virtual_background_source_a646ecab356ad8948fc2a381c13bbffbd}\label{classio_1_1agora_1_1rtc2_1_1video_1_1_virtual_background_source_a646ecab356ad8948fc2a381c13bbffbd}} 
\index{io.agora.rtc2.video.VirtualBackgroundSource@{io.agora.rtc2.video.VirtualBackgroundSource}!BLUR\_DEGREE\_MEDIUM@{BLUR\_DEGREE\_MEDIUM}}
\index{BLUR\_DEGREE\_MEDIUM@{BLUR\_DEGREE\_MEDIUM}!io.agora.rtc2.video.VirtualBackgroundSource@{io.agora.rtc2.video.VirtualBackgroundSource}}
\doxysubsubsection{\texorpdfstring{BLUR\_DEGREE\_MEDIUM}{BLUR\_DEGREE\_MEDIUM}}
{\footnotesize\ttfamily final int io.\+agora.\+rtc2.\+video.\+Virtual\+Background\+Source.\+B\+L\+U\+R\+\_\+\+D\+E\+G\+R\+E\+E\+\_\+\+M\+E\+D\+I\+UM = 2\hspace{0.3cm}{\ttfamily [static]}}

blur degree medium, blur more than level 1 \mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1video_1_1_virtual_background_source_a2479eda1953f754432e05479f8598c9b}\label{classio_1_1agora_1_1rtc2_1_1video_1_1_virtual_background_source_a2479eda1953f754432e05479f8598c9b}} 
\index{io.agora.rtc2.video.VirtualBackgroundSource@{io.agora.rtc2.video.VirtualBackgroundSource}!BLUR\_DEGREE\_HIGH@{BLUR\_DEGREE\_HIGH}}
\index{BLUR\_DEGREE\_HIGH@{BLUR\_DEGREE\_HIGH}!io.agora.rtc2.video.VirtualBackgroundSource@{io.agora.rtc2.video.VirtualBackgroundSource}}
\doxysubsubsection{\texorpdfstring{BLUR\_DEGREE\_HIGH}{BLUR\_DEGREE\_HIGH}}
{\footnotesize\ttfamily final int io.\+agora.\+rtc2.\+video.\+Virtual\+Background\+Source.\+B\+L\+U\+R\+\_\+\+D\+E\+G\+R\+E\+E\+\_\+\+H\+I\+GH = 3\hspace{0.3cm}{\ttfamily [static]}}

blur degree high, blur default, hard to find background \mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1video_1_1_virtual_background_source_ae17ef9216ce0e45bfc94d2635b99bee8}\label{classio_1_1agora_1_1rtc2_1_1video_1_1_virtual_background_source_ae17ef9216ce0e45bfc94d2635b99bee8}} 
\index{io.agora.rtc2.video.VirtualBackgroundSource@{io.agora.rtc2.video.VirtualBackgroundSource}!backgroundSourceType@{backgroundSourceType}}
\index{backgroundSourceType@{backgroundSourceType}!io.agora.rtc2.video.VirtualBackgroundSource@{io.agora.rtc2.video.VirtualBackgroundSource}}
\doxysubsubsection{\texorpdfstring{backgroundSourceType}{backgroundSourceType}}
{\footnotesize\ttfamily int io.\+agora.\+rtc2.\+video.\+Virtual\+Background\+Source.\+background\+Source\+Type}

The custom background.
\begin{DoxyItemize}
\item B\+A\+C\+K\+G\+R\+O\+U\+N\+D\+\_\+\+N\+O\+NE (0)\+: Process the background as alpha data without replacement, only separating the portrait and the background. After setting this value, you can call {\ttfamily start\+Local\+Video\+Transcoder} to implement the picture-\/in-\/picture effect.
\item B\+A\+C\+K\+G\+R\+O\+U\+N\+D\+\_\+\+C\+O\+L\+OR (1)\+: (Default) The background image is a solid color.
\item B\+A\+C\+K\+G\+R\+O\+U\+N\+D\+\_\+\+I\+MG (2)\+: The background image is a file in P\+NG or J\+PG format.
\item B\+A\+C\+K\+G\+R\+O\+U\+N\+D\+\_\+\+B\+L\+UR (3)\+: The background is a blurred version of the original background.
\item B\+A\+C\+K\+G\+R\+O\+U\+N\+D\+\_\+\+V\+I\+D\+EO (4)\+: The background is a local video in M\+P4, A\+VI, M\+KV, F\+LV, or other supported formats. 
\end{DoxyItemize}\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1video_1_1_virtual_background_source_a4a4c963410d3898de303145ca05c14e5}\label{classio_1_1agora_1_1rtc2_1_1video_1_1_virtual_background_source_a4a4c963410d3898de303145ca05c14e5}} 
\index{io.agora.rtc2.video.VirtualBackgroundSource@{io.agora.rtc2.video.VirtualBackgroundSource}!color@{color}}
\index{color@{color}!io.agora.rtc2.video.VirtualBackgroundSource@{io.agora.rtc2.video.VirtualBackgroundSource}}
\doxysubsubsection{\texorpdfstring{color}{color}}
{\footnotesize\ttfamily int io.\+agora.\+rtc2.\+video.\+Virtual\+Background\+Source.\+color}

The type of the custom background image. The color of the custom background image. The format is a hexadecimal integer defined by R\+GB, without the \# sign, such as 0x\+F\+F\+B6\+C1 for light pink. The default value is 0x\+F\+F\+F\+F\+FF, which signifies white. The value range is \mbox{[}0x000000, 0xffffff\mbox{]}. If the value is invalid, the S\+DK replaces the original background image with a white background image. \begin{DoxyNote}{Note}
This parameter is only applicable to custom backgrounds of the following types\+:
\begin{DoxyItemize}
\item B\+A\+C\+K\+G\+R\+O\+U\+N\+D\+\_\+\+C\+O\+L\+OR\+: The background image is a solid-\/colored image of the color passed in by the parameter.
\item B\+A\+C\+K\+G\+R\+O\+U\+N\+D\+\_\+\+I\+MG\+: If the image in {\ttfamily source} has a transparent background, the transparent background will be filled with the color passed in by the parameter. 
\end{DoxyItemize}
\end{DoxyNote}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1video_1_1_virtual_background_source_af578224dd53835cb03290469dc7356fb}\label{classio_1_1agora_1_1rtc2_1_1video_1_1_virtual_background_source_af578224dd53835cb03290469dc7356fb}} 
\index{io.agora.rtc2.video.VirtualBackgroundSource@{io.agora.rtc2.video.VirtualBackgroundSource}!source@{source}}
\index{source@{source}!io.agora.rtc2.video.VirtualBackgroundSource@{io.agora.rtc2.video.VirtualBackgroundSource}}
\doxysubsubsection{\texorpdfstring{source}{source}}
{\footnotesize\ttfamily String io.\+agora.\+rtc2.\+video.\+Virtual\+Background\+Source.\+source = null}

The local absolute path of the custom background image. Supports P\+NG, J\+PG, M\+P4, A\+VI, M\+KV, and F\+LV formats. If the path is invalid, the S\+DK will use either the original background image or the solid color image specified by {\ttfamily color}. \begin{DoxyNote}{Note}
This parameter takes effect only when the type of the custom background image is B\+A\+C\+K\+G\+R\+O\+U\+N\+D\+\_\+\+I\+MG or B\+A\+C\+K\+G\+R\+O\+U\+N\+D\+\_\+\+V\+I\+D\+EO. 
\end{DoxyNote}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1video_1_1_virtual_background_source_a29266d3877cf7c02b43dbc36ad96ed8c}\label{classio_1_1agora_1_1rtc2_1_1video_1_1_virtual_background_source_a29266d3877cf7c02b43dbc36ad96ed8c}} 
\index{io.agora.rtc2.video.VirtualBackgroundSource@{io.agora.rtc2.video.VirtualBackgroundSource}!blurDegree@{blurDegree}}
\index{blurDegree@{blurDegree}!io.agora.rtc2.video.VirtualBackgroundSource@{io.agora.rtc2.video.VirtualBackgroundSource}}
\doxysubsubsection{\texorpdfstring{blurDegree}{blurDegree}}
{\footnotesize\ttfamily int io.\+agora.\+rtc2.\+video.\+Virtual\+Background\+Source.\+blur\+Degree}

The degree of blurring applied to the custom background image.
\begin{DoxyItemize}
\item B\+L\+U\+R\+\_\+\+D\+E\+G\+R\+E\+E\+\_\+\+L\+OW (1)\+: The degree of blurring applied to the custom background image is low. The user can almost see the background clearly.
\item B\+L\+U\+R\+\_\+\+D\+E\+G\+R\+E\+E\+\_\+\+M\+E\+D\+I\+UM (2)\+: The degree of blurring applied to the custom background image is medium. It is difficult for the user to recognize details in the background.
\item B\+L\+U\+R\+\_\+\+D\+E\+G\+R\+E\+E\+\_\+\+H\+I\+GH (3)\+: The degree of blurring applied to the custom background image is high. The user can barely see any distinguishing features in the background. \begin{DoxyNote}{Note}
This parameter takes effect only when the type of the custom background image is B\+A\+C\+K\+G\+R\+O\+U\+N\+D\+\_\+\+B\+L\+UR. 
\end{DoxyNote}

\end{DoxyItemize}