uvgrtp-base/docs/html/frame_8hh_source.html

292 lines
41 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.5"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>uvgRTP: C:/Local/rasane22/Projects/Kvazzup/libraries/uvgRTP/include/uvgrtp/frame.hh Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">uvgRTP<span id="projectnumber">&#160;2.1.0</span>
</div>
<div id="projectbrief">An open-source library for RTP/SRTP media delivery</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.5 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_e3f96ff476f8286b6e150580a2f7bd74.html">uvgrtp</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">frame.hh</div></div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="preprocessor">#pragma once</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span> </div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="preprocessor">#include &quot;<a class="code" href="util_8hh.html">util.hh</a>&quot;</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span> </div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="preprocessor">#ifdef _WIN32</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="preprocessor">#include &lt;winsock2.h&gt;</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="preprocessor">#include &lt;windows.h&gt;</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="preprocessor">#include &lt;ws2def.h&gt;</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="preprocessor">#else</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="preprocessor">#include &lt;netinet/in.h&gt;</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> </div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="preprocessor">#include &lt;string&gt;</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="preprocessor">#include &lt;vector&gt;</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> </div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="comment">/* https://stackoverflow.com/questions/1537964/visual-c-equivalent-of-gccs-attribute-packed */</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="preprocessor">#if defined(__MINGW32__) || defined(__MINGW64__) || defined(__GNUC__) || defined(__linux__)</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="preprocessor">#define PACK(__Declaration__) __Declaration__ __attribute__((__packed__))</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="preprocessor">#else</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="preprocessor">#define PACK(__Declaration__) __pragma(pack(push, 1)) __Declaration__ __pragma(pack(pop))</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> </div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span><span class="keyword">namespace </span>uvgrtp {</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> <span class="keyword">namespace </span>frame {</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> </div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> <span class="keyword">enum</span> RTCP_FRAME_TYPE {</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> RTCP_FT_SR = 200, <span class="comment">/* Sender report */</span></div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> RTCP_FT_RR = 201, <span class="comment">/* Receiver report */</span></div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> RTCP_FT_SDES = 202, <span class="comment">/* Source description */</span></div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> RTCP_FT_BYE = 203, <span class="comment">/* Goodbye */</span></div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> RTCP_FT_APP = 204 <span class="comment">/* Application-specific message */</span></div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> };</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> </div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> PACK(<span class="keyword">struct</span> rtp_header {</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> uint8_t version:2;</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> uint8_t padding:1;</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> uint8_t ext:1;</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> uint8_t cc:4;</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> uint8_t marker:1;</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> uint8_t payload:7;</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> uint16_t seq = 0;</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> uint32_t timestamp = 0;</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> uint32_t ssrc = 0;</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> });</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> </div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> PACK(<span class="keyword">struct</span> ext_header {</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> uint16_t type = 0;</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> uint16_t len = 0;</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> uint8_t *data = <span class="keyword">nullptr</span>;</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> });</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> </div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"><a class="line" href="structuvgrtp_1_1frame_1_1rtp__frame.html"> 53</a></span> <span class="keyword">struct </span><a class="code hl_struct" href="structuvgrtp_1_1frame_1_1rtp__frame.html">rtp_frame</a> {</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> <span class="keyword">struct </span>rtp_header header;</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> uint32_t *csrc = <span class="keyword">nullptr</span>;</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> <span class="keyword">struct </span>ext_header *ext = <span class="keyword">nullptr</span>;</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> </div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> <span class="keywordtype">size_t</span> padding_len = 0; <span class="comment">/* non-zero if frame is padded */</span></div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> </div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"><a class="line" href="structuvgrtp_1_1frame_1_1rtp__frame.html#a2d158e0aaf23398a8a3b02c95d06e366"> 64</a></span> <span class="keywordtype">size_t</span> <a class="code hl_variable" href="structuvgrtp_1_1frame_1_1rtp__frame.html#a2d158e0aaf23398a8a3b02c95d06e366">payload_len</a> = 0; </div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> uint8_t* payload = <span class="keyword">nullptr</span>;</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> </div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> uint8_t *dgram = <span class="keyword">nullptr</span>; <span class="comment">/* pointer to the UDP datagram (for internal use only) */</span></div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> <span class="keywordtype">size_t</span> dgram_size = 0; <span class="comment">/* size of the UDP datagram */</span></div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> };</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> </div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"><a class="line" href="structuvgrtp_1_1frame_1_1rtcp__header.html"> 74</a></span> <span class="keyword">struct </span><a class="code hl_struct" href="structuvgrtp_1_1frame_1_1rtcp__header.html">rtcp_header</a> {</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"><a class="line" href="structuvgrtp_1_1frame_1_1rtcp__header.html#a096fae3005310de937f1dab442c3b9d7"> 77</a></span> uint8_t <a class="code hl_variable" href="structuvgrtp_1_1frame_1_1rtcp__header.html#a096fae3005310de937f1dab442c3b9d7">version</a> = 0;</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"><a class="line" href="structuvgrtp_1_1frame_1_1rtcp__header.html#a4309061d7fae17a13db3d5eea71d6639"> 79</a></span> uint8_t <a class="code hl_variable" href="structuvgrtp_1_1frame_1_1rtcp__header.html#a4309061d7fae17a13db3d5eea71d6639">padding</a> = 0;</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> <span class="keyword">union </span>{</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"><a class="line" href="structuvgrtp_1_1frame_1_1rtcp__header.html#af121a4cae797537270add50efd7a4e3d"> 82</a></span> uint8_t <a class="code hl_variable" href="structuvgrtp_1_1frame_1_1rtcp__header.html#af121a4cae797537270add50efd7a4e3d">count</a> = 0; </div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"><a class="line" href="structuvgrtp_1_1frame_1_1rtcp__header.html#a829dd160ba7f473f3d6c5ff2d2dae5ab"> 84</a></span> uint8_t <a class="code hl_variable" href="structuvgrtp_1_1frame_1_1rtcp__header.html#a829dd160ba7f473f3d6c5ff2d2dae5ab">pkt_subtype</a>; </div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> };</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"><a class="line" href="structuvgrtp_1_1frame_1_1rtcp__header.html#a08120f0b6526c473c6488803388c7855"> 87</a></span> uint8_t <a class="code hl_variable" href="structuvgrtp_1_1frame_1_1rtcp__header.html#a08120f0b6526c473c6488803388c7855">pkt_type</a> = 0;</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"><a class="line" href="structuvgrtp_1_1frame_1_1rtcp__header.html#a1ed1871349edce32d60c3b1a33049fd0"> 89</a></span> uint16_t <a class="code hl_variable" href="structuvgrtp_1_1frame_1_1rtcp__header.html#a1ed1871349edce32d60c3b1a33049fd0">length</a> = 0;</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> };</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> </div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"><a class="line" href="structuvgrtp_1_1frame_1_1rtcp__sender__info.html"> 93</a></span> <span class="keyword">struct </span><a class="code hl_struct" href="structuvgrtp_1_1frame_1_1rtcp__sender__info.html">rtcp_sender_info</a> {</div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"><a class="line" href="structuvgrtp_1_1frame_1_1rtcp__sender__info.html#ae22a2bcad293efb1d642762d3eac3143"> 95</a></span> uint32_t <a class="code hl_variable" href="structuvgrtp_1_1frame_1_1rtcp__sender__info.html#ae22a2bcad293efb1d642762d3eac3143">ntp_msw</a> = 0;</div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"><a class="line" href="structuvgrtp_1_1frame_1_1rtcp__sender__info.html#a7c80f6082983dae0f3a5eea55a7c8ef6"> 97</a></span> uint32_t <a class="code hl_variable" href="structuvgrtp_1_1frame_1_1rtcp__sender__info.html#a7c80f6082983dae0f3a5eea55a7c8ef6">ntp_lsw</a> = 0;</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"><a class="line" href="structuvgrtp_1_1frame_1_1rtcp__sender__info.html#a2e9c3d1fe1b522a1d4c6fb4bc1fbdbdf"> 99</a></span> uint32_t <a class="code hl_variable" href="structuvgrtp_1_1frame_1_1rtcp__sender__info.html#a2e9c3d1fe1b522a1d4c6fb4bc1fbdbdf">rtp_ts</a> = 0;</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> uint32_t pkt_cnt = 0;</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"><a class="line" href="structuvgrtp_1_1frame_1_1rtcp__sender__info.html#a41290b62c283bf5d4c8f3a86ac5975ce"> 102</a></span> uint32_t <a class="code hl_variable" href="structuvgrtp_1_1frame_1_1rtcp__sender__info.html#a41290b62c283bf5d4c8f3a86ac5975ce">byte_cnt</a> = 0;</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> };</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> </div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"><a class="line" href="structuvgrtp_1_1frame_1_1rtcp__report__block.html"> 106</a></span> <span class="keyword">struct </span><a class="code hl_struct" href="structuvgrtp_1_1frame_1_1rtcp__report__block.html">rtcp_report_block</a> {</div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> uint32_t ssrc = 0;</div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> uint8_t fraction = 0;</div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> int32_t lost = 0;</div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> uint32_t last_seq = 0;</div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> uint32_t jitter = 0;</div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> uint32_t lsr = 0; <span class="comment">/* last Sender Report */</span></div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> uint32_t dlsr = 0; <span class="comment">/* delay since last Sender Report */</span></div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> };</div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> </div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"><a class="line" href="structuvgrtp_1_1frame_1_1rtcp__receiver__report.html"> 117</a></span> <span class="keyword">struct </span><a class="code hl_struct" href="structuvgrtp_1_1frame_1_1rtcp__receiver__report.html">rtcp_receiver_report</a> {</div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> <span class="keyword">struct </span><a class="code hl_struct" href="structuvgrtp_1_1frame_1_1rtcp__header.html">rtcp_header</a> header;</div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> uint32_t ssrc = 0;</div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> std::vector&lt;rtcp_report_block&gt; report_blocks;</div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> };</div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> </div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"><a class="line" href="structuvgrtp_1_1frame_1_1rtcp__sender__report.html"> 124</a></span> <span class="keyword">struct </span><a class="code hl_struct" href="structuvgrtp_1_1frame_1_1rtcp__sender__report.html">rtcp_sender_report</a> {</div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> <span class="keyword">struct </span><a class="code hl_struct" href="structuvgrtp_1_1frame_1_1rtcp__header.html">rtcp_header</a> header;</div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> uint32_t ssrc = 0;</div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> <span class="keyword">struct </span><a class="code hl_struct" href="structuvgrtp_1_1frame_1_1rtcp__sender__info.html">rtcp_sender_info</a> sender_info;</div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> std::vector&lt;rtcp_report_block&gt; report_blocks;</div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> };</div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> </div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"><a class="line" href="structuvgrtp_1_1frame_1_1rtcp__sdes__item.html"> 132</a></span> <span class="keyword">struct </span><a class="code hl_struct" href="structuvgrtp_1_1frame_1_1rtcp__sdes__item.html">rtcp_sdes_item</a> {</div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> uint8_t type = 0;</div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> uint8_t length = 0;</div>
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> uint8_t *data = <span class="keyword">nullptr</span>;</div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> };</div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> </div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"><a class="line" href="structuvgrtp_1_1frame_1_1rtcp__sdes__chunk.html"> 139</a></span> <span class="keyword">struct </span><a class="code hl_struct" href="structuvgrtp_1_1frame_1_1rtcp__sdes__chunk.html">rtcp_sdes_chunk</a> {</div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> uint32_t ssrc = 0;</div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> std::vector&lt;rtcp_sdes_item&gt; items;</div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> };</div>
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> </div>
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"><a class="line" href="structuvgrtp_1_1frame_1_1rtcp__sdes__packet.html"> 145</a></span> <span class="keyword">struct </span><a class="code hl_struct" href="structuvgrtp_1_1frame_1_1rtcp__sdes__packet.html">rtcp_sdes_packet</a> {</div>
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span> <span class="keyword">struct </span><a class="code hl_struct" href="structuvgrtp_1_1frame_1_1rtcp__header.html">rtcp_header</a> header;</div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span> std::vector&lt;rtcp_sdes_chunk&gt; chunks;</div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> };</div>
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> </div>
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"><a class="line" href="structuvgrtp_1_1frame_1_1rtcp__app__packet.html"> 151</a></span> <span class="keyword">struct </span><a class="code hl_struct" href="structuvgrtp_1_1frame_1_1rtcp__app__packet.html">rtcp_app_packet</a> {</div>
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span> <span class="keyword">struct </span><a class="code hl_struct" href="structuvgrtp_1_1frame_1_1rtcp__header.html">rtcp_header</a> header;</div>
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> uint32_t ssrc = 0;</div>
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span> uint8_t name[4] = {0};</div>
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span> uint8_t *payload = <span class="keyword">nullptr</span>;</div>
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"><a class="line" href="structuvgrtp_1_1frame_1_1rtcp__app__packet.html#acefa08e5025c52c0e4a0ae14255f6d01"> 157</a></span> <span class="keywordtype">size_t</span> <a class="code hl_variable" href="structuvgrtp_1_1frame_1_1rtcp__app__packet.html#acefa08e5025c52c0e4a0ae14255f6d01">payload_len</a> = 0;</div>
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> };</div>
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> </div>
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span> PACK(<span class="keyword">struct</span> zrtp_frame {</div>
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span> uint8_t version:4;</div>
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span> uint16_t unused:12;</div>
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span> uint16_t seq = 0;</div>
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span> uint32_t magic = 0;</div>
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span> uint32_t ssrc = 0;</div>
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span> uint8_t payload[1];</div>
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span> });</div>
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span> </div>
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</span> <span class="comment">/* Allocate an RTP frame</span></div>
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"> 170</span><span class="comment"> *</span></div>
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"> 171</span><span class="comment"> * First function allocates an empty RTP frame (no payload)</span></div>
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span><span class="comment"> *</span></div>
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span><span class="comment"> * Second allocates an RTP frame with payload of size &quot;payload_len&quot;,</span></div>
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span><span class="comment"> *</span></div>
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span><span class="comment"> * Third allocate an RTP frame with payload of size &quot;payload_len&quot;</span></div>
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span><span class="comment"> * + probation zone of size &quot;pz_size&quot; * MAX_PAYLOAD</span></div>
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span><span class="comment"> *</span></div>
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span><span class="comment"> * Return pointer to frame on success</span></div>
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"> 179</span><span class="comment"> * Return nullptr on error and set rtp_errno to:</span></div>
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"> 180</span><span class="comment"> * RTP_MEMORY_ERROR if allocation of memory failed */</span></div>
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"> 181</span> rtp_frame *alloc_rtp_frame();</div>
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"> 182</span> rtp_frame *alloc_rtp_frame(<span class="keywordtype">size_t</span> payload_len);</div>
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"> 183</span> </div>
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"> 184</span> </div>
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno"> 185</span> <span class="comment">/* Deallocate RTP frame</span></div>
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno"> 186</span><span class="comment"> *</span></div>
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"> 187</span><span class="comment"> * Return RTP_OK on successs</span></div>
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"> 188</span><span class="comment"> * Return RTP_INVALID_VALUE if &quot;frame&quot; is nullptr */</span></div>
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"> 189</span> rtp_error_t dealloc_frame(<a class="code hl_struct" href="structuvgrtp_1_1frame_1_1rtp__frame.html">uvgrtp::frame::rtp_frame</a> *frame);</div>
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span> </div>
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span> </div>
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"> 192</span> <span class="comment">/* Allocate ZRTP frame</span></div>
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"> 193</span><span class="comment"> * Parameter &quot;payload_size&quot; defines the length of the frame</span></div>
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"> 194</span><span class="comment"> *</span></div>
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"> 195</span><span class="comment"> * Return pointer to frame on success</span></div>
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno"> 196</span><span class="comment"> * Return nullptr on error and set rtp_errno to:</span></div>
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno"> 197</span><span class="comment"> * RTP_MEMORY_ERROR if allocation of memory failed</span></div>
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno"> 198</span><span class="comment"> * RTP_INVALID_VALUE if &quot;payload_size&quot; is 0 */</span></div>
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno"> 199</span> <span class="keywordtype">void</span>* alloc_zrtp_frame(<span class="keywordtype">size_t</span> payload_size);</div>
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno"> 200</span> </div>
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno"> 201</span> </div>
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno"> 202</span> <span class="comment">/* Deallocate ZRTP frame</span></div>
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno"> 203</span><span class="comment"> *</span></div>
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno"> 204</span><span class="comment"> * Return RTP_OK on successs</span></div>
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno"> 205</span><span class="comment"> * Return RTP_INVALID_VALUE if &quot;frame&quot; is nullptr */</span></div>
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno"> 206</span> rtp_error_t dealloc_frame(uvgrtp::frame::zrtp_frame* frame);</div>
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno"> 207</span> }</div>
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno"> 208</span>}</div>
<div class="line"><a id="l00209" name="l00209"></a><span class="lineno"> 209</span> </div>
<div class="line"><a id="l00210" name="l00210"></a><span class="lineno"> 210</span><span class="keyword">namespace </span>uvg_rtp = uvgrtp;</div>
<div class="ttc" id="astructuvgrtp_1_1frame_1_1rtcp__app__packet_html"><div class="ttname"><a href="structuvgrtp_1_1frame_1_1rtcp__app__packet.html">uvgrtp::frame::rtcp_app_packet</a></div><div class="ttdoc">See RFC 3550 section 6.7</div><div class="ttdef"><b>Definition:</b> <a href="frame_8hh_source.html#l00151">frame.hh:151</a></div></div>
<div class="ttc" id="astructuvgrtp_1_1frame_1_1rtcp__app__packet_html_acefa08e5025c52c0e4a0ae14255f6d01"><div class="ttname"><a href="structuvgrtp_1_1frame_1_1rtcp__app__packet.html#acefa08e5025c52c0e4a0ae14255f6d01">uvgrtp::frame::rtcp_app_packet::payload_len</a></div><div class="ttdeci">size_t payload_len</div><div class="ttdoc">Size of the payload in bytes. Added by uvgRTP to help process the payload.</div><div class="ttdef"><b>Definition:</b> <a href="frame_8hh_source.html#l00157">frame.hh:157</a></div></div>
<div class="ttc" id="astructuvgrtp_1_1frame_1_1rtcp__header_html"><div class="ttname"><a href="structuvgrtp_1_1frame_1_1rtcp__header.html">uvgrtp::frame::rtcp_header</a></div><div class="ttdoc">Header of for all RTCP packets defined in RFC 3550 section 6</div><div class="ttdef"><b>Definition:</b> <a href="frame_8hh_source.html#l00074">frame.hh:74</a></div></div>
<div class="ttc" id="astructuvgrtp_1_1frame_1_1rtcp__header_html_a08120f0b6526c473c6488803388c7855"><div class="ttname"><a href="structuvgrtp_1_1frame_1_1rtcp__header.html#a08120f0b6526c473c6488803388c7855">uvgrtp::frame::rtcp_header::pkt_type</a></div><div class="ttdeci">uint8_t pkt_type</div><div class="ttdoc">Identifies the RTCP packet type.</div><div class="ttdef"><b>Definition:</b> <a href="frame_8hh_source.html#l00087">frame.hh:87</a></div></div>
<div class="ttc" id="astructuvgrtp_1_1frame_1_1rtcp__header_html_a096fae3005310de937f1dab442c3b9d7"><div class="ttname"><a href="structuvgrtp_1_1frame_1_1rtcp__header.html#a096fae3005310de937f1dab442c3b9d7">uvgrtp::frame::rtcp_header::version</a></div><div class="ttdeci">uint8_t version</div><div class="ttdoc">This field identifies the version of RTP. The version defined by RFC 3550 is two (2).</div><div class="ttdef"><b>Definition:</b> <a href="frame_8hh_source.html#l00077">frame.hh:77</a></div></div>
<div class="ttc" id="astructuvgrtp_1_1frame_1_1rtcp__header_html_a1ed1871349edce32d60c3b1a33049fd0"><div class="ttname"><a href="structuvgrtp_1_1frame_1_1rtcp__header.html#a1ed1871349edce32d60c3b1a33049fd0">uvgrtp::frame::rtcp_header::length</a></div><div class="ttdeci">uint16_t length</div><div class="ttdoc">Length of the whole message measured in 32-bit words.</div><div class="ttdef"><b>Definition:</b> <a href="frame_8hh_source.html#l00089">frame.hh:89</a></div></div>
<div class="ttc" id="astructuvgrtp_1_1frame_1_1rtcp__header_html_a4309061d7fae17a13db3d5eea71d6639"><div class="ttname"><a href="structuvgrtp_1_1frame_1_1rtcp__header.html#a4309061d7fae17a13db3d5eea71d6639">uvgrtp::frame::rtcp_header::padding</a></div><div class="ttdeci">uint8_t padding</div><div class="ttdoc">Does this packet contain padding at the end.</div><div class="ttdef"><b>Definition:</b> <a href="frame_8hh_source.html#l00079">frame.hh:79</a></div></div>
<div class="ttc" id="astructuvgrtp_1_1frame_1_1rtcp__header_html_a829dd160ba7f473f3d6c5ff2d2dae5ab"><div class="ttname"><a href="structuvgrtp_1_1frame_1_1rtcp__header.html#a829dd160ba7f473f3d6c5ff2d2dae5ab">uvgrtp::frame::rtcp_header::pkt_subtype</a></div><div class="ttdeci">uint8_t pkt_subtype</div><div class="ttdoc">Subtype in APP packets. Alternative to count.</div><div class="ttdef"><b>Definition:</b> <a href="frame_8hh_source.html#l00084">frame.hh:84</a></div></div>
<div class="ttc" id="astructuvgrtp_1_1frame_1_1rtcp__header_html_af121a4cae797537270add50efd7a4e3d"><div class="ttname"><a href="structuvgrtp_1_1frame_1_1rtcp__header.html#af121a4cae797537270add50efd7a4e3d">uvgrtp::frame::rtcp_header::count</a></div><div class="ttdeci">uint8_t count</div><div class="ttdoc">Source count or report count. Alternative to pkt_subtype.</div><div class="ttdef"><b>Definition:</b> <a href="frame_8hh_source.html#l00082">frame.hh:82</a></div></div>
<div class="ttc" id="astructuvgrtp_1_1frame_1_1rtcp__receiver__report_html"><div class="ttname"><a href="structuvgrtp_1_1frame_1_1rtcp__receiver__report.html">uvgrtp::frame::rtcp_receiver_report</a></div><div class="ttdoc">See RFC 3550 section 6.4.2</div><div class="ttdef"><b>Definition:</b> <a href="frame_8hh_source.html#l00117">frame.hh:117</a></div></div>
<div class="ttc" id="astructuvgrtp_1_1frame_1_1rtcp__report__block_html"><div class="ttname"><a href="structuvgrtp_1_1frame_1_1rtcp__report__block.html">uvgrtp::frame::rtcp_report_block</a></div><div class="ttdoc">See RFC 3550 section 6.4.1</div><div class="ttdef"><b>Definition:</b> <a href="frame_8hh_source.html#l00106">frame.hh:106</a></div></div>
<div class="ttc" id="astructuvgrtp_1_1frame_1_1rtcp__sdes__chunk_html"><div class="ttname"><a href="structuvgrtp_1_1frame_1_1rtcp__sdes__chunk.html">uvgrtp::frame::rtcp_sdes_chunk</a></div><div class="ttdoc">See RFC 3550 section 6.5</div><div class="ttdef"><b>Definition:</b> <a href="frame_8hh_source.html#l00139">frame.hh:139</a></div></div>
<div class="ttc" id="astructuvgrtp_1_1frame_1_1rtcp__sdes__item_html"><div class="ttname"><a href="structuvgrtp_1_1frame_1_1rtcp__sdes__item.html">uvgrtp::frame::rtcp_sdes_item</a></div><div class="ttdoc">See RFC 3550 section 6.5</div><div class="ttdef"><b>Definition:</b> <a href="frame_8hh_source.html#l00132">frame.hh:132</a></div></div>
<div class="ttc" id="astructuvgrtp_1_1frame_1_1rtcp__sdes__packet_html"><div class="ttname"><a href="structuvgrtp_1_1frame_1_1rtcp__sdes__packet.html">uvgrtp::frame::rtcp_sdes_packet</a></div><div class="ttdoc">See RFC 3550 section 6.5</div><div class="ttdef"><b>Definition:</b> <a href="frame_8hh_source.html#l00145">frame.hh:145</a></div></div>
<div class="ttc" id="astructuvgrtp_1_1frame_1_1rtcp__sender__info_html"><div class="ttname"><a href="structuvgrtp_1_1frame_1_1rtcp__sender__info.html">uvgrtp::frame::rtcp_sender_info</a></div><div class="ttdoc">See RFC 3550 section 6.4.1</div><div class="ttdef"><b>Definition:</b> <a href="frame_8hh_source.html#l00093">frame.hh:93</a></div></div>
<div class="ttc" id="astructuvgrtp_1_1frame_1_1rtcp__sender__info_html_a2e9c3d1fe1b522a1d4c6fb4bc1fbdbdf"><div class="ttname"><a href="structuvgrtp_1_1frame_1_1rtcp__sender__info.html#a2e9c3d1fe1b522a1d4c6fb4bc1fbdbdf">uvgrtp::frame::rtcp_sender_info::rtp_ts</a></div><div class="ttdeci">uint32_t rtp_ts</div><div class="ttdoc">RTP timestamp corresponding to this NTP timestamp.</div><div class="ttdef"><b>Definition:</b> <a href="frame_8hh_source.html#l00099">frame.hh:99</a></div></div>
<div class="ttc" id="astructuvgrtp_1_1frame_1_1rtcp__sender__info_html_a41290b62c283bf5d4c8f3a86ac5975ce"><div class="ttname"><a href="structuvgrtp_1_1frame_1_1rtcp__sender__info.html#a41290b62c283bf5d4c8f3a86ac5975ce">uvgrtp::frame::rtcp_sender_info::byte_cnt</a></div><div class="ttdeci">uint32_t byte_cnt</div><div class="ttdoc">Also known as octet count.</div><div class="ttdef"><b>Definition:</b> <a href="frame_8hh_source.html#l00102">frame.hh:102</a></div></div>
<div class="ttc" id="astructuvgrtp_1_1frame_1_1rtcp__sender__info_html_a7c80f6082983dae0f3a5eea55a7c8ef6"><div class="ttname"><a href="structuvgrtp_1_1frame_1_1rtcp__sender__info.html#a7c80f6082983dae0f3a5eea55a7c8ef6">uvgrtp::frame::rtcp_sender_info::ntp_lsw</a></div><div class="ttdeci">uint32_t ntp_lsw</div><div class="ttdoc">NTP timestamp, least significant word.</div><div class="ttdef"><b>Definition:</b> <a href="frame_8hh_source.html#l00097">frame.hh:97</a></div></div>
<div class="ttc" id="astructuvgrtp_1_1frame_1_1rtcp__sender__info_html_ae22a2bcad293efb1d642762d3eac3143"><div class="ttname"><a href="structuvgrtp_1_1frame_1_1rtcp__sender__info.html#ae22a2bcad293efb1d642762d3eac3143">uvgrtp::frame::rtcp_sender_info::ntp_msw</a></div><div class="ttdeci">uint32_t ntp_msw</div><div class="ttdoc">NTP timestamp, most significant word.</div><div class="ttdef"><b>Definition:</b> <a href="frame_8hh_source.html#l00095">frame.hh:95</a></div></div>
<div class="ttc" id="astructuvgrtp_1_1frame_1_1rtcp__sender__report_html"><div class="ttname"><a href="structuvgrtp_1_1frame_1_1rtcp__sender__report.html">uvgrtp::frame::rtcp_sender_report</a></div><div class="ttdoc">See RFC 3550 section 6.4.1</div><div class="ttdef"><b>Definition:</b> <a href="frame_8hh_source.html#l00124">frame.hh:124</a></div></div>
<div class="ttc" id="astructuvgrtp_1_1frame_1_1rtp__frame_html"><div class="ttname"><a href="structuvgrtp_1_1frame_1_1rtp__frame.html">uvgrtp::frame::rtp_frame</a></div><div class="ttdoc">See RFC 3550 section 5</div><div class="ttdef"><b>Definition:</b> <a href="frame_8hh_source.html#l00053">frame.hh:53</a></div></div>
<div class="ttc" id="astructuvgrtp_1_1frame_1_1rtp__frame_html_a2d158e0aaf23398a8a3b02c95d06e366"><div class="ttname"><a href="structuvgrtp_1_1frame_1_1rtp__frame.html#a2d158e0aaf23398a8a3b02c95d06e366">uvgrtp::frame::rtp_frame::payload_len</a></div><div class="ttdeci">size_t payload_len</div><div class="ttdoc">Length of the packet payload in bytes added by uvgRTP to help process the frame.</div><div class="ttdef"><b>Definition:</b> <a href="frame_8hh_source.html#l00064">frame.hh:64</a></div></div>
<div class="ttc" id="autil_8hh_html"><div class="ttname"><a href="util_8hh.html">util.hh</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5
</small></address>
</body>
</html>