<divclass="line"><aid="l00030"name="l00030"></a><spanclass="lineno"> 30</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="l00040"name="l00040"></a><spanclass="lineno"> 40</span> uint32_t sent_pkts = 0; <spanclass="comment">/* Number of sent RTP packets */</span></div>
<divclass="line"><aid="l00041"name="l00041"></a><spanclass="lineno"> 41</span> uint32_t sent_bytes = 0; <spanclass="comment">/* Number of sent bytes excluding RTP Header */</span></div>
<divclass="line"><aid="l00042"name="l00042"></a><spanclass="lineno"> 42</span><spanclass="keywordtype">bool</span> sent_rtp_packet = <spanclass="keyword">false</span>; <spanclass="comment">// since last report</span></div>
<divclass="line"><aid="l00047"name="l00047"></a><spanclass="lineno"> 47</span> uint32_t received_pkts = 0; <spanclass="comment">/* Number of packets received */</span></div>
<divclass="line"><aid="l00048"name="l00048"></a><spanclass="lineno"> 48</span> uint32_t lost_pkts = 0; <spanclass="comment">/* Number of dropped RTP packets */</span></div>
<divclass="line"><aid="l00049"name="l00049"></a><spanclass="lineno"> 49</span> uint32_t received_bytes = 0; <spanclass="comment">/* Number of bytes received excluding RTP Header */</span></div>
<divclass="line"><aid="l00050"name="l00050"></a><spanclass="lineno"> 50</span><spanclass="keywordtype">bool</span> received_rtp_packet = <spanclass="keyword">false</span>; <spanclass="comment">// since last report</span></div>
<divclass="line"><aid="l00052"name="l00052"></a><spanclass="lineno"> 52</span> uint32_t expected_pkts = 0; <spanclass="comment">/* Number of expected packets */</span></div>
<divclass="line"><aid="l00053"name="l00053"></a><spanclass="lineno"> 53</span> uint32_t received_prior = 0; <spanclass="comment">/* Number of received packets in last report */</span></div>
<divclass="line"><aid="l00054"name="l00054"></a><spanclass="lineno"> 54</span> uint32_t expected_prior = 0; <spanclass="comment">/* Number of expected packets in last report */</span></div>
<divclass="line"><aid="l00056"name="l00056"></a><spanclass="lineno"> 56</span><spanclass="keywordtype">double</span> jitter = 0; <spanclass="comment">/* The estimation of jitter (see RFC 3550 A.8) */</span></div>
<divclass="line"><aid="l00060"name="l00060"></a><spanclass="lineno"> 60</span><spanclass="comment">/* Receiver clock related stuff */</span></div>
<divclass="line"><aid="l00061"name="l00061"></a><spanclass="lineno"> 61</span> uint64_t initial_ntp = 0; <spanclass="comment">/* Wallclock reading when the first RTP packet was received */</span></div>
<divclass="line"><aid="l00062"name="l00062"></a><spanclass="lineno"> 62</span> uint32_t initial_rtp = 0; <spanclass="comment">/* RTP timestamp of the first RTP packet received */</span></div>
<divclass="line"><aid="l00063"name="l00063"></a><spanclass="lineno"> 63</span> uint32_t clock_rate = 0; <spanclass="comment">/* Rate of the clock (used for jitter calculations) */</span></div>
<divclass="line"><aid="l00065"name="l00065"></a><spanclass="lineno"> 65</span> uint32_t lsr = 0; <spanclass="comment">/* Middle 32 bits of the 64-bit NTP timestamp of previous SR */</span></div>
<divclass="line"><aid="l00066"name="l00066"></a><spanclass="lineno"> 66</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="l00068"name="l00068"></a><spanclass="lineno"> 68</span> uint16_t max_seq = 0; <spanclass="comment">/* Highest sequence number received */</span></div>
<divclass="line"><aid="l00069"name="l00069"></a><spanclass="lineno"> 69</span> uint32_t base_seq = 0; <spanclass="comment">/* First sequence number received */</span></div>
<divclass="line"><aid="l00077"name="l00077"></a><spanclass="lineno"> 77</span> uint32_t probation = 0; <spanclass="comment">/* has the participant been fully accepted to the session */</span></div>
<divclass="line"><aid="l00078"name="l00078"></a><spanclass="lineno"> 78</span><spanclass="keywordtype">int</span> role = 0; <spanclass="comment">/* is the participant a sender or a receiver */</span></div>
<divclass="line"><aid="l00080"name="l00080"></a><spanclass="lineno"> 80</span><spanclass="comment">/* Save the latest RTCP packets received from this participant</span></div>
<divclass="line"><aid="l00081"name="l00081"></a><spanclass="lineno"> 81</span><spanclass="comment"> * Users can query these packets using the SSRC of participant */</span></div>
<divclass="line"><aid="l00127"name="l00127"></a><spanclass="lineno"> 127</span><spanclass="comment"> * return RTP_OK on success and RTP_MEMORY_ERROR if the allocation fails */</span></div>
<divclass="line"><aid="l00130"name="l00130"></a><spanclass="lineno"> 130</span><spanclass="comment">/* End the RTCP session and send RTCP BYE to all participants</span></div>
<divclass="line"><aid="l00135"name="l00135"></a><spanclass="lineno"> 135</span><spanclass="comment">/* Generate either RTCP Sender or Receiver report and sent it to all participants</span></div>
<divclass="line"><aid="l00136"name="l00136"></a><spanclass="lineno"> 136</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">/* Handle incoming RTCP packet (first make sure it's a valid RTCP packet)</span></div>
<divclass="line"><aid="l00140"name="l00140"></a><spanclass="lineno"> 140</span><spanclass="comment"> * This function will call one of the above functions internally</span></div>
<divclass="line"><aid="l00142"name="l00142"></a><spanclass="lineno"> 142</span><spanclass="comment"> * Return RTP_OK on success and RTP_ERROR on error */</span></div>
<divclass="line"><aid="l00146"name="l00146"></a><spanclass="lineno"> 146</span><spanclass="comment">/* Send "frame" to all participants</span></div>
<divclass="line"><aid="l00148"name="l00148"></a><spanclass="lineno"> 148</span><spanclass="comment"> * These routines will convert all necessary fields to network byte order</span></div>
<divclass="line"><aid="l00150"name="l00150"></a><spanclass="lineno"> 150</span><spanclass="comment"> * Return RTP_OK on success</span></div>
<divclass="line"><aid="l00151"name="l00151"></a><spanclass="lineno"> 151</span><spanclass="comment"> * Return RTP_INVALID_VALUE if "frame" is in some way invalid</span></div>
<divclass="line"><aid="l00152"name="l00152"></a><spanclass="lineno"> 152</span><spanclass="comment"> * Return RTP_SEND_ERROR if sending "frame" did not succeed (see socket.hh for details) */</span></div>
<divclass="line"><aid="l00196"name="l00196"></a><spanclass="lineno"> 196</span><spanclass="comment">/* Return the latest RTCP packet received from participant of "ssrc"</span></div>
<divclass="line"><aid="l00197"name="l00197"></a><spanclass="lineno"> 197</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="l00199"name="l00199"></a><spanclass="lineno"> 199</span><spanclass="comment"> * NOTE: Caller is responsible for deallocating the memory */</span></div>
<divclass="line"><aid="l00205"name="l00205"></a><spanclass="lineno"> 205</span><spanclass="comment">/* Somebody joined the multicast group the owner of this RTCP instance is part of</span></div>
<divclass="line"><aid="l00206"name="l00206"></a><spanclass="lineno"> 206</span><spanclass="comment"> * Add it to RTCP participant list so we can start listening for reports</span></div>
<divclass="line"><aid="l00208"name="l00208"></a><spanclass="lineno"> 208</span><spanclass="comment"> * "clock_rate" tells how much the RTP timestamp advances, this information is needed</span></div>
<divclass="line"><aid="l00209"name="l00209"></a><spanclass="lineno"> 209</span><spanclass="comment"> * to calculate the interarrival jitter correctly. It has nothing do with our clock rate,</span></div>
<divclass="line"><aid="l00210"name="l00210"></a><spanclass="lineno"> 210</span><spanclass="comment"> * (or whether we're even sending anything)</span></div>
<divclass="line"><aid="l00212"name="l00212"></a><spanclass="lineno"> 212</span><spanclass="comment"> * Return RTP_OK on success and RTP_ERROR on error */</span></div>
<divclass="line"><aid="l00215"name="l00215"></a><spanclass="lineno"> 215</span><spanclass="comment">/* Functions for updating various RTP sender statistics */</span></div>
<divclass="line"><aid="l00218"name="l00218"></a><spanclass="lineno"> 218</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="l00219"name="l00219"></a><spanclass="lineno"> 219</span><spanclass="comment"> * generate new random SSRC and reinitialize our own RTCP state.</span></div>
<divclass="line"><aid="l00220"name="l00220"></a><spanclass="lineno"> 220</span><spanclass="comment"> * RTCP object still has the participants of "last session", we can use their SSRCs</span></div>
<divclass="line"><aid="l00221"name="l00221"></a><spanclass="lineno"> 221</span><spanclass="comment"> * to detected new collision</span></div>
<divclass="line"><aid="l00223"name="l00223"></a><spanclass="lineno"> 223</span><spanclass="comment"> * Return RTP_OK if reinitialization succeeded</span></div>
<divclass="line"><aid="l00224"name="l00224"></a><spanclass="lineno"> 224</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="l00230"name="l00230"></a><spanclass="lineno"> 230</span><spanclass="comment">/* Getter for interval_ms_, which is calculated by set_session_bandwidth */</span></div>
<divclass="line"><aid="l00233"name="l00233"></a><spanclass="lineno"> 233</span><spanclass="comment">/* Set RTCP packet transmission interval in milliseconds</span></div>
<divclass="line"><aid="l00235"name="l00235"></a><spanclass="lineno"> 235</span><spanclass="comment"> * Return RTP_OK if interval was set successfully</span></div>
<divclass="line"><aid="l00236"name="l00236"></a><spanclass="lineno"> 236</span><spanclass="comment"> * Return RTP_INVALID_VALUE if new interval is invalid */</span></div>
<divclass="line"><aid="l00239"name="l00239"></a><spanclass="lineno"> 239</span><spanclass="comment">/* Set total bandwidth for this session, called at the start </span></div>
<divclass="line"><aid="l00240"name="l00240"></a><spanclass="lineno"> 240</span><spanclass="comment"> * If you want to set the interval manually later, use</span></div>
<divclass="line"><aid="l00241"name="l00241"></a><spanclass="lineno"> 241</span><spanclass="comment"> * set_rtcp_interval_ms() function */</span></div>
<divclass="line"><aid="l00246"name="l00246"></a><spanclass="lineno"> 246</span><spanclass="comment">/* Store the following info in RTCP</span></div>
<divclass="line"><aid="l00247"name="l00247"></a><spanclass="lineno"> 247</span><spanclass="comment"> * Local IP address</span></div>
<divclass="line"><aid="l00248"name="l00248"></a><spanclass="lineno"> 248</span><spanclass="comment"> * Remote IP address</span></div>
<divclass="line"><aid="l00249"name="l00249"></a><spanclass="lineno"> 249</span><spanclass="comment"> * Local port number for RTCP</span></div>
<divclass="line"><aid="l00250"name="l00250"></a><spanclass="lineno"> 250</span><spanclass="comment"> * Destination port number for RTCP</span></div>
<divclass="line"><aid="l00251"name="l00251"></a><spanclass="lineno"> 251</span><spanclass="comment"> * These are used when adding new participants and creating sockets for them */</span></div>
<divclass="line"><aid="l00256"name="l00256"></a><spanclass="lineno"> 256</span><spanclass="comment">/* Return SSRCs of all participants */</span></div>
<divclass="line"><aid="l00276"name="l00276"></a><spanclass="lineno"> 276</span><spanclass="comment">/* Alternate way to get RTCP packets is to install a hook for them. So instead of</span></div>
<divclass="line"><aid="l00277"name="l00277"></a><spanclass="lineno"> 277</span><spanclass="comment"> * polling an RTCP packet, user can install a function that is called when</span></div>
<divclass="line"><aid="l00278"name="l00278"></a><spanclass="lineno"> 278</span><spanclass="comment"> * a specific RTCP packet is received. */</span></div>
<divclass="line"><aid="l00377"name="l00377"></a><spanclass="lineno"> 377</span><spanclass="comment">// These have been replaced by functions with unique_ptr in them</span></div>
<divclass="line"><aid="l00417"name="l00417"></a><spanclass="lineno"> 417</span><spanclass="comment">// the length field is the rtcp packet size measured in 32-bit words - 1</span></div>
<divclass="line"><aid="l00433"name="l00433"></a><spanclass="lineno"> 433</span><spanclass="comment">/* read the header values from rtcp packet */</span></div>
<divclass="line"><aid="l00441"name="l00441"></a><spanclass="lineno"> 441</span><spanclass="comment">/* Handle different kinds of incoming rtcp packets. The read header is passed to functions</span></div>
<divclass="line"><aid="l00442"name="l00442"></a><spanclass="lineno"> 442</span><spanclass="comment"> which read rest of the frame type specific data.</span></div>
<divclass="line"><aid="l00443"name="l00443"></a><spanclass="lineno"> 443</span><spanclass="comment"> * Return RTP_OK on success and RTP_ERROR on error */</span></div>
<divclass="line"><aid="l00459"name="l00459"></a><spanclass="lineno"> 459</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="l00460"name="l00460"></a><spanclass="lineno"> 460</span><spanclass="comment"> * when an RTP packet is received, we must check if we've already received a packet</span></div>
<divclass="line"><aid="l00461"name="l00461"></a><spanclass="lineno"> 461</span><spanclass="comment"> * from this sender and if not, create new entry to receiver_stats_ map */</span></div>
<divclass="line"><aid="l00465"name="l00465"></a><spanclass="lineno"> 465</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="l00466"name="l00466"></a><spanclass="lineno"> 466</span><spanclass="comment"> * the same address where we've received packets before.</span></div>
<divclass="line"><aid="l00468"name="l00468"></a><spanclass="lineno"> 468</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="l00469"name="l00469"></a><spanclass="lineno"> 469</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="l00470"name="l00470"></a><spanclass="lineno"> 470</span><spanclass="comment"> * we need to send RTCP BYE and rejoin to the session */</span></div>
<divclass="line"><aid="l00473"name="l00473"></a><spanclass="lineno"> 473</span><spanclass="comment">/* Move participant from initial_peers_ to participants_ */</span></div>
<divclass="line"><aid="l00476"name="l00476"></a><spanclass="lineno"> 476</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="l00477"name="l00477"></a><spanclass="lineno"> 477</span><spanclass="comment"> * Initialize statistics for the peer and move it to participants_ */</span></div>
<divclass="line"><aid="l00480"name="l00480"></a><spanclass="lineno"> 480</span><spanclass="comment">/* Initialize the RTP Sequence related stuff of peer</span></div>
<divclass="line"><aid="l00481"name="l00481"></a><spanclass="lineno"> 481</span><spanclass="comment"> * This function assumes that the peer already exists in the participants_ map */</span></div>
<divclass="line"><aid="l00484"name="l00484"></a><spanclass="lineno"> 484</span><spanclass="comment">/* Update the SSRC's sequence related data in participants_ map</span></div>
<divclass="line"><aid="l00486"name="l00486"></a><spanclass="lineno"> 486</span><spanclass="comment"> * Return RTP_OK if the received packet was OK</span></div>
<divclass="line"><aid="l00487"name="l00487"></a><spanclass="lineno"> 487</span><spanclass="comment"> * Return RTP_GENERIC_ERROR if it wasn't and</span></div>
<divclass="line"><aid="l00488"name="l00488"></a><spanclass="lineno"> 488</span><spanclass="comment"> * packet-related statistics should not be updated */</span></div>
<divclass="line"><aid="l00493"name="l00493"></a><spanclass="lineno"> 493</span><spanclass="comment"> * "pkt_size" tells how much rtcp_byte_count_</span></div>
<divclass="line"><aid="l00494"name="l00494"></a><spanclass="lineno"> 494</span><spanclass="comment"> * should be increased before calculating the new average */</span></div>
<divclass="line"><aid="l00497"name="l00497"></a><spanclass="lineno"> 497</span><spanclass="comment">/* Update average RTCP packet size variable</span></div>
<divclass="line"><aid="l00498"name="l00498"></a><spanclass="lineno"> 498</span><spanclass="comment"> * packet_size is the size of received RTCP packet in octets */</span></div>
<divclass="line"><aid="l00501"name="l00501"></a><spanclass="lineno"> 501</span><spanclass="comment">/* Calculate the RTCP report interval in seconds</span></div>
<divclass="line"><aid="l00502"name="l00502"></a><spanclass="lineno"> 502</span><spanclass="comment"> * rtcp_bw is given in kbps</span></div>
<divclass="line"><aid="l00503"name="l00503"></a><spanclass="lineno"> 503</span><spanclass="comment"> * Defined in RFC3550 Appendix A.7 */</span></div>
<divclass="line"><aid="l00507"name="l00507"></a><spanclass="lineno"> 507</span><spanclass="comment">/* RTCP runner keeps track of ssrcs and how long they have been silent.</span></div>
<divclass="line"><aid="l00508"name="l00508"></a><spanclass="lineno"> 508</span><spanclass="comment"> * By default a source get timed out if it has been silent for 25 seconds</span></div>
<divclass="line"><aid="l00509"name="l00509"></a><spanclass="lineno"> 509</span><spanclass="comment"> * If an ssrc is timed out, this function removes it from participants_ map and</span></div>
<divclass="line"><aid="l00510"name="l00510"></a><spanclass="lineno"> 510</span><spanclass="comment"> * updates any other infos */</span></div>
<divclass="line"><aid="l00513"name="l00513"></a><spanclass="lineno"> 513</span><spanclass="comment">/* Because struct statistics contains uvgRTP clock object we cannot</span></div>
<divclass="line"><aid="l00514"name="l00514"></a><spanclass="lineno"> 514</span><spanclass="comment"> * zero it out without compiler complaining about it so all the fields</span></div>
<divclass="line"><aid="l00515"name="l00515"></a><spanclass="lineno"> 515</span><spanclass="comment"> * must be set to zero manually */</span></div>
<divclass="line"><aid="l00533"name="l00533"></a><spanclass="lineno"> 533</span><spanclass="comment">/* are we a sender (and possible a receiver) or just a receiver */</span></div>
<divclass="line"><aid="l00537"name="l00537"></a><spanclass="lineno"> 537</span><spanclass="comment">// TODO: Check these, they don't seem to be used</span></div>
<divclass="line"><aid="l00538"name="l00538"></a><spanclass="lineno"> 538</span><spanclass="keywordtype">size_t</span> tp_; <spanclass="comment">/* the last time an RTCP packet was transmitted */</span></div>
<divclass="line"><aid="l00539"name="l00539"></a><spanclass="lineno"> 539</span><spanclass="keywordtype">size_t</span> tc_; <spanclass="comment">/* the current time */</span></div>
<divclass="line"><aid="l00540"name="l00540"></a><spanclass="lineno"> 540</span><spanclass="keywordtype">size_t</span> tn_; <spanclass="comment">/* the next scheduled transmission time of an RTCP packet */</span></div>
<divclass="line"><aid="l00541"name="l00541"></a><spanclass="lineno"> 541</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="l00542"name="l00542"></a><spanclass="lineno"> 542</span><spanclass="keywordtype">size_t</span> members_; <spanclass="comment">/* the most current estimate for the number of session members */</span></div>
<divclass="line"><aid="l00543"name="l00543"></a><spanclass="lineno"> 543</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="l00545"name="l00545"></a><spanclass="lineno"> 545</span><spanclass="comment">/* Total session bandwidth. RTCP bandwidth will be set to 5 % of this */</span></div>
<divclass="line"><aid="l00548"name="l00548"></a><spanclass="lineno"> 548</span><spanclass="comment">/* The target RTCP bandwidth, i.e., the total bandwidth</span></div>
<divclass="line"><aid="l00549"name="l00549"></a><spanclass="lineno"> 549</span><spanclass="comment"> * that will be used for RTCP packets by all members of this session,</span></div>
<divclass="line"><aid="l00550"name="l00550"></a><spanclass="lineno"> 550</span><spanclass="comment"> * in octets per second. This will be a specified fraction of the</span></div>
<divclass="line"><aid="l00551"name="l00551"></a><spanclass="lineno"> 551</span><spanclass="comment"> * "session bandwidth" parameter supplied to the application at startup. */</span></div>
<divclass="line"><aid="l00554"name="l00554"></a><spanclass="lineno"> 554</span><spanclass="comment">/* "Minimum" value for RTCP transmission interval, depends on the session bandwidth</span></div>
<divclass="line"><aid="l00555"name="l00555"></a><spanclass="lineno"> 555</span><spanclass="comment"> * Actual interval can be 50 % smaller due to randomisation */</span></div>
<divclass="line"><aid="l00558"name="l00558"></a><spanclass="lineno"> 558</span><spanclass="comment">/* Flag that is true if the application has sent data since</span></div>
<divclass="line"><aid="l00559"name="l00559"></a><spanclass="lineno"> 559</span><spanclass="comment"> * the 2nd previous RTCP report was transmitted. */</span></div>
<divclass="line"><aid="l00560"name="l00560"></a><spanclass="lineno"> 560</span><spanclass="comment">// TODO: Only set, never read</span></div>
<divclass="line"><aid="l00563"name="l00563"></a><spanclass="lineno"> 563</span><spanclass="comment">/* Store sender and receiver info, this is needed when calling </span></div>
<divclass="line"><aid="l00564"name="l00564"></a><spanclass="lineno"> 564</span><spanclass="comment"> * add_participant dynamically (i.e. after initializing the stream) */</span></div>
<divclass="line"><aid="l00570"name="l00570"></a><spanclass="lineno"> 570</span><spanclass="comment">/* The average compound RTCP packet size, in octets,</span></div>
<divclass="line"><aid="l00571"name="l00571"></a><spanclass="lineno"> 571</span><spanclass="comment"> * over all RTCP packets sent and received by this participant. The</span></div>
<divclass="line"><aid="l00572"name="l00572"></a><spanclass="lineno"> 572</span><spanclass="comment"> * size includes lower-layer transport and network protocol headers</span></div>
<divclass="line"><aid="l00573"name="l00573"></a><spanclass="lineno"> 573</span><spanclass="comment"> * (e.g., UDP and IP) as explained in Section 6.2 */</span></div>
<divclass="line"><aid="l00574"name="l00574"></a><spanclass="lineno"> 574</span><spanclass="comment">// TODO: Only set, never read</span></div>
<divclass="line"><aid="l00577"name="l00577"></a><spanclass="lineno"> 577</span><spanclass="comment">/* Average RTCP packet size in octets.</span></div>
<divclass="line"><aid="l00578"name="l00578"></a><spanclass="lineno"> 578</span><spanclass="comment"> * Initialized to 64 */</span></div>
<divclass="line"><aid="l00581"name="l00581"></a><spanclass="lineno"> 581</span><spanclass="comment">/* Number of RTCP packets and bytes sent and received by this participant */</span></div>
<divclass="line"><aid="l00582"name="l00582"></a><spanclass="lineno"> 582</span><spanclass="comment">// TODO: Only set, never read</span></div>
<divclass="line"><aid="l00589"name="l00589"></a><spanclass="lineno"> 589</span><spanclass="comment">/* Flag that is true if the application has not yet sent an RTCP packet. */</span></div>
<divclass="line"><aid="l00590"name="l00590"></a><spanclass="lineno"> 590</span><spanclass="comment">// TODO: Only set, never read</span></div>
<divclass="line"><aid="l00599"name="l00599"></a><spanclass="lineno"> 599</span><spanclass="comment">/* Clock rate of the media ie. how fast does the time increase */</span></div>
<divclass="line"><aid="l00602"name="l00602"></a><spanclass="lineno"> 602</span><spanclass="comment">/* The first value of RTP timestamp (aka t = 0) */</span></div>
<divclass="line"><aid="l00606"name="l00606"></a><spanclass="lineno"> 606</span> uint8_t num_receivers_; <spanclass="comment">// maximum is 32 at the moment (5 bits)</span></div>
<divclass="line"><aid="l00609"name="l00609"></a><spanclass="lineno"> 609</span><spanclass="comment">/* Address of the socket that we are sending data to */</span></div>
<divclass="line"><aid="l00614"name="l00614"></a><spanclass="lineno"> 614</span><spanclass="comment">/* Map for keeping track of sources for timeouts</span></div>
<divclass="line"><aid="l00615"name="l00615"></a><spanclass="lineno"> 615</span><spanclass="comment"> * First number is the sources ssrc</span></div>
<divclass="line"><aid="l00616"name="l00616"></a><spanclass="lineno"> 616</span><spanclass="comment"> * Second number is how many milliseconds it has been silent*/</span></div>
<divclass="line"><aid="l00619"name="l00619"></a><spanclass="lineno"> 619</span><spanclass="comment">/* statistics for RTCP Sender and Receiver Reports */</span></div>
<divclass="line"><aid="l00622"name="l00622"></a><spanclass="lineno"> 622</span><spanclass="comment">/* If we expect frames from remote but haven't received anything from remote yet,</span></div>
<divclass="line"><aid="l00623"name="l00623"></a><spanclass="lineno"> 623</span><spanclass="comment"> * the participant resides in this vector until he's moved to participants_ */</span></div>
<divclass="line"><aid="l00670"name="l00670"></a><spanclass="lineno"> 670</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="l00671"name="l00671"></a><spanclass="lineno"> 671</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#l00118">rtcp.hh:118</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>