\doxysection{com.\+tritondigital.\+net.\+streaming.\+proxy.\+dataprovider.\+rtp.\+Rtp\+Packet\+Provider Class Reference}
\hypertarget{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1rtp_1_1RtpPacketProvider}{}\label{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1rtp_1_1RtpPacketProvider}\index{com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacketProvider@{com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacketProvider}}
Inheritance diagram for com.\+tritondigital.\+net.\+streaming.\+proxy.\+dataprovider.\+rtp.\+Rtp\+Packet\+Provider\+:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=4.000000cm]{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1rtp_1_1RtpPacketProvider}
\end{center}
\end{figure}
\doxysubsubsection*{Classes}
\begin{DoxyCompactItemize}
\item 
interface \mbox{\hyperlink{interfacecom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1rtp_1_1RtpPacketProvider_1_1StateChangedListener}{State\+Changed\+Listener}}
\begin{DoxyCompactList}\small\item\em Interface to be implemented in order to be notified about the important changes of state of the server. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
void \mbox{\hyperlink{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1rtp_1_1RtpPacketProvider_a05e9a6ab9833c2767611e7738686bc05}{on\+Audio\+Config\+Decoded}} (Audio\+Config audio\+Config)
\begin{DoxyCompactList}\small\item\em Save the Audio\+Config and notify / unblock the listeners and threads waiting for it to become ready. \end{DoxyCompactList}\item 
\Hypertarget{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1rtp_1_1RtpPacketProvider_a471d26f63239aeeb679ceabddfca93a6}\label{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1rtp_1_1RtpPacketProvider_a471d26f63239aeeb679ceabddfca93a6} 
void {\bfseries on\+Audio\+Data\+Decoded} (byte\mbox{[}$\,$\mbox{]} audio\+Data, int audio\+Data\+Length, int timestamp)
\item 
String \mbox{\hyperlink{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1rtp_1_1RtpPacketProvider_affdba17fe90ee47af750db6a82373364}{get\+Sdp\+Config}} (String abs\+Control\+Url)
\begin{DoxyCompactList}\small\item\em Returns the SDP string to be sent by the RTSP server in response to a Describe request. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1rtp_1_1RtpPacketProvider_ada9e74c7980a52681168a8f41976acc5}{stop}} ()
\begin{DoxyCompactList}\small\item\em In addition to the default stop, Resets the Sdp Config state to make sure to block the next time that this provider is used, until the Sdp\+Config is ready again. \end{DoxyCompactList}\item 
\Hypertarget{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1rtp_1_1RtpPacketProvider_a2f2d29c245f5db615294a627682d3f6c}\label{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1rtp_1_1RtpPacketProvider_a2f2d29c245f5db615294a627682d3f6c} 
void {\bfseries stop\+Blocking\+Until\+Audio\+Config\+Ready} ()
\begin{DoxyCompactList}\small\item\em Unblock the thread waiting on a call to block\+Until\+Ready. \end{DoxyCompactList}\item 
boolean \mbox{\hyperlink{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1rtp_1_1RtpPacketProvider_a093c1586e60da0d3075a717132fc2239}{is\+Sdp\+Config\+Ready}} ()
\begin{DoxyCompactList}\small\item\em Tells if the SDP strings can be retrieved without blocking. \end{DoxyCompactList}\item 
short \mbox{\hyperlink{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1rtp_1_1RtpPacketProvider_a43408c531572e2a4616851581561ab25}{get\+First\+Packet\+Sequence\+Number}} ()
\begin{DoxyCompactList}\small\item\em Gets the sequence number that the first packet in the queue has (or will have when it is inserted). \end{DoxyCompactList}\item 
int \mbox{\hyperlink{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1rtp_1_1RtpPacketProvider_a5087676744ce817b6cab1ffc165a85cd}{get\+First\+Packet\+Timestamp}} ()
\begin{DoxyCompactList}\small\item\em Gets the timestamp that the first packet in the queue has (or will have when it is inserted). \end{DoxyCompactList}\item 
\Hypertarget{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1rtp_1_1RtpPacketProvider_af8f0aefcd836b81d2d48a031f1db82ab}\label{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1rtp_1_1RtpPacketProvider_af8f0aefcd836b81d2d48a031f1db82ab} 
void {\bfseries set\+State\+Changed\+Listener} (\mbox{\hyperlink{interfacecom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1rtp_1_1RtpPacketProvider_1_1StateChangedListener}{State\+Changed\+Listener}} state\+Changed\+Listener)
\begin{DoxyCompactList}\small\item\em Sets the listener to be notified by any state change on this provider. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Public Member Functions inherited from \mbox{\hyperlink{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1DataProvider}{com.\+tritondigital.\+net.\+streaming.\+proxy.\+dataprovider.\+Data\+Provider}}}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{interfacecom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1Packet}{Packet}} \mbox{\hyperlink{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1DataProvider_a5502fc0145f47788790d36ee91bc771a}{get\+Packet}} ()
\begin{DoxyCompactList}\small\item\em Returns the next Packet in the stream. \end{DoxyCompactList}\item 
void {\bfseries add\+Free\+Packet\+To\+Pool} (\mbox{\hyperlink{interfacecom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1Packet}{Packet}} packet)
\begin{DoxyCompactList}\small\item\em Puts the given packet back in the free pool packets. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1DataProvider_aa22416b278bb1f2409a06cba131847fd}{clear\+Internal\+Buffer}} ()
\begin{DoxyCompactList}\small\item\em If the provider keeps a buffer of already available packets, clear it immediately. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Public Attributes}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1rtp_1_1RtpPacketProvider_a6e3e5e36996fbbfa585e079d6c7ac53a}\label{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1rtp_1_1RtpPacketProvider_a6e3e5e36996fbbfa585e079d6c7ac53a} 
final String {\bfseries TAG} = "{}Rtp\+Packet\+Provider"{}
\end{DoxyCompactItemize}
\doxysubsubsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{interfacecom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1Packet}{Packet}} \mbox{\hyperlink{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1rtp_1_1RtpPacketProvider_abcf78db7251232d5b1a143aa82b04b99}{create\+Empty\+Packet}} ()
\item 
\Hypertarget{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1rtp_1_1RtpPacketProvider_a9e2776ccd42d8666cadebde112771f82}\label{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1rtp_1_1RtpPacketProvider_a9e2776ccd42d8666cadebde112771f82} 
abstract int {\bfseries get\+Payload\+Size} (int audio\+Data\+Length)
\begin{DoxyCompactList}\small\item\em Gets the minimal size that the bytes array containing the payload should have. \end{DoxyCompactList}\item 
abstract void \mbox{\hyperlink{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1rtp_1_1RtpPacketProvider_a3ab0a2cd020cbd96b1604f787975f553}{create\+Payload}} (byte\mbox{[}$\,$\mbox{]} audio\+Data, int audio\+Data\+Length, byte\mbox{[}$\,$\mbox{]} out\+Payload, int out\+Payload\+Offset)
\item 
abstract String \mbox{\hyperlink{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1rtp_1_1RtpPacketProvider_a4774c6013e6f461a0392ac194507f0d7}{get\+Profile\+Specific\+Sdp\+Config}} ()
\begin{DoxyCompactList}\small\item\em Returns the SDP string lines that are related to the profile itself. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1rtp_1_1RtpPacketProvider_af52ab8ee1fb46ae1fe54679d66289b00}{get\+Rtp\+Timestamp}} (int timestamp\+MS)
\begin{DoxyCompactList}\small\item\em Compute the RTP timestamp, which is the number of samples since the beginning of the stream. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1rtp_1_1RtpPacketProvider_a14fbc3db1fddb6965b7c2e4ffe33625f}{notify\+Listener\+Sdp\+Config\+Ready}} ()
\begin{DoxyCompactList}\small\item\em Notifies listener that the SDP Config can now be produced without blocking. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1rtp_1_1RtpPacketProvider_a5d3c2618bdb8b65372899e77c770f99a}{notify\+Listener\+Error}} (Error\+Detail error\+Detail)
\begin{DoxyCompactList}\small\item\em Notifies listener that an unrecoverable error has been encountered. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Protected Member Functions inherited from \mbox{\hyperlink{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1DataProvider}{com.\+tritondigital.\+net.\+streaming.\+proxy.\+dataprovider.\+Data\+Provider}}}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{interfacecom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1Packet}{Packet}} \mbox{\hyperlink{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1DataProvider_ac82fea6799dac8348e21b68c5e675661}{get\+Free\+Packet}} ()
\begin{DoxyCompactList}\small\item\em Returns a free packet to use for the creation of a new packet. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1DataProvider_aa29588d8cea9453d3051c3316c55dbe2}{enqueue\+Packet}} (\mbox{\hyperlink{interfacecom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1Packet}{Packet}} packet)
\begin{DoxyCompactList}\small\item\em Enqueue a Packet to be sent to the server. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1rtp_1_1RtpPacketProvider_a4f44932a20af2682805e062917ee74b7}\label{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1rtp_1_1RtpPacketProvider_a4f44932a20af2682805e062917ee74b7} 
Audio\+Config {\bfseries m\+Audio\+Config}
\item 
\Hypertarget{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1rtp_1_1RtpPacketProvider_a4cb6fcd4451a776a0c849c4b37b01a6f}\label{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1rtp_1_1RtpPacketProvider_a4cb6fcd4451a776a0c849c4b37b01a6f} 
short {\bfseries m\+Next\+Packet\+Sequence\+Number} = 0
\begin{DoxyCompactList}\small\item\em Increments by one for each new packet that is pushed in the queue. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Protected Attributes inherited from \mbox{\hyperlink{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1DataProvider}{com.\+tritondigital.\+net.\+streaming.\+proxy.\+dataprovider.\+Data\+Provider}}}
\begin{DoxyCompactItemize}
\item 
final Array\+Blocking\+Queue$<$ \mbox{\hyperlink{interfacecom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1Packet}{Packet}} $>$ \mbox{\hyperlink{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1DataProvider_a4620a04632fe2b469f99d19f51f065f9}{m\+Packets\+Queue}} = new Array\+Blocking\+Queue$<$$>$(QUEUE\+\_\+\+SIZE)
\begin{DoxyCompactList}\small\item\em List of all packets that were received from the client and not sent to the server yet. \end{DoxyCompactList}\item 
final Array\+Blocking\+Queue$<$ \mbox{\hyperlink{interfacecom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1Packet}{Packet}} $>$ {\bfseries m\+Free\+Packets\+Pool} = new Array\+Blocking\+Queue$<$$>$(QUEUE\+\_\+\+SIZE)
\end{DoxyCompactItemize}
\doxysubsubsection*{Static Protected Attributes}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1rtp_1_1RtpPacketProvider_ae22f36e769ce6d974a131f66b5b29a10}\label{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1rtp_1_1RtpPacketProvider_ae22f36e769ce6d974a131f66b5b29a10} 
static final String {\bfseries LOCALHOST} = "{}127.\+0.\+0.\+1"{}
\item 
\Hypertarget{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1rtp_1_1RtpPacketProvider_a27e8a3679d0159e2b98df5b6019c7f2a}\label{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1rtp_1_1RtpPacketProvider_a27e8a3679d0159e2b98df5b6019c7f2a} 
static final String {\bfseries CRLF} = "{}\textbackslash{}r\textbackslash{}n"{}
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Base class for different kind of Rtp packets provider. The structure of the Rtp packet is almost identical between each type of provider and follows the RFC 3550 (\href{http://www.ietf.org/rfc/rfc3550.txt}{\texttt{ http\+://www.\+ietf.\+org/rfc/rfc3550.\+txt}}), but the payload differs.

This class provides Rtp packets, adds functionality that are specific to Rtp streaming such as the SDP Configuration for the RTSP DESCRIBE response.

Typically, the subclass only overrides get\+Profile\+Specific\+Sdp\+Config to tell the Sdp lines for the particular payload type, get\+Payload\+Size and create\+Payload to create this payload with the good type and optionally on\+Audio\+Config\+Decoded if it needs to make checks on the config or convert the config to a specific format. 

\doxysubsection{Member Function Documentation}
\Hypertarget{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1rtp_1_1RtpPacketProvider_abcf78db7251232d5b1a143aa82b04b99}\label{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1rtp_1_1RtpPacketProvider_abcf78db7251232d5b1a143aa82b04b99} 
\index{com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacketProvider@{com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacketProvider}!createEmptyPacket@{createEmptyPacket}}
\index{createEmptyPacket@{createEmptyPacket}!com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacketProvider@{com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacketProvider}}
\doxysubsubsection{\texorpdfstring{createEmptyPacket()}{createEmptyPacket()}}
{\footnotesize\ttfamily \mbox{\hyperlink{interfacecom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1Packet}{Packet}} com.\+tritondigital.\+net.\+streaming.\+proxy.\+dataprovider.\+rtp.\+Rtp\+Packet\+Provider.\+create\+Empty\+Packet (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [protected]}}



Reimplemented from \mbox{\hyperlink{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1DataProvider_a16935bef95edb1c63f05199845cc6712}{com.\+tritondigital.\+net.\+streaming.\+proxy.\+dataprovider.\+Data\+Provider}}.

\Hypertarget{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1rtp_1_1RtpPacketProvider_a3ab0a2cd020cbd96b1604f787975f553}\label{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1rtp_1_1RtpPacketProvider_a3ab0a2cd020cbd96b1604f787975f553} 
\index{com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacketProvider@{com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacketProvider}!createPayload@{createPayload}}
\index{createPayload@{createPayload}!com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacketProvider@{com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacketProvider}}
\doxysubsubsection{\texorpdfstring{createPayload()}{createPayload()}}
{\footnotesize\ttfamily abstract void com.\+tritondigital.\+net.\+streaming.\+proxy.\+dataprovider.\+rtp.\+Rtp\+Packet\+Provider.\+create\+Payload (\begin{DoxyParamCaption}\item[{byte\mbox{[}$\,$\mbox{]}}]{audio\+Data,  }\item[{int}]{audio\+Data\+Length,  }\item[{byte\mbox{[}$\,$\mbox{]}}]{out\+Payload,  }\item[{int}]{out\+Payload\+Offset }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [abstract]}, {\ttfamily [protected]}}

Create the payload for RTP Packet with the appropriate profile.

Puts the content of the payload in the given preallocated output buffer and the given offset. This helps preventing new buffer copy by reusing the same bytes array for the output.


\begin{DoxyParams}{Parameters}
{\em audio\+Data} & The data to put in the payload \\
\hline
{\em audio\+Data\+Length} & The part of the Audio\+Data buffer to use (buffer might be bigger if is is reused) \\
\hline
{\em out\+Payload} & Reference to a byte array preallocated with enough memory (at least the size returned by get\+Payload\+Size) \\
\hline
{\em out\+Payload\+Offset} & Offset at which the payload will be written in out\+Payload, allowing to create a header before the payload. \\
\hline
\end{DoxyParams}


Reimplemented in \mbox{\hyperlink{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1rtp_1_1RtpPacketProviderMpeg4Generic_aae17fbfc61cbc42913737f5864e79924}{com.\+tritondigital.\+net.\+streaming.\+proxy.\+dataprovider.\+rtp.\+Rtp\+Packet\+Provider\+Mpeg4\+Generic}}.

\Hypertarget{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1rtp_1_1RtpPacketProvider_a43408c531572e2a4616851581561ab25}\label{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1rtp_1_1RtpPacketProvider_a43408c531572e2a4616851581561ab25} 
\index{com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacketProvider@{com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacketProvider}!getFirstPacketSequenceNumber@{getFirstPacketSequenceNumber}}
\index{getFirstPacketSequenceNumber@{getFirstPacketSequenceNumber}!com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacketProvider@{com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacketProvider}}
\doxysubsubsection{\texorpdfstring{getFirstPacketSequenceNumber()}{getFirstPacketSequenceNumber()}}
{\footnotesize\ttfamily short com.\+tritondigital.\+net.\+streaming.\+proxy.\+dataprovider.\+rtp.\+Rtp\+Packet\+Provider.\+get\+First\+Packet\+Sequence\+Number (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Gets the sequence number that the first packet in the queue has (or will have when it is inserted). 

This is typically used for the RTP server to fill the RTP-\/\+INFO line of the PLAY response. \Hypertarget{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1rtp_1_1RtpPacketProvider_a5087676744ce817b6cab1ffc165a85cd}\label{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1rtp_1_1RtpPacketProvider_a5087676744ce817b6cab1ffc165a85cd} 
\index{com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacketProvider@{com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacketProvider}!getFirstPacketTimestamp@{getFirstPacketTimestamp}}
\index{getFirstPacketTimestamp@{getFirstPacketTimestamp}!com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacketProvider@{com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacketProvider}}
\doxysubsubsection{\texorpdfstring{getFirstPacketTimestamp()}{getFirstPacketTimestamp()}}
{\footnotesize\ttfamily int com.\+tritondigital.\+net.\+streaming.\+proxy.\+dataprovider.\+rtp.\+Rtp\+Packet\+Provider.\+get\+First\+Packet\+Timestamp (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Gets the timestamp that the first packet in the queue has (or will have when it is inserted). 

This is typically used for the RTP server to fill the RTP-\/\+INFO line of the PLAY response. \Hypertarget{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1rtp_1_1RtpPacketProvider_a4774c6013e6f461a0392ac194507f0d7}\label{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1rtp_1_1RtpPacketProvider_a4774c6013e6f461a0392ac194507f0d7} 
\index{com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacketProvider@{com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacketProvider}!getProfileSpecificSdpConfig@{getProfileSpecificSdpConfig}}
\index{getProfileSpecificSdpConfig@{getProfileSpecificSdpConfig}!com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacketProvider@{com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacketProvider}}
\doxysubsubsection{\texorpdfstring{getProfileSpecificSdpConfig()}{getProfileSpecificSdpConfig()}}
{\footnotesize\ttfamily abstract String com.\+tritondigital.\+net.\+streaming.\+proxy.\+dataprovider.\+rtp.\+Rtp\+Packet\+Provider.\+get\+Profile\+Specific\+Sdp\+Config (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [abstract]}, {\ttfamily [protected]}}



Returns the SDP string lines that are related to the profile itself. 

This is guaranteed to be only called after the Audio\+Config has been received, the calling thread will be blocked until it is received. \Hypertarget{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1rtp_1_1RtpPacketProvider_af52ab8ee1fb46ae1fe54679d66289b00}\label{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1rtp_1_1RtpPacketProvider_af52ab8ee1fb46ae1fe54679d66289b00} 
\index{com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacketProvider@{com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacketProvider}!getRtpTimestamp@{getRtpTimestamp}}
\index{getRtpTimestamp@{getRtpTimestamp}!com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacketProvider@{com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacketProvider}}
\doxysubsubsection{\texorpdfstring{getRtpTimestamp()}{getRtpTimestamp()}}
{\footnotesize\ttfamily int com.\+tritondigital.\+net.\+streaming.\+proxy.\+dataprovider.\+rtp.\+Rtp\+Packet\+Provider.\+get\+Rtp\+Timestamp (\begin{DoxyParamCaption}\item[{int}]{timestamp\+MS }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [protected]}}



Compute the RTP timestamp, which is the number of samples since the beginning of the stream. 

Multiply timestamp by the sampling rate to have a good approximation.


\begin{DoxyParams}{Parameters}
{\em timestamp\+MS} & The timestamp in ms of the first sample in the packet. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The number of samples played before the first sample of the packet, based on the time and the sampling rate. 
\end{DoxyReturn}
\Hypertarget{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1rtp_1_1RtpPacketProvider_affdba17fe90ee47af750db6a82373364}\label{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1rtp_1_1RtpPacketProvider_affdba17fe90ee47af750db6a82373364} 
\index{com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacketProvider@{com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacketProvider}!getSdpConfig@{getSdpConfig}}
\index{getSdpConfig@{getSdpConfig}!com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacketProvider@{com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacketProvider}}
\doxysubsubsection{\texorpdfstring{getSdpConfig()}{getSdpConfig()}}
{\footnotesize\ttfamily String com.\+tritondigital.\+net.\+streaming.\+proxy.\+dataprovider.\+rtp.\+Rtp\+Packet\+Provider.\+get\+Sdp\+Config (\begin{DoxyParamCaption}\item[{String}]{abs\+Control\+Url }\end{DoxyParamCaption})}



Returns the SDP string to be sent by the RTSP server in response to a Describe request. 

It includes common configurations from the RFC 2327 (\href{http://www.ietf.org/rfc/rfc2327.txt}{\texttt{ http\+://www.\+ietf.\+org/rfc/rfc2327.\+txt}}) added to those specific to the profile used to form the RTP Packets payload. The returned string is ready to be sent to the RTSP client (correctly formatted, contains CR + LF for end of line characters, etc.) \Hypertarget{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1rtp_1_1RtpPacketProvider_a093c1586e60da0d3075a717132fc2239}\label{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1rtp_1_1RtpPacketProvider_a093c1586e60da0d3075a717132fc2239} 
\index{com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacketProvider@{com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacketProvider}!isSdpConfigReady@{isSdpConfigReady}}
\index{isSdpConfigReady@{isSdpConfigReady}!com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacketProvider@{com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacketProvider}}
\doxysubsubsection{\texorpdfstring{isSdpConfigReady()}{isSdpConfigReady()}}
{\footnotesize\ttfamily boolean com.\+tritondigital.\+net.\+streaming.\+proxy.\+dataprovider.\+rtp.\+Rtp\+Packet\+Provider.\+is\+Sdp\+Config\+Ready (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Tells if the SDP strings can be retrieved without blocking. 

It is assumed that once the Audio\+Config has been received, all mandatory information are available. Thus, this method returns false until the Audio\+Config has been received from the protocol container decoder. \Hypertarget{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1rtp_1_1RtpPacketProvider_a5d3c2618bdb8b65372899e77c770f99a}\label{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1rtp_1_1RtpPacketProvider_a5d3c2618bdb8b65372899e77c770f99a} 
\index{com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacketProvider@{com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacketProvider}!notifyListenerError@{notifyListenerError}}
\index{notifyListenerError@{notifyListenerError}!com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacketProvider@{com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacketProvider}}
\doxysubsubsection{\texorpdfstring{notifyListenerError()}{notifyListenerError()}}
{\footnotesize\ttfamily void com.\+tritondigital.\+net.\+streaming.\+proxy.\+dataprovider.\+rtp.\+Rtp\+Packet\+Provider.\+notify\+Listener\+Error (\begin{DoxyParamCaption}\item[{Error\+Detail}]{error\+Detail }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [protected]}}



Notifies listener that an unrecoverable error has been encountered. 

Called by the subclasses to indicate that the provider has encountered an error that forces it to interrupt its processing. \Hypertarget{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1rtp_1_1RtpPacketProvider_a14fbc3db1fddb6965b7c2e4ffe33625f}\label{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1rtp_1_1RtpPacketProvider_a14fbc3db1fddb6965b7c2e4ffe33625f} 
\index{com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacketProvider@{com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacketProvider}!notifyListenerSdpConfigReady@{notifyListenerSdpConfigReady}}
\index{notifyListenerSdpConfigReady@{notifyListenerSdpConfigReady}!com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacketProvider@{com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacketProvider}}
\doxysubsubsection{\texorpdfstring{notifyListenerSdpConfigReady()}{notifyListenerSdpConfigReady()}}
{\footnotesize\ttfamily void com.\+tritondigital.\+net.\+streaming.\+proxy.\+dataprovider.\+rtp.\+Rtp\+Packet\+Provider.\+notify\+Listener\+Sdp\+Config\+Ready (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [protected]}}



Notifies listener that the SDP Config can now be produced without blocking. 

Called by the subclasses to indicate that the provider has received enough data and is ready to be used as the source for streaming. \Hypertarget{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1rtp_1_1RtpPacketProvider_a05e9a6ab9833c2767611e7738686bc05}\label{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1rtp_1_1RtpPacketProvider_a05e9a6ab9833c2767611e7738686bc05} 
\index{com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacketProvider@{com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacketProvider}!onAudioConfigDecoded@{onAudioConfigDecoded}}
\index{onAudioConfigDecoded@{onAudioConfigDecoded}!com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacketProvider@{com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacketProvider}}
\doxysubsubsection{\texorpdfstring{onAudioConfigDecoded()}{onAudioConfigDecoded()}}
{\footnotesize\ttfamily void com.\+tritondigital.\+net.\+streaming.\+proxy.\+dataprovider.\+rtp.\+Rtp\+Packet\+Provider.\+on\+Audio\+Config\+Decoded (\begin{DoxyParamCaption}\item[{Audio\+Config}]{audio\+Config }\end{DoxyParamCaption})}



Save the Audio\+Config and notify / unblock the listeners and threads waiting for it to become ready. 

Subclasses should always call this method on their super class if they override it. It is recommended to call the \textquotesingle{}super\textquotesingle{} version at the end of the overriden method, as it notifies the listeners and unblock threads waiting for the SDPConfig to become available. \Hypertarget{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1rtp_1_1RtpPacketProvider_ada9e74c7980a52681168a8f41976acc5}\label{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1rtp_1_1RtpPacketProvider_ada9e74c7980a52681168a8f41976acc5} 
\index{com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacketProvider@{com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacketProvider}!stop@{stop}}
\index{stop@{stop}!com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacketProvider@{com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacketProvider}}
\doxysubsubsection{\texorpdfstring{stop()}{stop()}}
{\footnotesize\ttfamily void com.\+tritondigital.\+net.\+streaming.\+proxy.\+dataprovider.\+rtp.\+Rtp\+Packet\+Provider.\+stop (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



In addition to the default stop, Resets the Sdp Config state to make sure to block the next time that this provider is used, until the Sdp\+Config is ready again. 



Reimplemented from \mbox{\hyperlink{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1dataprovider_1_1DataProvider_a38bde7abcfd2ce40055bb65f9d3f96c7}{com.\+tritondigital.\+net.\+streaming.\+proxy.\+dataprovider.\+Data\+Provider}}.



The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
streamingproxy/src/main/java/com/tritondigital/net/streaming/proxy/dataprovider/rtp/Rtp\+Packet\+Provider.\+java\end{DoxyCompactItemize}
