<divclass="line"><aid="l00023"name="l00023"></a><spanclass="lineno"> 23</span><spanclass="keyword">typedef</span> std::vector<std::pair<size_t, uint8_t*>> buf_vec; <spanclass="comment">// also defined in socket.hh</span></div>
<divclass="line"><aid="l00033"name="l00033"></a><spanclass="lineno"> 33</span> uint32_t sent_pkts = 0; <spanclass="comment">/* Number of sent RTP packets */</span></div>
<divclass="line"><aid="l00034"name="l00034"></a><spanclass="lineno"> 34</span> uint32_t sent_bytes = 0; <spanclass="comment">/* Number of sent bytes excluding RTP Header */</span></div>
<divclass="line"><aid="l00035"name="l00035"></a><spanclass="lineno"> 35</span><spanclass="keywordtype">bool</span> sent_rtp_packet = <spanclass="keyword">false</span>; <spanclass="comment">// since last report</span></div>
<divclass="line"><aid="l00040"name="l00040"></a><spanclass="lineno"> 40</span> uint32_t received_pkts = 0; <spanclass="comment">/* Number of packets received */</span></div>
<divclass="line"><aid="l00041"name="l00041"></a><spanclass="lineno"> 41</span> uint32_t lost_pkts = 0; <spanclass="comment">/* Number of dropped RTP packets */</span></div>
<divclass="line"><aid="l00042"name="l00042"></a><spanclass="lineno"> 42</span> uint32_t received_bytes = 0; <spanclass="comment">/* Number of bytes received excluding RTP Header */</span></div>
<divclass="line"><aid="l00043"name="l00043"></a><spanclass="lineno"> 43</span><spanclass="keywordtype">bool</span> received_rtp_packet = <spanclass="keyword">false</span>; <spanclass="comment">// since last report</span></div>
<divclass="line"><aid="l00045"name="l00045"></a><spanclass="lineno"> 45</span> uint32_t expected_pkts = 0; <spanclass="comment">/* Number of expected packets */</span></div>
<divclass="line"><aid="l00046"name="l00046"></a><spanclass="lineno"> 46</span> uint32_t received_prior = 0; <spanclass="comment">/* Number of received packets in last report */</span></div>
<divclass="line"><aid="l00047"name="l00047"></a><spanclass="lineno"> 47</span> uint32_t expected_prior = 0; <spanclass="comment">/* Number of expected packets in last report */</span></div>
<divclass="line"><aid="l00049"name="l00049"></a><spanclass="lineno"> 49</span><spanclass="keywordtype">double</span> jitter = 0; <spanclass="comment">/* The estimation of jitter (see RFC 3550 A.8) */</span></div>
<divclass="line"><aid="l00053"name="l00053"></a><spanclass="lineno"> 53</span><spanclass="comment">/* Receiver clock related stuff */</span></div>
<divclass="line"><aid="l00054"name="l00054"></a><spanclass="lineno"> 54</span> uint64_t initial_ntp = 0; <spanclass="comment">/* Wallclock reading when the first RTP packet was received */</span></div>
<divclass="line"><aid="l00055"name="l00055"></a><spanclass="lineno"> 55</span> uint32_t initial_rtp = 0; <spanclass="comment">/* RTP timestamp of the first RTP packet received */</span></div>
<divclass="line"><aid="l00056"name="l00056"></a><spanclass="lineno"> 56</span> uint32_t clock_rate = 0; <spanclass="comment">/* Rate of the clock (used for jitter calculations) */</span></div>
<divclass="line"><aid="l00058"name="l00058"></a><spanclass="lineno"> 58</span> uint32_t lsr = 0; <spanclass="comment">/* Middle 32 bits of the 64-bit NTP timestamp of previous SR */</span></div>
<divclass="line"><aid="l00059"name="l00059"></a><spanclass="lineno"> 59</span> uvgrtp::clock::hrc::hrc_t sr_ts; <spanclass="comment">/* When the last SR was received (used to calculate delay) */</span></div>
<divclass="line"><aid="l00061"name="l00061"></a><spanclass="lineno"> 61</span> uint16_t max_seq = 0; <spanclass="comment">/* Highest sequence number received */</span></div>
<divclass="line"><aid="l00062"name="l00062"></a><spanclass="lineno"> 62</span> uint32_t base_seq = 0; <spanclass="comment">/* First sequence number received */</span></div>
<divclass="line"><aid="l00070"name="l00070"></a><spanclass="lineno"> 70</span> uint32_t probation = 0; <spanclass="comment">/* has the participant been fully accepted to the session */</span></div>
<divclass="line"><aid="l00071"name="l00071"></a><spanclass="lineno"> 71</span><spanclass="keywordtype">int</span> role = 0; <spanclass="comment">/* is the participant a sender or a receiver */</span></div>
<divclass="line"><aid="l00073"name="l00073"></a><spanclass="lineno"> 73</span><spanclass="comment">/* Save the latest RTCP packets received from this participant</span></div>
<divclass="line"><aid="l00074"name="l00074"></a><spanclass="lineno"> 74</span><spanclass="comment"> * Users can query these packets using the SSRC of participant */</span></div>
<divclass="line"><aid="l00120"name="l00120"></a><spanclass="lineno"> 120</span><spanclass="comment"> * return RTP_OK on success and RTP_MEMORY_ERROR if the allocation fails */</span></div>
<divclass="line"><aid="l00123"name="l00123"></a><spanclass="lineno"> 123</span><spanclass="comment">/* End the RTCP session and send RTCP BYE to all participants</span></div>
<divclass="line"><aid="l00128"name="l00128"></a><spanclass="lineno"> 128</span><spanclass="comment">/* Generate either RTCP Sender or Receiver report and sent it to all participants</span></div>
<divclass="line"><aid="l00129"name="l00129"></a><spanclass="lineno"> 129</span><spanclass="comment"> * Return RTP_OK on success and RTP_ERROR on error */</span></div>
<divclass="line"><aid="l00132"name="l00132"></a><spanclass="lineno"> 132</span><spanclass="comment">/* Handle incoming RTCP packet (first make sure it's a valid RTCP packet)</span></div>
<divclass="line"><aid="l00133"name="l00133"></a><spanclass="lineno"> 133</span><spanclass="comment"> * This function will call one of the above functions internally</span></div>
<divclass="line"><aid="l00135"name="l00135"></a><spanclass="lineno"> 135</span><spanclass="comment"> * Return RTP_OK on success and RTP_ERROR on error */</span></div>
<divclass="line"><aid="l00139"name="l00139"></a><spanclass="lineno"> 139</span><spanclass="comment">/* Send "frame" to all participants</span></div>
<divclass="line"><aid="l00141"name="l00141"></a><spanclass="lineno"> 141</span><spanclass="comment"> * These routines will convert all necessary fields to network byte order</span></div>
<divclass="line"><aid="l00143"name="l00143"></a><spanclass="lineno"> 143</span><spanclass="comment"> * Return RTP_OK on success</span></div>
<divclass="line"><aid="l00144"name="l00144"></a><spanclass="lineno"> 144</span><spanclass="comment"> * Return RTP_INVALID_VALUE if "frame" is in some way invalid</span></div>
<divclass="line"><aid="l00145"name="l00145"></a><spanclass="lineno"> 145</span><spanclass="comment"> * Return RTP_SEND_ERROR if sending "frame" did not succeed (see socket.hh for details) */</span></div>
<divclass="line"><aid="l00189"name="l00189"></a><spanclass="lineno"> 189</span><spanclass="comment">/* Return the latest RTCP packet received from participant of "ssrc"</span></div>
<divclass="line"><aid="l00190"name="l00190"></a><spanclass="lineno"> 190</span><spanclass="comment"> * Return nullptr if we haven't received this kind of packet or if "ssrc" doesn't exist</span></div>
<divclass="line"><aid="l00192"name="l00192"></a><spanclass="lineno"> 192</span><spanclass="comment"> * NOTE: Caller is responsible for deallocating the memory */</span></div>
<divclass="line"><aid="l00198"name="l00198"></a><spanclass="lineno"> 198</span><spanclass="comment">/* Somebody joined the multicast group the owner of this RTCP instance is part of</span></div>
<divclass="line"><aid="l00199"name="l00199"></a><spanclass="lineno"> 199</span><spanclass="comment"> * Add it to RTCP participant list so we can start listening for reports</span></div>
<divclass="line"><aid="l00201"name="l00201"></a><spanclass="lineno"> 201</span><spanclass="comment"> * "clock_rate" tells how much the RTP timestamp advances, this information is needed</span></div>
<divclass="line"><aid="l00202"name="l00202"></a><spanclass="lineno"> 202</span><spanclass="comment"> * to calculate the interarrival jitter correctly. It has nothing do with our clock rate,</span></div>
<divclass="line"><aid="l00203"name="l00203"></a><spanclass="lineno"> 203</span><spanclass="comment"> * (or whether we're even sending anything)</span></div>
<divclass="line"><aid="l00205"name="l00205"></a><spanclass="lineno"> 205</span><spanclass="comment"> * Return RTP_OK on success and RTP_ERROR on error */</span></div>
<divclass="line"><aid="l00208"name="l00208"></a><spanclass="lineno"> 208</span><spanclass="comment">/* Functions for updating various RTP sender statistics */</span></div>
<divclass="line"><aid="l00211"name="l00211"></a><spanclass="lineno"> 211</span><spanclass="comment">/* If we've detected that our SSRC has collided with someone else's SSRC, we need to</span></div>
<divclass="line"><aid="l00212"name="l00212"></a><spanclass="lineno"> 212</span><spanclass="comment"> * generate new random SSRC and reinitialize our own RTCP state.</span></div>
<divclass="line"><aid="l00213"name="l00213"></a><spanclass="lineno"> 213</span><spanclass="comment"> * RTCP object still has the participants of "last session", we can use their SSRCs</span></div>
<divclass="line"><aid="l00214"name="l00214"></a><spanclass="lineno"> 214</span><spanclass="comment"> * to detected new collision</span></div>
<divclass="line"><aid="l00216"name="l00216"></a><spanclass="lineno"> 216</span><spanclass="comment"> * Return RTP_OK if reinitialization succeeded</span></div>
<divclass="line"><aid="l00217"name="l00217"></a><spanclass="lineno"> 217</span><spanclass="comment"> * Return RTP_SSRC_COLLISION if our new SSRC has collided and we need to generate new SSRC */</span></div>
<divclass="line"><aid="l00223"name="l00223"></a><spanclass="lineno"> 223</span><spanclass="comment">/* Getter for interval_ms_, which is calculated by set_session_bandwidth */</span></div>
<divclass="line"><aid="l00226"name="l00226"></a><spanclass="lineno"> 226</span><spanclass="comment">/* Set RTCP packet transmission interval in milliseconds</span></div>
<divclass="line"><aid="l00228"name="l00228"></a><spanclass="lineno"> 228</span><spanclass="comment"> * Return RTP_OK if interval was set successfully</span></div>
<divclass="line"><aid="l00229"name="l00229"></a><spanclass="lineno"> 229</span><spanclass="comment"> * Return RTP_INVALID_VALUE if new interval is invalid */</span></div>
<divclass="line"><aid="l00232"name="l00232"></a><spanclass="lineno"> 232</span><spanclass="comment">/* Set total bandwidth for this session, called at the start </span></div>
<divclass="line"><aid="l00233"name="l00233"></a><spanclass="lineno"> 233</span><spanclass="comment"> * If you want to set the interval manually later, use</span></div>
<divclass="line"><aid="l00234"name="l00234"></a><spanclass="lineno"> 234</span><spanclass="comment"> * set_rtcp_interval_ms() function */</span></div>
<divclass="line"><aid="l00239"name="l00239"></a><spanclass="lineno"> 239</span><spanclass="comment">/* Store the following info in RTCP</span></div>
<divclass="line"><aid="l00240"name="l00240"></a><spanclass="lineno"> 240</span><spanclass="comment"> * Local IP address</span></div>
<divclass="line"><aid="l00241"name="l00241"></a><spanclass="lineno"> 241</span><spanclass="comment"> * Remote IP address</span></div>
<divclass="line"><aid="l00242"name="l00242"></a><spanclass="lineno"> 242</span><spanclass="comment"> * Local port number for RTCP</span></div>
<divclass="line"><aid="l00243"name="l00243"></a><spanclass="lineno"> 243</span><spanclass="comment"> * Destination port number for RTCP</span></div>
<divclass="line"><aid="l00244"name="l00244"></a><spanclass="lineno"> 244</span><spanclass="comment"> * These are used when adding new participants and creating sockets for them */</span></div>
<divclass="line"><aid="l00249"name="l00249"></a><spanclass="lineno"> 249</span><spanclass="comment">/* Return SSRCs of all participants */</span></div>
<divclass="line"><aid="l00269"name="l00269"></a><spanclass="lineno"> 269</span><spanclass="comment">/* Alternate way to get RTCP packets is to install a hook for them. So instead of</span></div>
<divclass="line"><aid="l00270"name="l00270"></a><spanclass="lineno"> 270</span><spanclass="comment"> * polling an RTCP packet, user can install a function that is called when</span></div>
<divclass="line"><aid="l00271"name="l00271"></a><spanclass="lineno"> 271</span><spanclass="comment"> * a specific RTCP packet is received. */</span></div>
<divclass="line"><aid="l00370"name="l00370"></a><spanclass="lineno"> 370</span><spanclass="comment">// These have been replaced by functions with unique_ptr in them</span></div>
<divclass="line"><aid="l00410"name="l00410"></a><spanclass="lineno"> 410</span><spanclass="comment">// the length field is the rtcp packet size measured in 32-bit words - 1</span></div>
<divclass="line"><aid="l00426"name="l00426"></a><spanclass="lineno"> 426</span><spanclass="comment">/* read the header values from rtcp packet */</span></div>
<divclass="line"><aid="l00434"name="l00434"></a><spanclass="lineno"> 434</span><spanclass="comment">/* Handle different kinds of incoming rtcp packets. The read header is passed to functions</span></div>
<divclass="line"><aid="l00435"name="l00435"></a><spanclass="lineno"> 435</span><spanclass="comment"> which read rest of the frame type specific data.</span></div>
<divclass="line"><aid="l00436"name="l00436"></a><spanclass="lineno"> 436</span><spanclass="comment"> * Return RTP_OK on success and RTP_ERROR on error */</span></div>
<divclass="line"><aid="l00452"name="l00452"></a><spanclass="lineno"> 452</span><spanclass="comment">/* when we start the RTCP instance, we don't know what the SSRC of the remote is</span></div>
<divclass="line"><aid="l00453"name="l00453"></a><spanclass="lineno"> 453</span><spanclass="comment"> * when an RTP packet is received, we must check if we've already received a packet</span></div>
<divclass="line"><aid="l00454"name="l00454"></a><spanclass="lineno"> 454</span><spanclass="comment"> * from this sender and if not, create new entry to receiver_stats_ map */</span></div>
<divclass="line"><aid="l00458"name="l00458"></a><spanclass="lineno"> 458</span><spanclass="comment">/* When we receive an RTP or RTCP packet, we need to check the source address and see if it's</span></div>
<divclass="line"><aid="l00459"name="l00459"></a><spanclass="lineno"> 459</span><spanclass="comment"> * the same address where we've received packets before.</span></div>
<divclass="line"><aid="l00461"name="l00461"></a><spanclass="lineno"> 461</span><spanclass="comment"> * If the address is new, it means we have detected an SSRC collision and the paket should</span></div>
<divclass="line"><aid="l00462"name="l00462"></a><spanclass="lineno"> 462</span><spanclass="comment"> * be dropped We also need to check whether this SSRC matches with our own SSRC and if it does</span></div>
<divclass="line"><aid="l00463"name="l00463"></a><spanclass="lineno"> 463</span><spanclass="comment"> * we need to send RTCP BYE and rejoin to the session */</span></div>
<divclass="line"><aid="l00466"name="l00466"></a><spanclass="lineno"> 466</span><spanclass="comment">/* Move participant from initial_peers_ to participants_ */</span></div>
<divclass="line"><aid="l00469"name="l00469"></a><spanclass="lineno"> 469</span><spanclass="comment">/* We've got a message from new source (the SSRC of the frame is not known to us)</span></div>
<divclass="line"><aid="l00470"name="l00470"></a><spanclass="lineno"> 470</span><spanclass="comment"> * Initialize statistics for the peer and move it to participants_ */</span></div>
<divclass="line"><aid="l00473"name="l00473"></a><spanclass="lineno"> 473</span><spanclass="comment">/* Initialize the RTP Sequence related stuff of peer</span></div>
<divclass="line"><aid="l00474"name="l00474"></a><spanclass="lineno"> 474</span><spanclass="comment"> * This function assumes that the peer already exists in the participants_ map */</span></div>
<divclass="line"><aid="l00477"name="l00477"></a><spanclass="lineno"> 477</span><spanclass="comment">/* Update the SSRC's sequence related data in participants_ map</span></div>
<divclass="line"><aid="l00479"name="l00479"></a><spanclass="lineno"> 479</span><spanclass="comment"> * Return RTP_OK if the received packet was OK</span></div>
<divclass="line"><aid="l00480"name="l00480"></a><spanclass="lineno"> 480</span><spanclass="comment"> * Return RTP_GENERIC_ERROR if it wasn't and</span></div>
<divclass="line"><aid="l00481"name="l00481"></a><spanclass="lineno"> 481</span><spanclass="comment"> * packet-related statistics should not be updated */</span></div>
<divclass="line"><aid="l00486"name="l00486"></a><spanclass="lineno"> 486</span><spanclass="comment"> * "pkt_size" tells how much rtcp_byte_count_</span></div>
<divclass="line"><aid="l00487"name="l00487"></a><spanclass="lineno"> 487</span><spanclass="comment"> * should be increased before calculating the new average */</span></div>
<divclass="line"><aid="l00490"name="l00490"></a><spanclass="lineno"> 490</span><spanclass="comment">/* Update average RTCP packet size variable</span></div>
<divclass="line"><aid="l00491"name="l00491"></a><spanclass="lineno"> 491</span><spanclass="comment"> * packet_size is the size of received RTCP packet in octets */</span></div>
<divclass="line"><aid="l00494"name="l00494"></a><spanclass="lineno"> 494</span><spanclass="comment">/* Calculate the RTCP report interval in seconds</span></div>
<divclass="line"><aid="l00495"name="l00495"></a><spanclass="lineno"> 495</span><spanclass="comment"> * rtcp_bw is given in kbps</span></div>
<divclass="line"><aid="l00496"name="l00496"></a><spanclass="lineno"> 496</span><spanclass="comment"> * Defined in RFC3550 Appendix A.7 */</span></div>
<divclass="line"><aid="l00500"name="l00500"></a><spanclass="lineno"> 500</span><spanclass="comment">/* RTCP runner keeps track of ssrcs and how long they have been silent.</span></div>
<divclass="line"><aid="l00501"name="l00501"></a><spanclass="lineno"> 501</span><spanclass="comment"> * By default a source get timed out if it has been silent for 25 seconds</span></div>
<divclass="line"><aid="l00502"name="l00502"></a><spanclass="lineno"> 502</span><spanclass="comment"> * If an ssrc is timed out, this function removes it from participants_ map and</span></div>
<divclass="line"><aid="l00503"name="l00503"></a><spanclass="lineno"> 503</span><spanclass="comment"> * updates any other infos */</span></div>
<divclass="line"><aid="l00506"name="l00506"></a><spanclass="lineno"> 506</span><spanclass="comment">/* Because struct statistics contains uvgRTP clock object we cannot</span></div>
<divclass="line"><aid="l00507"name="l00507"></a><spanclass="lineno"> 507</span><spanclass="comment"> * zero it out without compiler complaining about it so all the fields</span></div>
<divclass="line"><aid="l00508"name="l00508"></a><spanclass="lineno"> 508</span><spanclass="comment"> * must be set to zero manually */</span></div>
<divclass="line"><aid="l00526"name="l00526"></a><spanclass="lineno"> 526</span><spanclass="comment">/* are we a sender (and possible a receiver) or just a receiver */</span></div>
<divclass="line"><aid="l00530"name="l00530"></a><spanclass="lineno"> 530</span><spanclass="comment">// TODO: Check these, they don't seem to be used</span></div>
<divclass="line"><aid="l00531"name="l00531"></a><spanclass="lineno"> 531</span><spanclass="keywordtype">size_t</span> tp_; <spanclass="comment">/* the last time an RTCP packet was transmitted */</span></div>
<divclass="line"><aid="l00532"name="l00532"></a><spanclass="lineno"> 532</span><spanclass="keywordtype">size_t</span> tc_; <spanclass="comment">/* the current time */</span></div>
<divclass="line"><aid="l00533"name="l00533"></a><spanclass="lineno"> 533</span><spanclass="keywordtype">size_t</span> tn_; <spanclass="comment">/* the next scheduled transmission time of an RTCP packet */</span></div>
<divclass="line"><aid="l00534"name="l00534"></a><spanclass="lineno"> 534</span><spanclass="keywordtype">size_t</span> pmembers_; <spanclass="comment">/* the estimated number of session members at the time tn was last recomputed */</span></div>
<divclass="line"><aid="l00535"name="l00535"></a><spanclass="lineno"> 535</span><spanclass="keywordtype">size_t</span> members_; <spanclass="comment">/* the most current estimate for the number of session members */</span></div>
<divclass="line"><aid="l00536"name="l00536"></a><spanclass="lineno"> 536</span><spanclass="keywordtype">size_t</span> senders_; <spanclass="comment">/* the most current estimate for the number of senders in the session */</span></div>
<divclass="line"><aid="l00538"name="l00538"></a><spanclass="lineno"> 538</span><spanclass="comment">/* Total session bandwidth. RTCP bandwidth will be set to 5 % of this */</span></div>
<divclass="line"><aid="l00541"name="l00541"></a><spanclass="lineno"> 541</span><spanclass="comment">/* The target RTCP bandwidth, i.e., the total bandwidth</span></div>
<divclass="line"><aid="l00542"name="l00542"></a><spanclass="lineno"> 542</span><spanclass="comment"> * that will be used for RTCP packets by all members of this session,</span></div>
<divclass="line"><aid="l00543"name="l00543"></a><spanclass="lineno"> 543</span><spanclass="comment"> * in octets per second. This will be a specified fraction of the</span></div>
<divclass="line"><aid="l00544"name="l00544"></a><spanclass="lineno"> 544</span><spanclass="comment"> * "session bandwidth" parameter supplied to the application at startup. */</span></div>
<divclass="line"><aid="l00547"name="l00547"></a><spanclass="lineno"> 547</span><spanclass="comment">/* "Minimum" value for RTCP transmission interval, depends on the session bandwidth</span></div>
<divclass="line"><aid="l00548"name="l00548"></a><spanclass="lineno"> 548</span><spanclass="comment"> * Actual interval can be 50 % smaller due to randomisation */</span></div>
<divclass="line"><aid="l00551"name="l00551"></a><spanclass="lineno"> 551</span><spanclass="comment">/* Flag that is true if the application has sent data since</span></div>
<divclass="line"><aid="l00552"name="l00552"></a><spanclass="lineno"> 552</span><spanclass="comment"> * the 2nd previous RTCP report was transmitted. */</span></div>
<divclass="line"><aid="l00553"name="l00553"></a><spanclass="lineno"> 553</span><spanclass="comment">// TODO: Only set, never read</span></div>
<divclass="line"><aid="l00556"name="l00556"></a><spanclass="lineno"> 556</span><spanclass="comment">/* Store sender and receiver info, this is needed when calling </span></div>
<divclass="line"><aid="l00557"name="l00557"></a><spanclass="lineno"> 557</span><spanclass="comment"> * add_participant dynamically (i.e. after initializing the stream) */</span></div>
<divclass="line"><aid="l00563"name="l00563"></a><spanclass="lineno"> 563</span><spanclass="comment">/* The average compound RTCP packet size, in octets,</span></div>
<divclass="line"><aid="l00564"name="l00564"></a><spanclass="lineno"> 564</span><spanclass="comment"> * over all RTCP packets sent and received by this participant. The</span></div>
<divclass="line"><aid="l00565"name="l00565"></a><spanclass="lineno"> 565</span><spanclass="comment"> * size includes lower-layer transport and network protocol headers</span></div>
<divclass="line"><aid="l00566"name="l00566"></a><spanclass="lineno"> 566</span><spanclass="comment"> * (e.g., UDP and IP) as explained in Section 6.2 */</span></div>
<divclass="line"><aid="l00567"name="l00567"></a><spanclass="lineno"> 567</span><spanclass="comment">// TODO: Only set, never read</span></div>
<divclass="line"><aid="l00570"name="l00570"></a><spanclass="lineno"> 570</span><spanclass="comment">/* Average RTCP packet size in octets.</span></div>
<divclass="line"><aid="l00571"name="l00571"></a><spanclass="lineno"> 571</span><spanclass="comment"> * Initialized to 64 */</span></div>
<divclass="line"><aid="l00574"name="l00574"></a><spanclass="lineno"> 574</span><spanclass="comment">/* Number of RTCP packets and bytes sent and received by this participant */</span></div>
<divclass="line"><aid="l00575"name="l00575"></a><spanclass="lineno"> 575</span><spanclass="comment">// TODO: Only set, never read</span></div>
<divclass="line"><aid="l00582"name="l00582"></a><spanclass="lineno"> 582</span><spanclass="comment">/* Flag that is true if the application has not yet sent an RTCP packet. */</span></div>
<divclass="line"><aid="l00583"name="l00583"></a><spanclass="lineno"> 583</span><spanclass="comment">// TODO: Only set, never read</span></div>
<divclass="line"><aid="l00592"name="l00592"></a><spanclass="lineno"> 592</span><spanclass="comment">/* Clock rate of the media ie. how fast does the time increase */</span></div>
<divclass="line"><aid="l00595"name="l00595"></a><spanclass="lineno"> 595</span><spanclass="comment">/* The first value of RTP timestamp (aka t = 0) */</span></div>
<divclass="line"><aid="l00599"name="l00599"></a><spanclass="lineno"> 599</span> uint8_t num_receivers_; <spanclass="comment">// maximum is 32 at the moment (5 bits)</span></div>
<divclass="line"><aid="l00601"name="l00601"></a><spanclass="lineno"> 601</span><spanclass="comment">/* Address of the socket that we are sending data to */</span></div>
<divclass="line"><aid="l00605"name="l00605"></a><spanclass="lineno"> 605</span><spanclass="comment">/* Map for keeping track of sources for timeouts</span></div>
<divclass="line"><aid="l00606"name="l00606"></a><spanclass="lineno"> 606</span><spanclass="comment"> * First number is the sources ssrc</span></div>
<divclass="line"><aid="l00607"name="l00607"></a><spanclass="lineno"> 607</span><spanclass="comment"> * Second number is how many milliseconds it has been silent*/</span></div>
<divclass="line"><aid="l00610"name="l00610"></a><spanclass="lineno"> 610</span><spanclass="comment">/* statistics for RTCP Sender and Receiver Reports */</span></div>
<divclass="line"><aid="l00613"name="l00613"></a><spanclass="lineno"> 613</span><spanclass="comment">/* If we expect frames from remote but haven't received anything from remote yet,</span></div>
<divclass="line"><aid="l00614"name="l00614"></a><spanclass="lineno"> 614</span><spanclass="comment"> * the participant resides in this vector until he's moved to participants_ */</span></div>
<divclass="line"><aid="l00661"name="l00661"></a><spanclass="lineno"> 661</span> std::map<std::string, std::deque<rtcp_app_packet>> app_packets_; <spanclass="comment">// sent one at a time per name</span></div>
<divclass="line"><aid="l00662"name="l00662"></a><spanclass="lineno"> 662</span><spanclass="comment">// APPs for hook</span></div>
<divclass="ttc"id="aclassuvgrtp_1_1rtcp_html"><divclass="ttname"><ahref="classuvgrtp_1_1rtcp.html">uvgrtp::rtcp</a></div><divclass="ttdoc">RTCP instance handles all incoming and outgoing RTCP traffic, including report generation.</div><divclass="ttdef"><b>Definition:</b><ahref="rtcp_8hh_source.html#l00111">rtcp.hh:111</a></div></div>
<divclass="ttc"id="aclassuvgrtp_1_1rtcp_html_a81198428cc697c0c7cbb2a4191f294d8"><divclass="ttname"><ahref="classuvgrtp_1_1rtcp.html#a81198428cc697c0c7cbb2a4191f294d8">uvgrtp::rtcp::remove_all_hooks</a></div><divclass="ttdeci">rtp_error_t remove_all_hooks()</div><divclass="ttdoc">Remove all installed hooks for RTCP.</div></div>
<divclass="ttc"id="aclassuvgrtp_1_1rtcp_html_ad62ad1cc01e3d0808ac8254ce30756a1"><divclass="ttname"><ahref="classuvgrtp_1_1rtcp.html#ad62ad1cc01e3d0808ac8254ce30756a1">uvgrtp::rtcp::install_send_app_hook</a></div><divclass="ttdeci">rtp_error_t install_send_app_hook(std::string app_name, std::function< std::unique_ptr< uint8_t[]>(uint8_t &subtype, uint32_t &payload_len)> app_sending_func)</div><divclass="ttdoc">Install hook for one type of APP packets.</div></div>
<divclass="ttc"id="astructuvgrtp_1_1frame_1_1rtcp__header_html"><divclass="ttname"><ahref="structuvgrtp_1_1frame_1_1rtcp__header.html">uvgrtp::frame::rtcp_header</a></div><divclass="ttdoc">Header of for all RTCP packets defined in RFC 3550 section 6</div><divclass="ttdef"><b>Definition:</b><ahref="frame_8hh_source.html#l00074">frame.hh:74</a></div></div>