\doxysection{src/osmux\+\_\+output.c File Reference}
\label{osmux__output_8c}\index{src/osmux\_output.c@{src/osmux\_output.c}}


Osmocom multiplex protocol helpers (output)  


{\ttfamily \#include $<$stdio.\+h$>$}\newline
{\ttfamily \#include $<$string.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/msgb.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/timer.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/timer\+\_\+compat.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/select.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/talloc.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/logging.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/netif/amr.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/netif/rtp.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/netif/osmux.\+h$>$}\newline
{\ttfamily \#include $<$arpa/inet.\+h$>$}\newline
\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\mbox{\label{osmux__output_8c_af5909a93287ea334985b9d1735ad0b60}} 
\#define {\bfseries DELTA\+\_\+\+RTP\+\_\+\+MSG}~20000
\item 
\mbox{\label{osmux__output_8c_aeac1d5817fbc8473765723ddad171dc5}} 
\#define {\bfseries DELTA\+\_\+\+RTP\+\_\+\+TIMESTAMP}~160
\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
struct \textbf{ osmux\+\_\+hdr} $\ast$ {\bfseries osmux\+\_\+xfrm\+\_\+output\+\_\+pull} (struct msgb $\ast$msg)
\item 
int \textbf{ osmux\+\_\+xfrm\+\_\+output\+\_\+sched} (struct \textbf{ osmux\+\_\+out\+\_\+handle} $\ast$h, struct \textbf{ osmux\+\_\+hdr} $\ast$osmuxh)
\begin{DoxyCompactList}\small\item\em Generate RTP packets from osmux frame AMR payload set and schedule them for transmission at appropriate time. \end{DoxyCompactList}\item 
void \textbf{ osmux\+\_\+xfrm\+\_\+output\+\_\+flush} (struct \textbf{ osmux\+\_\+out\+\_\+handle} $\ast$h)
\begin{DoxyCompactList}\small\item\em Flush all scheduled RTP packets still pending to be transmitted. \end{DoxyCompactList}\item 
struct \textbf{ osmux\+\_\+out\+\_\+handle} $\ast$ \textbf{ osmux\+\_\+xfrm\+\_\+output\+\_\+alloc} (void $\ast$ctx)
\begin{DoxyCompactList}\small\item\em Allocate a new osmux out handle. \end{DoxyCompactList}\item 
void \textbf{ osmux\+\_\+xfrm\+\_\+output\+\_\+init2} (struct \textbf{ osmux\+\_\+out\+\_\+handle} $\ast$h, uint32\+\_\+t rtp\+\_\+ssrc, uint8\+\_\+t rtp\+\_\+payload\+\_\+type) OSMO\+\_\+\+DEPRECATED(\char`\"{}Use \textbf{ osmux\+\_\+xfrm\+\_\+output\+\_\+alloc}() and osmux\+\_\+xfrm\+\_\+output\+\_\+set\+\_\+rtp\+\_\+$\ast$() instead\char`\"{})
\item 
void \textbf{ osmux\+\_\+xfrm\+\_\+output\+\_\+init} (struct \textbf{ osmux\+\_\+out\+\_\+handle} $\ast$h, uint32\+\_\+t rtp\+\_\+ssrc) OSMO\+\_\+\+DEPRECATED(\char`\"{}Use \textbf{ osmux\+\_\+xfrm\+\_\+output\+\_\+alloc}() and osmux\+\_\+xfrm\+\_\+output\+\_\+set\+\_\+rtp\+\_\+$\ast$() instead\char`\"{})
\item 
void \textbf{ osmux\+\_\+xfrm\+\_\+output\+\_\+set\+\_\+tx\+\_\+cb} (struct \textbf{ osmux\+\_\+out\+\_\+handle} $\ast$h, void($\ast$tx\+\_\+cb)(struct msgb $\ast$msg, void $\ast$data), void $\ast$data)
\begin{DoxyCompactList}\small\item\em Set transmission callback to call when a generated RTP packet is to be transmitted. \end{DoxyCompactList}\item 
void \textbf{ osmux\+\_\+xfrm\+\_\+output\+\_\+set\+\_\+rtp\+\_\+msgb\+\_\+alloc\+\_\+cb} (struct \textbf{ osmux\+\_\+out\+\_\+handle} $\ast$h, rtp\+\_\+msgb\+\_\+alloc\+\_\+cb\+\_\+t cb, void $\ast$cb\+\_\+data)
\begin{DoxyCompactList}\small\item\em Set callback to call when an RTP packet to be generated is to be allocated. \end{DoxyCompactList}\item 
void \textbf{ osmux\+\_\+xfrm\+\_\+output\+\_\+set\+\_\+rtp\+\_\+ssrc} (struct \textbf{ osmux\+\_\+out\+\_\+handle} $\ast$h, uint32\+\_\+t rtp\+\_\+ssrc)
\begin{DoxyCompactList}\small\item\em Set SSRC of generated RTP packets from Osmux frames. \end{DoxyCompactList}\item 
void \textbf{ osmux\+\_\+xfrm\+\_\+output\+\_\+set\+\_\+rtp\+\_\+pl\+\_\+type} (struct \textbf{ osmux\+\_\+out\+\_\+handle} $\ast$h, uint32\+\_\+t rtp\+\_\+payload\+\_\+type)
\begin{DoxyCompactList}\small\item\em Set Payload Type of generated RTP packets from Osmux frames. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Osmocom multiplex protocol helpers (output) 

