\hypertarget{classagora_1_1media_1_1base_1_1_i_video_frame_observer}{}\doxysection{agora\+::media\+::base\+::I\+Video\+Frame\+Observer Class Reference}
\label{classagora_1_1media_1_1base_1_1_i_video_frame_observer}\index{agora::media::base::IVideoFrameObserver@{agora::media::base::IVideoFrameObserver}}


{\ttfamily \#include $<$Agora\+Media\+Base.\+h$>$}

\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
virtual void \mbox{\hyperlink{classagora_1_1media_1_1base_1_1_i_video_frame_observer_ae5b1f12a527fdefe10ac1d2620bc3aee}{on\+Frame}} (const \mbox{\hyperlink{structagora_1_1media_1_1base_1_1_video_frame}{Video\+Frame}} $\ast$frame)=0
\begin{DoxyCompactList}\small\item\em Occurs each time the player receives a video frame. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{classagora_1_1media_1_1base_1_1_i_video_frame_observer_a4af3fc101f6ca0d8923d7f3c59d57c5e}\label{classagora_1_1media_1_1base_1_1_i_video_frame_observer_a4af3fc101f6ca0d8923d7f3c59d57c5e}} 
virtual bool {\bfseries is\+External} ()
\item 
virtual V\+I\+D\+E\+O\+\_\+\+P\+I\+X\+E\+L\+\_\+\+F\+O\+R\+M\+AT \mbox{\hyperlink{classagora_1_1media_1_1base_1_1_i_video_frame_observer_a8139a2c909c94d40b2d8aa69277ce80a}{get\+Video\+Format\+Preference}} ()
\begin{DoxyCompactList}\small\item\em Sets the format of the raw video data output by the S\+DK. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
The \mbox{\hyperlink{classagora_1_1media_1_1base_1_1_i_video_frame_observer}{I\+Video\+Frame\+Observer}} class. 

\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{classagora_1_1media_1_1base_1_1_i_video_frame_observer_ae5b1f12a527fdefe10ac1d2620bc3aee}\label{classagora_1_1media_1_1base_1_1_i_video_frame_observer_ae5b1f12a527fdefe10ac1d2620bc3aee}} 
\index{agora::media::base::IVideoFrameObserver@{agora::media::base::IVideoFrameObserver}!onFrame@{onFrame}}
\index{onFrame@{onFrame}!agora::media::base::IVideoFrameObserver@{agora::media::base::IVideoFrameObserver}}
\doxysubsubsection{\texorpdfstring{onFrame()}{onFrame()}}
{\footnotesize\ttfamily virtual void agora\+::media\+::base\+::\+I\+Video\+Frame\+Observer\+::on\+Frame (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{structagora_1_1media_1_1base_1_1_video_frame}{Video\+Frame}} $\ast$}]{frame }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Occurs each time the player receives a video frame. 

After registering the video frame observer, the callback occurs every time the player receives a video frame, reporting the detailed information of the video frame.


\begin{DoxyParams}{Parameters}
{\em frame} & The video frame information. See \mbox{\hyperlink{structagora_1_1media_1_1base_1_1_video_frame}{Video\+Frame}}. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classagora_1_1media_1_1base_1_1_i_video_frame_observer_a8139a2c909c94d40b2d8aa69277ce80a}\label{classagora_1_1media_1_1base_1_1_i_video_frame_observer_a8139a2c909c94d40b2d8aa69277ce80a}} 
\index{agora::media::base::IVideoFrameObserver@{agora::media::base::IVideoFrameObserver}!getVideoFormatPreference@{getVideoFormatPreference}}
\index{getVideoFormatPreference@{getVideoFormatPreference}!agora::media::base::IVideoFrameObserver@{agora::media::base::IVideoFrameObserver}}
\doxysubsubsection{\texorpdfstring{getVideoFormatPreference()}{getVideoFormatPreference()}}
{\footnotesize\ttfamily virtual V\+I\+D\+E\+O\+\_\+\+P\+I\+X\+E\+L\+\_\+\+F\+O\+R\+M\+AT agora\+::media\+::base\+::\+I\+Video\+Frame\+Observer\+::get\+Video\+Format\+Preference (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}



Sets the format of the raw video data output by the S\+DK. 

You need to register the callback when calling the {\ttfamily register\+Video\+Frame\+Observer} method. After you successfully register the video frame observer, the S\+DK triggers this callback each time it receives a video frame. You need to set your preferred video data in the return value of this callback.

\begin{DoxyNote}{Note}
The default types of pixel format ( V\+I\+D\+E\+O\+\_\+\+P\+I\+X\+E\+L\+\_\+\+D\+E\+F\+A\+U\+LT ) for the raw video are as follows\+:
\begin{DoxyItemize}
\item On the Android platform, the default video frame type may be I420\+Buffer or Texture\+Buffer. The texture format of Texture\+Buffer type may be O\+ES or R\+GB. If the returned video frame type is V\+I\+D\+E\+O\+\_\+\+P\+I\+X\+E\+L\+\_\+\+D\+E\+F\+A\+U\+LT when you call {\ttfamily get\+Video\+Format\+Preference}, you need to adapt to I420\+Buffer or Texture\+Buffer when processing video data. The cases where the video frame type is fixed as I420\+Buffer include but are not limited to\+:
\begin{DoxyItemize}
\item Specific devices, such as\+: LG G5 SE (H848), Google Pixel 4a, Samsung Galaxy A7, or Xiaomi Mi Max.
\item Image enhancement extension has been integrated and video noise reduction or low-\/light enhancement function has been enabled.
\end{DoxyItemize}
\item On i\+OS and mac\+OS platforms, the default video frame type may be I420 or C\+V\+Pixel\+Buffer\+Ref.
\item On Windows platforms, the default video frame type is Y\+U\+V420.
\end{DoxyItemize}
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
Sets the raw data format of the S\+DK output. See {\ttfamily V\+I\+D\+E\+O\+\_\+\+P\+I\+X\+E\+L\+\_\+\+F\+O\+R\+M\+AT}. 
\end{DoxyReturn}
