\hypertarget{classagora_1_1rtc_1_1_i_extension_video_encoder}{}\doxysection{agora\+::rtc\+::I\+Extension\+Video\+Encoder Class Reference}
\label{classagora_1_1rtc_1_1_i_extension_video_encoder}\index{agora::rtc::IExtensionVideoEncoder@{agora::rtc::IExtensionVideoEncoder}}
Inheritance diagram for agora\+::rtc\+::I\+Extension\+Video\+Encoder\+:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{classagora_1_1rtc_1_1_i_extension_video_encoder}
\end{center}
\end{figure}
\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
virtual int \mbox{\hyperlink{classagora_1_1rtc_1_1_i_extension_video_encoder_a6fd7999684b5b39205d4f7bc63d66550}{init\+Video\+Encoder}} (\mbox{\hyperlink{classagora_1_1rtc_1_1_extension_video_codec_settings}{Extension\+Video\+Codec\+Settings}} codec\+\_\+settings)=0
\item 
virtual int32\+\_\+t \mbox{\hyperlink{classagora_1_1rtc_1_1_i_extension_video_encoder_a755f041534ea0ba8eb9788eb23d82b15}{register\+Encoder\+Callback}} (\mbox{\hyperlink{classagora_1_1rtc_1_1_i_extension_encoder_callback}{I\+Extension\+Encoder\+Callback}} $\ast$callback)=0
\item 
virtual int \mbox{\hyperlink{classagora_1_1rtc_1_1_i_extension_video_encoder_a37cb9a2868b64d72b3608c4a990c615f}{encode}} (\mbox{\hyperlink{classagora_1_1agora__refptr}{agora\+\_\+refptr}}$<$ \mbox{\hyperlink{classagora_1_1rtc_1_1_i_video_frame}{I\+Video\+Frame}} $>$ frame, V\+I\+D\+E\+O\+\_\+\+F\+R\+A\+M\+E\+\_\+\+T\+Y\+PE frame\+\_\+type)=0
\item 
virtual int32\+\_\+t \mbox{\hyperlink{classagora_1_1rtc_1_1_i_extension_video_encoder_a2769585118986eaa7fd417b3ead58a10}{release\+Video\+Encoder}} ()=0
\item 
virtual int32\+\_\+t \mbox{\hyperlink{classagora_1_1rtc_1_1_i_extension_video_encoder_aaaac6ba00560f8e589c577c36e2cc015}{set\+Rates}} (uint32\+\_\+t bitrate\+\_\+kbps, uint32\+\_\+t framerate)=0
\item 
virtual void \mbox{\hyperlink{classagora_1_1rtc_1_1_i_extension_video_encoder_a6c1055e876f1bf2a435c3d28600c026a}{query\+Support\+Codec\+Data\+Format}} (media\+::base\+::\+V\+I\+D\+E\+O\+\_\+\+P\+I\+X\+E\+L\+\_\+\+F\+O\+R\+M\+AT $\ast$data\+\_\+format, int \&size)=0
\item 
virtual int \mbox{\hyperlink{classagora_1_1rtc_1_1_i_extension_video_encoder_aa9017201356ef280d9add3485369d62c}{set\+Advanced\+Codec\+Property}} (const char $\ast$key, const char $\ast$json\+\_\+value)=0
\item 
virtual int \mbox{\hyperlink{classagora_1_1rtc_1_1_i_extension_video_encoder_a833736247b91a4da585ea9c8880d84bf}{get\+Advanced\+Codec\+Property}} (const char $\ast$key, char $\ast$json\+\_\+value, int \&length) const =0
\end{DoxyCompactItemize}


\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{classagora_1_1rtc_1_1_i_extension_video_encoder_a6fd7999684b5b39205d4f7bc63d66550}\label{classagora_1_1rtc_1_1_i_extension_video_encoder_a6fd7999684b5b39205d4f7bc63d66550}} 
\index{agora::rtc::IExtensionVideoEncoder@{agora::rtc::IExtensionVideoEncoder}!initVideoEncoder@{initVideoEncoder}}
\index{initVideoEncoder@{initVideoEncoder}!agora::rtc::IExtensionVideoEncoder@{agora::rtc::IExtensionVideoEncoder}}
\doxysubsubsection{\texorpdfstring{initVideoEncoder()}{initVideoEncoder()}}
{\footnotesize\ttfamily virtual int agora\+::rtc\+::\+I\+Extension\+Video\+Encoder\+::init\+Video\+Encoder (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{classagora_1_1rtc_1_1_extension_video_codec_settings}{Extension\+Video\+Codec\+Settings}}}]{codec\+\_\+settings }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}

Initializes the video encoder with the specified codec settings. 
\begin{DoxyParams}{Parameters}
{\em codec\+\_\+settings} & The video codec settings that define how the video should be encoded. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}

\begin{DoxyItemize}
\item 0\+: Initialization succeeded.
\item $<$ 0\+: Initialization failed, possibly due to invalid settings or internal errors. 
\end{DoxyItemize}
\end{DoxyReturn}
\mbox{\Hypertarget{classagora_1_1rtc_1_1_i_extension_video_encoder_a755f041534ea0ba8eb9788eb23d82b15}\label{classagora_1_1rtc_1_1_i_extension_video_encoder_a755f041534ea0ba8eb9788eb23d82b15}} 
\index{agora::rtc::IExtensionVideoEncoder@{agora::rtc::IExtensionVideoEncoder}!registerEncoderCallback@{registerEncoderCallback}}
\index{registerEncoderCallback@{registerEncoderCallback}!agora::rtc::IExtensionVideoEncoder@{agora::rtc::IExtensionVideoEncoder}}
\doxysubsubsection{\texorpdfstring{registerEncoderCallback()}{registerEncoderCallback()}}
{\footnotesize\ttfamily virtual int32\+\_\+t agora\+::rtc\+::\+I\+Extension\+Video\+Encoder\+::register\+Encoder\+Callback (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{classagora_1_1rtc_1_1_i_extension_encoder_callback}{I\+Extension\+Encoder\+Callback}} $\ast$}]{callback }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}

Registers a callback function to handle encoding events or notifications. 
\begin{DoxyParams}{Parameters}
{\em callback} & A pointer to the encoder callback interface. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}

\begin{DoxyItemize}
\item 0\+: Registration succeeded.
\item $<$ 0\+: Registration failed, possibly due to an invalid callback pointer. 
\end{DoxyItemize}
\end{DoxyReturn}
\mbox{\Hypertarget{classagora_1_1rtc_1_1_i_extension_video_encoder_a37cb9a2868b64d72b3608c4a990c615f}\label{classagora_1_1rtc_1_1_i_extension_video_encoder_a37cb9a2868b64d72b3608c4a990c615f}} 
\index{agora::rtc::IExtensionVideoEncoder@{agora::rtc::IExtensionVideoEncoder}!encode@{encode}}
\index{encode@{encode}!agora::rtc::IExtensionVideoEncoder@{agora::rtc::IExtensionVideoEncoder}}
\doxysubsubsection{\texorpdfstring{encode()}{encode()}}
{\footnotesize\ttfamily virtual int agora\+::rtc\+::\+I\+Extension\+Video\+Encoder\+::encode (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{classagora_1_1agora__refptr}{agora\+\_\+refptr}}$<$ \mbox{\hyperlink{classagora_1_1rtc_1_1_i_video_frame}{I\+Video\+Frame}} $>$}]{frame,  }\item[{V\+I\+D\+E\+O\+\_\+\+F\+R\+A\+M\+E\+\_\+\+T\+Y\+PE}]{frame\+\_\+type }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}

Encodes a video frame. 
\begin{DoxyParams}{Parameters}
{\em frame} & A reference to the video frame to be encoded. \\
\hline
{\em frame\+\_\+type} & The type of the video frame (e.\+g., keyframe, delta frame). \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}

\begin{DoxyItemize}
\item 0\+: Encoding succeeded.
\item $<$ 0\+: Encoding failed, possibly due to invalid frame data or internal errors. 
\end{DoxyItemize}
\end{DoxyReturn}
\mbox{\Hypertarget{classagora_1_1rtc_1_1_i_extension_video_encoder_a2769585118986eaa7fd417b3ead58a10}\label{classagora_1_1rtc_1_1_i_extension_video_encoder_a2769585118986eaa7fd417b3ead58a10}} 
\index{agora::rtc::IExtensionVideoEncoder@{agora::rtc::IExtensionVideoEncoder}!releaseVideoEncoder@{releaseVideoEncoder}}
\index{releaseVideoEncoder@{releaseVideoEncoder}!agora::rtc::IExtensionVideoEncoder@{agora::rtc::IExtensionVideoEncoder}}
\doxysubsubsection{\texorpdfstring{releaseVideoEncoder()}{releaseVideoEncoder()}}
{\footnotesize\ttfamily virtual int32\+\_\+t agora\+::rtc\+::\+I\+Extension\+Video\+Encoder\+::release\+Video\+Encoder (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}

Releases the resources used by the video encoder. \begin{DoxyReturn}{Returns}

\begin{DoxyItemize}
\item 0\+: Release succeeded.
\item $<$ 0\+: Release failed, possibly due to the encoder not being initialized or internal errors. 
\end{DoxyItemize}
\end{DoxyReturn}
\mbox{\Hypertarget{classagora_1_1rtc_1_1_i_extension_video_encoder_aaaac6ba00560f8e589c577c36e2cc015}\label{classagora_1_1rtc_1_1_i_extension_video_encoder_aaaac6ba00560f8e589c577c36e2cc015}} 
\index{agora::rtc::IExtensionVideoEncoder@{agora::rtc::IExtensionVideoEncoder}!setRates@{setRates}}
\index{setRates@{setRates}!agora::rtc::IExtensionVideoEncoder@{agora::rtc::IExtensionVideoEncoder}}
\doxysubsubsection{\texorpdfstring{setRates()}{setRates()}}
{\footnotesize\ttfamily virtual int32\+\_\+t agora\+::rtc\+::\+I\+Extension\+Video\+Encoder\+::set\+Rates (\begin{DoxyParamCaption}\item[{uint32\+\_\+t}]{bitrate\+\_\+kbps,  }\item[{uint32\+\_\+t}]{framerate }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}

Sets the rates for the encoder, specifying the target bitrate and framerate. 
\begin{DoxyParams}{Parameters}
{\em bitrate\+\_\+kbps} & The target bitrate in kilobits per second. \\
\hline
{\em framerate} & The target framerate in frames per second. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}

\begin{DoxyItemize}
\item 0\+: Rate allocation succeeded.
\item $<$ 0\+: Rate allocation failed, possibly due to invalid parameters or internal errors. 
\end{DoxyItemize}
\end{DoxyReturn}
\mbox{\Hypertarget{classagora_1_1rtc_1_1_i_extension_video_encoder_a6c1055e876f1bf2a435c3d28600c026a}\label{classagora_1_1rtc_1_1_i_extension_video_encoder_a6c1055e876f1bf2a435c3d28600c026a}} 
\index{agora::rtc::IExtensionVideoEncoder@{agora::rtc::IExtensionVideoEncoder}!querySupportCodecDataFormat@{querySupportCodecDataFormat}}
\index{querySupportCodecDataFormat@{querySupportCodecDataFormat}!agora::rtc::IExtensionVideoEncoder@{agora::rtc::IExtensionVideoEncoder}}
\doxysubsubsection{\texorpdfstring{querySupportCodecDataFormat()}{querySupportCodecDataFormat()}}
{\footnotesize\ttfamily virtual void agora\+::rtc\+::\+I\+Extension\+Video\+Encoder\+::query\+Support\+Codec\+Data\+Format (\begin{DoxyParamCaption}\item[{media\+::base\+::\+V\+I\+D\+E\+O\+\_\+\+P\+I\+X\+E\+L\+\_\+\+F\+O\+R\+M\+AT $\ast$}]{data\+\_\+format,  }\item[{int \&}]{size }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}

Queries the supported codec data formats. 
\begin{DoxyParams}{Parameters}
{\em data\+\_\+format} & A pointer to an array where supported pixel formats will be filled. \\
\hline
{\em size} & An input/output parameter; initially holds the size of the array, and will be updated with the actual number of formats filled. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classagora_1_1rtc_1_1_i_extension_video_encoder_aa9017201356ef280d9add3485369d62c}\label{classagora_1_1rtc_1_1_i_extension_video_encoder_aa9017201356ef280d9add3485369d62c}} 
\index{agora::rtc::IExtensionVideoEncoder@{agora::rtc::IExtensionVideoEncoder}!setAdvancedCodecProperty@{setAdvancedCodecProperty}}
\index{setAdvancedCodecProperty@{setAdvancedCodecProperty}!agora::rtc::IExtensionVideoEncoder@{agora::rtc::IExtensionVideoEncoder}}
\doxysubsubsection{\texorpdfstring{setAdvancedCodecProperty()}{setAdvancedCodecProperty()}}
{\footnotesize\ttfamily virtual int agora\+::rtc\+::\+I\+Extension\+Video\+Encoder\+::set\+Advanced\+Codec\+Property (\begin{DoxyParamCaption}\item[{const char $\ast$}]{key,  }\item[{const char $\ast$}]{json\+\_\+value }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}

Sets a advanced codec property in the {\ttfamily \mbox{\hyperlink{classagora_1_1rtc_1_1_i_extension_video_encoder}{I\+Extension\+Video\+Encoder}}} class.


\begin{DoxyParams}{Parameters}
{\em key} & The pointer to the property name. \\
\hline
{\em buf} & The pointer to the buffer of this private property. \\
\hline
{\em buf\+\_\+size} & The buffer size of this private property. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}

\begin{DoxyItemize}
\item The actual size of the private property, if the method call succeeds.
\item -\/1, if the method call fails. 
\end{DoxyItemize}
\end{DoxyReturn}
\mbox{\Hypertarget{classagora_1_1rtc_1_1_i_extension_video_encoder_a833736247b91a4da585ea9c8880d84bf}\label{classagora_1_1rtc_1_1_i_extension_video_encoder_a833736247b91a4da585ea9c8880d84bf}} 
\index{agora::rtc::IExtensionVideoEncoder@{agora::rtc::IExtensionVideoEncoder}!getAdvancedCodecProperty@{getAdvancedCodecProperty}}
\index{getAdvancedCodecProperty@{getAdvancedCodecProperty}!agora::rtc::IExtensionVideoEncoder@{agora::rtc::IExtensionVideoEncoder}}
\doxysubsubsection{\texorpdfstring{getAdvancedCodecProperty()}{getAdvancedCodecProperty()}}
{\footnotesize\ttfamily virtual int agora\+::rtc\+::\+I\+Extension\+Video\+Encoder\+::get\+Advanced\+Codec\+Property (\begin{DoxyParamCaption}\item[{const char $\ast$}]{key,  }\item[{char $\ast$}]{json\+\_\+value,  }\item[{int \&}]{length }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [pure virtual]}}

Gets a advanced codec property in the {\ttfamily \mbox{\hyperlink{classagora_1_1rtc_1_1_i_extension_video_encoder}{I\+Extension\+Video\+Encoder}}} class.


\begin{DoxyParams}{Parameters}
{\em name} & The pointer to the property name. \\
\hline
{\em buf} & The pointer to the buffer of this advanced codec property. \\
\hline
{\em buf\+\_\+size} & The buffer size of this advanced codec property. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}

\begin{DoxyItemize}
\item The actual size of the advanced codec property, if the method call succeeds.
\item -\/1, if the method call fails. 
\end{DoxyItemize}
\end{DoxyReturn}
