\hypertarget{classagora_1_1rtc_1_1_i_media_streaming_source}{}\doxysection{agora\+::rtc\+::I\+Media\+Streaming\+Source Class Reference}
\label{classagora_1_1rtc_1_1_i_media_streaming_source}\index{agora::rtc::IMediaStreamingSource@{agora::rtc::IMediaStreamingSource}}


The \mbox{\hyperlink{classagora_1_1rtc_1_1_i_media_streaming_source}{I\+Media\+Streaming\+Source}} class provides access to a media streaming source demuxer. To playout multiple stream sources simultaneously, create multiple media stream source objects.  




{\ttfamily \#include $<$I\+Agora\+Media\+Streaming\+Source.\+h$>$}

Inheritance diagram for agora\+::rtc\+::I\+Media\+Streaming\+Source\+:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{classagora_1_1rtc_1_1_i_media_streaming_source}
\end{center}
\end{figure}
\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
virtual int \mbox{\hyperlink{classagora_1_1rtc_1_1_i_media_streaming_source_a60c235e3633c8569c91c938e92f2d16b}{open}} (const char $\ast$url, int64\+\_\+t start\+\_\+pos, bool auto\+\_\+play=true)=0
\begin{DoxyCompactList}\small\item\em Opens a media streaming source with a specified U\+RL. \end{DoxyCompactList}\item 
virtual int \mbox{\hyperlink{classagora_1_1rtc_1_1_i_media_streaming_source_af3b9bea3888a4775caa675b9e8c760c3}{close}} ()=0
\begin{DoxyCompactList}\small\item\em Close current media streaming source. \end{DoxyCompactList}\item 
virtual int \mbox{\hyperlink{classagora_1_1rtc_1_1_i_media_streaming_source_ab142ac1a51c2bc27a213a183820b4d01}{get\+Source\+Id}} () const =0
\begin{DoxyCompactList}\small\item\em Gets the unique source ID of the streaming source. \end{DoxyCompactList}\item 
virtual bool \mbox{\hyperlink{classagora_1_1rtc_1_1_i_media_streaming_source_a7141bb034ea58d7cbf61f963bbd00761}{is\+Video\+Valid}} ()=0
\begin{DoxyCompactList}\small\item\em Retrieve whether video stream is valid. \end{DoxyCompactList}\item 
virtual bool \mbox{\hyperlink{classagora_1_1rtc_1_1_i_media_streaming_source_aca5447018890962c957ffdd227078fe1}{is\+Audio\+Valid}} ()=0
\begin{DoxyCompactList}\small\item\em Retrieve whether audio stream is valid. \end{DoxyCompactList}\item 
virtual int \mbox{\hyperlink{classagora_1_1rtc_1_1_i_media_streaming_source_a72bea9b75006f4909634af8a980d0b6c}{get\+Duration}} (int64\+\_\+t \&duration)=0
\begin{DoxyCompactList}\small\item\em Gets the duration of the streaming source. \end{DoxyCompactList}\item 
virtual int \mbox{\hyperlink{classagora_1_1rtc_1_1_i_media_streaming_source_aef2fa0c06ef0bce2e32c7c10d9f19984}{get\+Stream\+Count}} (int64\+\_\+t \&count)=0
\begin{DoxyCompactList}\small\item\em Gets the number of the streming source. \end{DoxyCompactList}\item 
virtual int \mbox{\hyperlink{classagora_1_1rtc_1_1_i_media_streaming_source_a012a3d32ed6ddad3aeadebb90f443a0b}{get\+Stream\+Info}} (int64\+\_\+t index, \mbox{\hyperlink{structagora_1_1media_1_1base_1_1_player_stream_info}{media\+::base\+::\+Player\+Stream\+Info}} $\ast$out\+\_\+info)=0
\begin{DoxyCompactList}\small\item\em Gets the detailed information of a media stream. \end{DoxyCompactList}\item 
virtual int \mbox{\hyperlink{classagora_1_1rtc_1_1_i_media_streaming_source_a434ff0838a44d0d328389f8d9f9969f7}{set\+Loop\+Count}} (int64\+\_\+t loop\+\_\+count)=0
\begin{DoxyCompactList}\small\item\em Sets whether to loop the streaming source for playback. \end{DoxyCompactList}\item 
virtual int \mbox{\hyperlink{classagora_1_1rtc_1_1_i_media_streaming_source_a13933e43a563717bb6e707fbc189c07f}{play}} ()=0
\begin{DoxyCompactList}\small\item\em Play \& push the streaming source. \end{DoxyCompactList}\item 
virtual int \mbox{\hyperlink{classagora_1_1rtc_1_1_i_media_streaming_source_ad0d2fb5c3a5366f8a969735bf28d29dc}{pause}} ()=0
\begin{DoxyCompactList}\small\item\em Pauses the playing \& pushing of the streaming source, Keep current position. \end{DoxyCompactList}\item 
virtual int \mbox{\hyperlink{classagora_1_1rtc_1_1_i_media_streaming_source_a6ebe4bd836c7041952607557370e5267}{stop}} ()=0
\begin{DoxyCompactList}\small\item\em Stop the playing \& pushing of the streaming source, set the position to 0. \end{DoxyCompactList}\item 
virtual int \mbox{\hyperlink{classagora_1_1rtc_1_1_i_media_streaming_source_ae7777c9960d8b859fb4eccec729661bc}{seek}} (int64\+\_\+t new\+\_\+pos)=0
\begin{DoxyCompactList}\small\item\em Sets the playback position of the streaming source. After seek done, it will return to previous status. \end{DoxyCompactList}\item 
virtual int \mbox{\hyperlink{classagora_1_1rtc_1_1_i_media_streaming_source_abb144ccf72e3801b84b754840db139de}{get\+Curr\+Position}} (int64\+\_\+t \&pos)=0
\begin{DoxyCompactList}\small\item\em Gets the current playback position of the media file. \end{DoxyCompactList}\item 
virtual S\+T\+R\+E\+A\+M\+I\+N\+G\+\_\+\+S\+R\+C\+\_\+\+S\+T\+A\+TE \mbox{\hyperlink{classagora_1_1rtc_1_1_i_media_streaming_source_a1b6219b9fab7ba4ce309b9384e89a199}{get\+Curr\+State}} ()=0
\item 
virtual int \mbox{\hyperlink{classagora_1_1rtc_1_1_i_media_streaming_source_aea60c0805cb493527bfa1a79a6abb70f}{append\+Sei\+Data}} (const \mbox{\hyperlink{structagora_1_1rtc_1_1_input_sei_data}{Input\+Sei\+Data}} \&in\+Sei\+Data)=0
\begin{DoxyCompactList}\small\item\em append the S\+EI data which can be sent attached to video packet \end{DoxyCompactList}\item 
virtual int \mbox{\hyperlink{classagora_1_1rtc_1_1_i_media_streaming_source_aeee34f2b20202e0b9308c2fa904a79c9}{register\+Observer}} (\mbox{\hyperlink{classagora_1_1rtc_1_1_i_media_streaming_source_observer}{I\+Media\+Streaming\+Source\+Observer}} $\ast$observer)=0
\item 
virtual int \mbox{\hyperlink{classagora_1_1rtc_1_1_i_media_streaming_source_a7e43f6c4b6af020fea2e323727c318df}{unregister\+Observer}} (\mbox{\hyperlink{classagora_1_1rtc_1_1_i_media_streaming_source_observer}{I\+Media\+Streaming\+Source\+Observer}} $\ast$observer)=0
\item 
virtual int \mbox{\hyperlink{classagora_1_1rtc_1_1_i_media_streaming_source_a872fa59cdb5fa771cd94de1366cd0a19}{parse\+Media\+Info}} (const char $\ast$url, \mbox{\hyperlink{structagora_1_1media_1_1base_1_1_player_stream_info}{media\+::base\+::\+Player\+Stream\+Info}} \&video\+\_\+info, \mbox{\hyperlink{structagora_1_1media_1_1base_1_1_player_stream_info}{media\+::base\+::\+Player\+Stream\+Info}} \&audio\+\_\+info)=0
\begin{DoxyCompactList}\small\item\em Parse a media information with a specified U\+RL. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
The \mbox{\hyperlink{classagora_1_1rtc_1_1_i_media_streaming_source}{I\+Media\+Streaming\+Source}} class provides access to a media streaming source demuxer. To playout multiple stream sources simultaneously, create multiple media stream source objects. 

\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{classagora_1_1rtc_1_1_i_media_streaming_source_a60c235e3633c8569c91c938e92f2d16b}\label{classagora_1_1rtc_1_1_i_media_streaming_source_a60c235e3633c8569c91c938e92f2d16b}} 
\index{agora::rtc::IMediaStreamingSource@{agora::rtc::IMediaStreamingSource}!open@{open}}
\index{open@{open}!agora::rtc::IMediaStreamingSource@{agora::rtc::IMediaStreamingSource}}
\doxysubsubsection{\texorpdfstring{open()}{open()}}
{\footnotesize\ttfamily virtual int agora\+::rtc\+::\+I\+Media\+Streaming\+Source\+::open (\begin{DoxyParamCaption}\item[{const char $\ast$}]{url,  }\item[{int64\+\_\+t}]{start\+\_\+pos,  }\item[{bool}]{auto\+\_\+play = {\ttfamily true} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Opens a media streaming source with a specified U\+RL. 


\begin{DoxyParams}{Parameters}
{\em url} & The path of the media file. Both the local path and online path are supported. \\
\hline
{\em start\+Pos} & The starting position (ms) for pushing. Default value is 0. \\
\hline
{\em auto\+\_\+play} & whether start playing after opened \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}

\begin{DoxyItemize}
\item 0\+: Success.
\item $<$ 0\+: Failure 
\end{DoxyItemize}
\end{DoxyReturn}
\mbox{\Hypertarget{classagora_1_1rtc_1_1_i_media_streaming_source_af3b9bea3888a4775caa675b9e8c760c3}\label{classagora_1_1rtc_1_1_i_media_streaming_source_af3b9bea3888a4775caa675b9e8c760c3}} 
\index{agora::rtc::IMediaStreamingSource@{agora::rtc::IMediaStreamingSource}!close@{close}}
\index{close@{close}!agora::rtc::IMediaStreamingSource@{agora::rtc::IMediaStreamingSource}}
\doxysubsubsection{\texorpdfstring{close()}{close()}}
{\footnotesize\ttfamily virtual int agora\+::rtc\+::\+I\+Media\+Streaming\+Source\+::close (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Close current media streaming source. 

\begin{DoxyReturn}{Returns}

\begin{DoxyItemize}
\item 0\+: Success.
\item $<$ 0\+: Failure 
\end{DoxyItemize}
\end{DoxyReturn}
\mbox{\Hypertarget{classagora_1_1rtc_1_1_i_media_streaming_source_ab142ac1a51c2bc27a213a183820b4d01}\label{classagora_1_1rtc_1_1_i_media_streaming_source_ab142ac1a51c2bc27a213a183820b4d01}} 
\index{agora::rtc::IMediaStreamingSource@{agora::rtc::IMediaStreamingSource}!getSourceId@{getSourceId}}
\index{getSourceId@{getSourceId}!agora::rtc::IMediaStreamingSource@{agora::rtc::IMediaStreamingSource}}
\doxysubsubsection{\texorpdfstring{getSourceId()}{getSourceId()}}
{\footnotesize\ttfamily virtual int agora\+::rtc\+::\+I\+Media\+Streaming\+Source\+::get\+Source\+Id (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [pure virtual]}}



Gets the unique source ID of the streaming source. 

\begin{DoxyReturn}{Returns}

\begin{DoxyItemize}
\item ≧ 0\+: The source ID of this media player source.
\item $<$ 0\+: Failure. 
\end{DoxyItemize}
\end{DoxyReturn}
\mbox{\Hypertarget{classagora_1_1rtc_1_1_i_media_streaming_source_a7141bb034ea58d7cbf61f963bbd00761}\label{classagora_1_1rtc_1_1_i_media_streaming_source_a7141bb034ea58d7cbf61f963bbd00761}} 
\index{agora::rtc::IMediaStreamingSource@{agora::rtc::IMediaStreamingSource}!isVideoValid@{isVideoValid}}
\index{isVideoValid@{isVideoValid}!agora::rtc::IMediaStreamingSource@{agora::rtc::IMediaStreamingSource}}
\doxysubsubsection{\texorpdfstring{isVideoValid()}{isVideoValid()}}
{\footnotesize\ttfamily virtual bool agora\+::rtc\+::\+I\+Media\+Streaming\+Source\+::is\+Video\+Valid (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Retrieve whether video stream is valid. 

\begin{DoxyReturn}{Returns}
\+: valid or invalid 
\end{DoxyReturn}
\mbox{\Hypertarget{classagora_1_1rtc_1_1_i_media_streaming_source_aca5447018890962c957ffdd227078fe1}\label{classagora_1_1rtc_1_1_i_media_streaming_source_aca5447018890962c957ffdd227078fe1}} 
\index{agora::rtc::IMediaStreamingSource@{agora::rtc::IMediaStreamingSource}!isAudioValid@{isAudioValid}}
\index{isAudioValid@{isAudioValid}!agora::rtc::IMediaStreamingSource@{agora::rtc::IMediaStreamingSource}}
\doxysubsubsection{\texorpdfstring{isAudioValid()}{isAudioValid()}}
{\footnotesize\ttfamily virtual bool agora\+::rtc\+::\+I\+Media\+Streaming\+Source\+::is\+Audio\+Valid (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Retrieve whether audio stream is valid. 

\begin{DoxyReturn}{Returns}
\+: valid or invalid 
\end{DoxyReturn}
\mbox{\Hypertarget{classagora_1_1rtc_1_1_i_media_streaming_source_a72bea9b75006f4909634af8a980d0b6c}\label{classagora_1_1rtc_1_1_i_media_streaming_source_a72bea9b75006f4909634af8a980d0b6c}} 
\index{agora::rtc::IMediaStreamingSource@{agora::rtc::IMediaStreamingSource}!getDuration@{getDuration}}
\index{getDuration@{getDuration}!agora::rtc::IMediaStreamingSource@{agora::rtc::IMediaStreamingSource}}
\doxysubsubsection{\texorpdfstring{getDuration()}{getDuration()}}
{\footnotesize\ttfamily virtual int agora\+::rtc\+::\+I\+Media\+Streaming\+Source\+::get\+Duration (\begin{DoxyParamCaption}\item[{int64\+\_\+t \&}]{duration }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Gets the duration of the streaming source. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ out}}  & {\em duration} & A reference to the duration of the media file. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}

\begin{DoxyItemize}
\item 0\+: Success.
\item $<$ 0\+: Failure. See \mbox{\hyperlink{}{S\+T\+R\+E\+A\+M\+I\+N\+G\+S\+R\+C\+\_\+\+E\+RR}}. 
\end{DoxyItemize}
\end{DoxyReturn}
\mbox{\Hypertarget{classagora_1_1rtc_1_1_i_media_streaming_source_aef2fa0c06ef0bce2e32c7c10d9f19984}\label{classagora_1_1rtc_1_1_i_media_streaming_source_aef2fa0c06ef0bce2e32c7c10d9f19984}} 
\index{agora::rtc::IMediaStreamingSource@{agora::rtc::IMediaStreamingSource}!getStreamCount@{getStreamCount}}
\index{getStreamCount@{getStreamCount}!agora::rtc::IMediaStreamingSource@{agora::rtc::IMediaStreamingSource}}
\doxysubsubsection{\texorpdfstring{getStreamCount()}{getStreamCount()}}
{\footnotesize\ttfamily virtual int agora\+::rtc\+::\+I\+Media\+Streaming\+Source\+::get\+Stream\+Count (\begin{DoxyParamCaption}\item[{int64\+\_\+t \&}]{count }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Gets the number of the streming source. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ out}}  & {\em count} & The number of the media streams in the media source. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}

\begin{DoxyItemize}
\item 0\+: Success.
\item $<$ 0\+: Failure. See \mbox{\hyperlink{}{S\+T\+R\+E\+A\+M\+I\+N\+G\+S\+R\+C\+\_\+\+E\+RR}}. 
\end{DoxyItemize}
\end{DoxyReturn}
\mbox{\Hypertarget{classagora_1_1rtc_1_1_i_media_streaming_source_a012a3d32ed6ddad3aeadebb90f443a0b}\label{classagora_1_1rtc_1_1_i_media_streaming_source_a012a3d32ed6ddad3aeadebb90f443a0b}} 
\index{agora::rtc::IMediaStreamingSource@{agora::rtc::IMediaStreamingSource}!getStreamInfo@{getStreamInfo}}
\index{getStreamInfo@{getStreamInfo}!agora::rtc::IMediaStreamingSource@{agora::rtc::IMediaStreamingSource}}
\doxysubsubsection{\texorpdfstring{getStreamInfo()}{getStreamInfo()}}
{\footnotesize\ttfamily virtual int agora\+::rtc\+::\+I\+Media\+Streaming\+Source\+::get\+Stream\+Info (\begin{DoxyParamCaption}\item[{int64\+\_\+t}]{index,  }\item[{\mbox{\hyperlink{structagora_1_1media_1_1base_1_1_player_stream_info}{media\+::base\+::\+Player\+Stream\+Info}} $\ast$}]{out\+\_\+info }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Gets the detailed information of a media stream. 


\begin{DoxyParams}[1]{Parameters}
 & {\em index} & The index of the media stream. \\
\hline
\mbox{\texttt{ out}}  & {\em out\+\_\+info} & The detailed information of the media stream. See \mbox{\hyperlink{structagora_1_1media_1_1base_1_1_player_stream_info}{Player\+Stream\+Info}} for details. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}

\begin{DoxyItemize}
\item 0\+: Success.
\item $<$ 0\+: Failure. See \mbox{\hyperlink{}{S\+T\+R\+E\+A\+M\+I\+N\+G\+S\+R\+C\+\_\+\+E\+RR}}. 
\end{DoxyItemize}
\end{DoxyReturn}
\mbox{\Hypertarget{classagora_1_1rtc_1_1_i_media_streaming_source_a434ff0838a44d0d328389f8d9f9969f7}\label{classagora_1_1rtc_1_1_i_media_streaming_source_a434ff0838a44d0d328389f8d9f9969f7}} 
\index{agora::rtc::IMediaStreamingSource@{agora::rtc::IMediaStreamingSource}!setLoopCount@{setLoopCount}}
\index{setLoopCount@{setLoopCount}!agora::rtc::IMediaStreamingSource@{agora::rtc::IMediaStreamingSource}}
\doxysubsubsection{\texorpdfstring{setLoopCount()}{setLoopCount()}}
{\footnotesize\ttfamily virtual int agora\+::rtc\+::\+I\+Media\+Streaming\+Source\+::set\+Loop\+Count (\begin{DoxyParamCaption}\item[{int64\+\_\+t}]{loop\+\_\+count }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Sets whether to loop the streaming source for playback. 


\begin{DoxyParams}{Parameters}
{\em loop\+\_\+count} & The number of times of looping the media file.
\begin{DoxyItemize}
\item 1\+: Play the media file once.
\item 2\+: Play the media file twice.
\item $<$= 0\+: Play the media file in a loop indefinitely, until \mbox{\hyperlink{classagora_1_1rtc_1_1_i_media_streaming_source_a6ebe4bd836c7041952607557370e5267}{stop}} is called. 
\end{DoxyItemize}\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}

\begin{DoxyItemize}
\item 0\+: Success.
\item $<$ 0\+: Failure. See \mbox{\hyperlink{}{S\+T\+R\+E\+A\+M\+I\+N\+G\+S\+R\+C\+\_\+\+E\+RR}}. 
\end{DoxyItemize}
\end{DoxyReturn}
\mbox{\Hypertarget{classagora_1_1rtc_1_1_i_media_streaming_source_a13933e43a563717bb6e707fbc189c07f}\label{classagora_1_1rtc_1_1_i_media_streaming_source_a13933e43a563717bb6e707fbc189c07f}} 
\index{agora::rtc::IMediaStreamingSource@{agora::rtc::IMediaStreamingSource}!play@{play}}
\index{play@{play}!agora::rtc::IMediaStreamingSource@{agora::rtc::IMediaStreamingSource}}
\doxysubsubsection{\texorpdfstring{play()}{play()}}
{\footnotesize\ttfamily virtual int agora\+::rtc\+::\+I\+Media\+Streaming\+Source\+::play (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Play \& push the streaming source. 

\begin{DoxyReturn}{Returns}

\begin{DoxyItemize}
\item 0\+: Success.
\item $<$ 0\+: Failure. See \mbox{\hyperlink{}{S\+T\+R\+E\+A\+M\+I\+N\+G\+S\+R\+C\+\_\+\+E\+RR}}. 
\end{DoxyItemize}
\end{DoxyReturn}
\mbox{\Hypertarget{classagora_1_1rtc_1_1_i_media_streaming_source_ad0d2fb5c3a5366f8a969735bf28d29dc}\label{classagora_1_1rtc_1_1_i_media_streaming_source_ad0d2fb5c3a5366f8a969735bf28d29dc}} 
\index{agora::rtc::IMediaStreamingSource@{agora::rtc::IMediaStreamingSource}!pause@{pause}}
\index{pause@{pause}!agora::rtc::IMediaStreamingSource@{agora::rtc::IMediaStreamingSource}}
\doxysubsubsection{\texorpdfstring{pause()}{pause()}}
{\footnotesize\ttfamily virtual int agora\+::rtc\+::\+I\+Media\+Streaming\+Source\+::pause (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Pauses the playing \& pushing of the streaming source, Keep current position. 

\begin{DoxyReturn}{Returns}

\begin{DoxyItemize}
\item 0\+: Success.
\item $<$ 0\+: Failure. See \mbox{\hyperlink{}{S\+T\+R\+E\+A\+M\+I\+N\+G\+S\+R\+C\+\_\+\+E\+RR}}. 
\end{DoxyItemize}
\end{DoxyReturn}
\mbox{\Hypertarget{classagora_1_1rtc_1_1_i_media_streaming_source_a6ebe4bd836c7041952607557370e5267}\label{classagora_1_1rtc_1_1_i_media_streaming_source_a6ebe4bd836c7041952607557370e5267}} 
\index{agora::rtc::IMediaStreamingSource@{agora::rtc::IMediaStreamingSource}!stop@{stop}}
\index{stop@{stop}!agora::rtc::IMediaStreamingSource@{agora::rtc::IMediaStreamingSource}}
\doxysubsubsection{\texorpdfstring{stop()}{stop()}}
{\footnotesize\ttfamily virtual int agora\+::rtc\+::\+I\+Media\+Streaming\+Source\+::stop (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Stop the playing \& pushing of the streaming source, set the position to 0. 

\begin{DoxyReturn}{Returns}

\begin{DoxyItemize}
\item 0\+: Success.
\item $<$ 0\+: Failure.\+See \mbox{\hyperlink{}{S\+T\+R\+E\+A\+M\+I\+N\+G\+S\+R\+C\+\_\+\+E\+RR}}. 
\end{DoxyItemize}
\end{DoxyReturn}
\mbox{\Hypertarget{classagora_1_1rtc_1_1_i_media_streaming_source_ae7777c9960d8b859fb4eccec729661bc}\label{classagora_1_1rtc_1_1_i_media_streaming_source_ae7777c9960d8b859fb4eccec729661bc}} 
\index{agora::rtc::IMediaStreamingSource@{agora::rtc::IMediaStreamingSource}!seek@{seek}}
\index{seek@{seek}!agora::rtc::IMediaStreamingSource@{agora::rtc::IMediaStreamingSource}}
\doxysubsubsection{\texorpdfstring{seek()}{seek()}}
{\footnotesize\ttfamily virtual int agora\+::rtc\+::\+I\+Media\+Streaming\+Source\+::seek (\begin{DoxyParamCaption}\item[{int64\+\_\+t}]{new\+\_\+pos }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Sets the playback position of the streaming source. After seek done, it will return to previous status. 


\begin{DoxyParams}{Parameters}
{\em new\+Pos} & The new playback position (ms). \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}

\begin{DoxyItemize}
\item 0\+: Success.
\item $<$ 0\+: Failure. See \mbox{\hyperlink{}{S\+T\+R\+E\+A\+M\+I\+N\+G\+S\+R\+C\+\_\+\+E\+RR}}. 
\end{DoxyItemize}
\end{DoxyReturn}
\mbox{\Hypertarget{classagora_1_1rtc_1_1_i_media_streaming_source_abb144ccf72e3801b84b754840db139de}\label{classagora_1_1rtc_1_1_i_media_streaming_source_abb144ccf72e3801b84b754840db139de}} 
\index{agora::rtc::IMediaStreamingSource@{agora::rtc::IMediaStreamingSource}!getCurrPosition@{getCurrPosition}}
\index{getCurrPosition@{getCurrPosition}!agora::rtc::IMediaStreamingSource@{agora::rtc::IMediaStreamingSource}}
\doxysubsubsection{\texorpdfstring{getCurrPosition()}{getCurrPosition()}}
{\footnotesize\ttfamily virtual int agora\+::rtc\+::\+I\+Media\+Streaming\+Source\+::get\+Curr\+Position (\begin{DoxyParamCaption}\item[{int64\+\_\+t \&}]{pos }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Gets the current playback position of the media file. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ out}}  & {\em pos} & A reference to the current playback position (ms). \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}

\begin{DoxyItemize}
\item 0\+: Success.
\item $<$ 0\+: Failure. See \mbox{\hyperlink{}{S\+T\+R\+E\+A\+M\+I\+N\+G\+S\+R\+C\+\_\+\+E\+RR}}. 
\end{DoxyItemize}
\end{DoxyReturn}
\mbox{\Hypertarget{classagora_1_1rtc_1_1_i_media_streaming_source_a1b6219b9fab7ba4ce309b9384e89a199}\label{classagora_1_1rtc_1_1_i_media_streaming_source_a1b6219b9fab7ba4ce309b9384e89a199}} 
\index{agora::rtc::IMediaStreamingSource@{agora::rtc::IMediaStreamingSource}!getCurrState@{getCurrState}}
\index{getCurrState@{getCurrState}!agora::rtc::IMediaStreamingSource@{agora::rtc::IMediaStreamingSource}}
\doxysubsubsection{\texorpdfstring{getCurrState()}{getCurrState()}}
{\footnotesize\ttfamily virtual S\+T\+R\+E\+A\+M\+I\+N\+G\+\_\+\+S\+R\+C\+\_\+\+S\+T\+A\+TE agora\+::rtc\+::\+I\+Media\+Streaming\+Source\+::get\+Curr\+State (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}

@breif Gets the status of current streaming source. \begin{DoxyReturn}{Returns}
The current state machine 
\end{DoxyReturn}
\mbox{\Hypertarget{classagora_1_1rtc_1_1_i_media_streaming_source_aea60c0805cb493527bfa1a79a6abb70f}\label{classagora_1_1rtc_1_1_i_media_streaming_source_aea60c0805cb493527bfa1a79a6abb70f}} 
\index{agora::rtc::IMediaStreamingSource@{agora::rtc::IMediaStreamingSource}!appendSeiData@{appendSeiData}}
\index{appendSeiData@{appendSeiData}!agora::rtc::IMediaStreamingSource@{agora::rtc::IMediaStreamingSource}}
\doxysubsubsection{\texorpdfstring{appendSeiData()}{appendSeiData()}}
{\footnotesize\ttfamily virtual int agora\+::rtc\+::\+I\+Media\+Streaming\+Source\+::append\+Sei\+Data (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{structagora_1_1rtc_1_1_input_sei_data}{Input\+Sei\+Data}} \&}]{in\+Sei\+Data }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



append the S\+EI data which can be sent attached to video packet 


\begin{DoxyParams}{Parameters}
{\em type} & S\+EI type \\
\hline
{\em timestamp} & the video frame timestamp which attached to \\
\hline
{\em frame\+\_\+index} & the video frame timestamp which attached to\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}

\begin{DoxyItemize}
\item 0\+: Success.
\item $<$ 0\+: Failure. See \mbox{\hyperlink{}{S\+T\+R\+E\+A\+M\+I\+N\+G\+S\+R\+C\+\_\+\+E\+RR}}. 
\end{DoxyItemize}
\end{DoxyReturn}
\mbox{\Hypertarget{classagora_1_1rtc_1_1_i_media_streaming_source_aeee34f2b20202e0b9308c2fa904a79c9}\label{classagora_1_1rtc_1_1_i_media_streaming_source_aeee34f2b20202e0b9308c2fa904a79c9}} 
\index{agora::rtc::IMediaStreamingSource@{agora::rtc::IMediaStreamingSource}!registerObserver@{registerObserver}}
\index{registerObserver@{registerObserver}!agora::rtc::IMediaStreamingSource@{agora::rtc::IMediaStreamingSource}}
\doxysubsubsection{\texorpdfstring{registerObserver()}{registerObserver()}}
{\footnotesize\ttfamily virtual int agora\+::rtc\+::\+I\+Media\+Streaming\+Source\+::register\+Observer (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{classagora_1_1rtc_1_1_i_media_streaming_source_observer}{I\+Media\+Streaming\+Source\+Observer}} $\ast$}]{observer }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}

Registers a media player source observer.

Once the media player source observer is registered, you can use the observer to monitor the state change of the media player. 
\begin{DoxyParams}{Parameters}
{\em observer} & The pointer to the \mbox{\hyperlink{classagora_1_1rtc_1_1_i_media_streaming_source}{I\+Media\+Streaming\+Source}} object. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}

\begin{DoxyItemize}
\item 0\+: Success.
\item $<$ 0\+: Failure. See \mbox{\hyperlink{}{S\+T\+R\+E\+A\+M\+I\+N\+G\+S\+R\+C\+\_\+\+E\+RR}}. 
\end{DoxyItemize}
\end{DoxyReturn}
\mbox{\Hypertarget{classagora_1_1rtc_1_1_i_media_streaming_source_a7e43f6c4b6af020fea2e323727c318df}\label{classagora_1_1rtc_1_1_i_media_streaming_source_a7e43f6c4b6af020fea2e323727c318df}} 
\index{agora::rtc::IMediaStreamingSource@{agora::rtc::IMediaStreamingSource}!unregisterObserver@{unregisterObserver}}
\index{unregisterObserver@{unregisterObserver}!agora::rtc::IMediaStreamingSource@{agora::rtc::IMediaStreamingSource}}
\doxysubsubsection{\texorpdfstring{unregisterObserver()}{unregisterObserver()}}
{\footnotesize\ttfamily virtual int agora\+::rtc\+::\+I\+Media\+Streaming\+Source\+::unregister\+Observer (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{classagora_1_1rtc_1_1_i_media_streaming_source_observer}{I\+Media\+Streaming\+Source\+Observer}} $\ast$}]{observer }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}

Releases the media player source observer. 
\begin{DoxyParams}{Parameters}
{\em observer} & The pointer to the \mbox{\hyperlink{classagora_1_1rtc_1_1_i_media_streaming_source}{I\+Media\+Streaming\+Source}} object. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}

\begin{DoxyItemize}
\item 0\+: Success.
\item $<$ 0\+: Failure. See \mbox{\hyperlink{}{S\+T\+R\+E\+A\+M\+I\+N\+G\+S\+R\+C\+\_\+\+E\+RR}}. 
\end{DoxyItemize}
\end{DoxyReturn}
\mbox{\Hypertarget{classagora_1_1rtc_1_1_i_media_streaming_source_a872fa59cdb5fa771cd94de1366cd0a19}\label{classagora_1_1rtc_1_1_i_media_streaming_source_a872fa59cdb5fa771cd94de1366cd0a19}} 
\index{agora::rtc::IMediaStreamingSource@{agora::rtc::IMediaStreamingSource}!parseMediaInfo@{parseMediaInfo}}
\index{parseMediaInfo@{parseMediaInfo}!agora::rtc::IMediaStreamingSource@{agora::rtc::IMediaStreamingSource}}
\doxysubsubsection{\texorpdfstring{parseMediaInfo()}{parseMediaInfo()}}
{\footnotesize\ttfamily virtual int agora\+::rtc\+::\+I\+Media\+Streaming\+Source\+::parse\+Media\+Info (\begin{DoxyParamCaption}\item[{const char $\ast$}]{url,  }\item[{\mbox{\hyperlink{structagora_1_1media_1_1base_1_1_player_stream_info}{media\+::base\+::\+Player\+Stream\+Info}} \&}]{video\+\_\+info,  }\item[{\mbox{\hyperlink{structagora_1_1media_1_1base_1_1_player_stream_info}{media\+::base\+::\+Player\+Stream\+Info}} \&}]{audio\+\_\+info }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Parse a media information with a specified U\+RL. 


\begin{DoxyParams}{Parameters}
{\em url} & \+: The path of the media file. Both the local path and online path are supported. \\
\hline
{\em video\+\_\+info} & \+: The output video information, It means no video track while video\+\_\+info.\+stream\+Index less than 0 \\
\hline
{\em audio\+\_\+info} & \+: The output audio information, It means no audio track while audio\+\_\+info.\+stream\+Index less than 0 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}

\begin{DoxyItemize}
\item 0\+: Success.
\item $<$ 0\+: Failure 
\end{DoxyItemize}
\end{DoxyReturn}
