\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*{Data Structures} \begin{DoxyCompactItemize} \item struct \textbf{ osmux\+\_\+tx\+\_\+handle} \end{DoxyCompactItemize} \doxysubsection*{Macros} \begin{DoxyCompactItemize} \item \#define {\bfseries DELTA\+\_\+\+RTP\+\_\+\+MSG}~20000 \item \#define {\bfseries DELTA\+\_\+\+RTP\+\_\+\+TIMESTAMP}~160 \end{DoxyCompactItemize} \doxysubsection*{Functions} \begin{DoxyCompactItemize} \item \mbox{\label{osmux__output_8c_gaf756352e90aa8ab0e96c0f43f23c36d3}} static uint32\+\_\+t {\bfseries osmux\+\_\+ft\+\_\+dummy\+\_\+size} (uint8\+\_\+t amr\+\_\+ft, uint8\+\_\+t batch\+\_\+factor) \item struct \textbf{ osmux\+\_\+hdr} $\ast$ {\bfseries osmux\+\_\+xfrm\+\_\+output\+\_\+pull} (struct msgb $\ast$msg) \item static struct msgb $\ast$ {\bfseries osmux\+\_\+rebuild\+\_\+rtp} (struct \textbf{ osmux\+\_\+out\+\_\+handle} $\ast$h, struct \textbf{ osmux\+\_\+hdr} $\ast$osmuxh, void $\ast$payload, int payload\+\_\+len, bool first\+\_\+pkt) \item static void {\bfseries osmux\+\_\+xfrm\+\_\+output\+\_\+trigger} (void $\ast$data) \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 static int {\bfseries osmux\+\_\+xfrm\+\_\+output\+\_\+talloc\+\_\+destructor} (struct \textbf{ osmux\+\_\+out\+\_\+handle} $\ast$h) \item static void {\bfseries \+\_\+osmux\+\_\+xfrm\+\_\+output\+\_\+init} (struct \textbf{ osmux\+\_\+out\+\_\+handle} $\ast$h, uint32\+\_\+t rtp\+\_\+ssrc, uint8\+\_\+t rtp\+\_\+payload\+\_\+type) \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 {\bfseries 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 {\bfseries 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)