\doxysection{com.\+tritondigital.\+net.\+streaming.\+proxy.\+decoder.\+Stream\+Container\+Decoder.\+Audio\+Data\+Decoded\+Listener Interface Reference}
\hypertarget{interfacecom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1decoder_1_1StreamContainerDecoder_1_1AudioDataDecodedListener}{}\label{interfacecom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1decoder_1_1StreamContainerDecoder_1_1AudioDataDecodedListener}\index{com.tritondigital.net.streaming.proxy.decoder.StreamContainerDecoder.AudioDataDecodedListener@{com.tritondigital.net.streaming.proxy.decoder.StreamContainerDecoder.AudioDataDecodedListener}}


Interface definition for a callback to be invoked when new metadata is decoded from the stream.  


\doxysubsubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
void \mbox{\hyperlink{interfacecom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1decoder_1_1StreamContainerDecoder_1_1AudioDataDecodedListener_aa39a61164dfdf3b82f47b1123501f96b}{on\+Audio\+Config\+Decoded}} (\mbox{\hyperlink{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1decoder_1_1AudioConfig}{Audio\+Config}} audio\+Config)
\item 
void \mbox{\hyperlink{interfacecom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1decoder_1_1StreamContainerDecoder_1_1AudioDataDecodedListener_afa1bb927ef6aa03ae25c8f74d0e88297}{on\+Audio\+Data\+Decoded}} (byte\mbox{[}$\,$\mbox{]} audio\+Data, int audio\+Data\+Length, int timestamp)
\begin{DoxyCompactList}\small\item\em Audio data packet has been decoded from the stream. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Interface definition for a callback to be invoked when new metadata is decoded from the stream. 

Methods on this listener may be invoked from a secondary thread. The class implementing this listener should be thread-\/safe. 

\doxysubsection{Member Function Documentation}
\Hypertarget{interfacecom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1decoder_1_1StreamContainerDecoder_1_1AudioDataDecodedListener_aa39a61164dfdf3b82f47b1123501f96b}\label{interfacecom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1decoder_1_1StreamContainerDecoder_1_1AudioDataDecodedListener_aa39a61164dfdf3b82f47b1123501f96b} 
\index{com.tritondigital.net.streaming.proxy.decoder.StreamContainerDecoder.AudioDataDecodedListener@{com.tritondigital.net.streaming.proxy.decoder.StreamContainerDecoder.AudioDataDecodedListener}!onAudioConfigDecoded@{onAudioConfigDecoded}}
\index{onAudioConfigDecoded@{onAudioConfigDecoded}!com.tritondigital.net.streaming.proxy.decoder.StreamContainerDecoder.AudioDataDecodedListener@{com.tritondigital.net.streaming.proxy.decoder.StreamContainerDecoder.AudioDataDecodedListener}}
\doxysubsubsection{\texorpdfstring{onAudioConfigDecoded()}{onAudioConfigDecoded()}}
{\footnotesize\ttfamily void com.\+tritondigital.\+net.\+streaming.\+proxy.\+decoder.\+Stream\+Container\+Decoder.\+Audio\+Data\+Decoded\+Listener.\+on\+Audio\+Config\+Decoded (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1decoder_1_1AudioConfig}{Audio\+Config}}}]{audio\+Config }\end{DoxyParamCaption})}

All parameters in the stream (typically in some headers or in the first packet(s) received after the connection is established) have been decoded. Those parameters are passed by the source of the stream to indicate how to use the stream data.

This method is called prior to the first call to on\+Audio\+Data\+Decoded, unless the stream transport protocol does not include any parameters. \Hypertarget{interfacecom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1decoder_1_1StreamContainerDecoder_1_1AudioDataDecodedListener_afa1bb927ef6aa03ae25c8f74d0e88297}\label{interfacecom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1decoder_1_1StreamContainerDecoder_1_1AudioDataDecodedListener_afa1bb927ef6aa03ae25c8f74d0e88297} 
\index{com.tritondigital.net.streaming.proxy.decoder.StreamContainerDecoder.AudioDataDecodedListener@{com.tritondigital.net.streaming.proxy.decoder.StreamContainerDecoder.AudioDataDecodedListener}!onAudioDataDecoded@{onAudioDataDecoded}}
\index{onAudioDataDecoded@{onAudioDataDecoded}!com.tritondigital.net.streaming.proxy.decoder.StreamContainerDecoder.AudioDataDecodedListener@{com.tritondigital.net.streaming.proxy.decoder.StreamContainerDecoder.AudioDataDecodedListener}}
\doxysubsubsection{\texorpdfstring{onAudioDataDecoded()}{onAudioDataDecoded()}}
{\footnotesize\ttfamily void com.\+tritondigital.\+net.\+streaming.\+proxy.\+decoder.\+Stream\+Container\+Decoder.\+Audio\+Data\+Decoded\+Listener.\+on\+Audio\+Data\+Decoded (\begin{DoxyParamCaption}\item[{byte\mbox{[}$\,$\mbox{]}}]{audio\+Data,  }\item[{int}]{audio\+Data\+Length,  }\item[{int}]{timestamp }\end{DoxyParamCaption})}



Audio data packet has been decoded from the stream. 

Listener should use the Audio\+Config received in the call to on\+Audio\+Config\+Decoded received before to interpret the audio data correctly.


\begin{DoxyParams}{Parameters}
{\em audio\+Data} & The chunk of data exactly as extracted from the stream (this is a complete chunk that was present in a single packet of the stream container). The buffer audio\+Data might be reused later on, so it is the responsibility of the listener to copy it if it needs to keep it for long term. \\
\hline
{\em audio\+Data\+Length} & The length of the chunk in the audio\+Data bytes array. To minimise the allocation and copy of memory, the decoding buffer might be reused to store less data than the previous buffer. \\
\hline
{\em timestamp} & The time stamp at which the data should be played. Typically extracted from the header of the packet containing the audio data. Time stamp is in milliseconds, stating at 0 for the first packet. \\
\hline
\end{DoxyParams}


The documentation for this interface was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
streamingproxy/src/main/java/com/tritondigital/net/streaming/proxy/decoder/Stream\+Container\+Decoder.\+java\end{DoxyCompactItemize}
