<divclass="line"><aid="l00032"name="l00032"></a><spanclass="lineno"> 32</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="l00042"name="l00042"></a><spanclass="lineno"> 42</span> uint32_t sent_pkts = 0; <spanclass="comment">/* Number of sent RTP packets */</span></div>
<divclass="line"><aid="l00043"name="l00043"></a><spanclass="lineno"> 43</span> uint32_t sent_bytes = 0; <spanclass="comment">/* Number of sent bytes excluding RTP Header */</span></div>
<divclass="line"><aid="l00044"name="l00044"></a><spanclass="lineno"> 44</span><spanclass="keywordtype">bool</span> sent_rtp_packet = <spanclass="keyword">false</span>; <spanclass="comment">// since last report</span></div>
<divclass="line"><aid="l00049"name="l00049"></a><spanclass="lineno"> 49</span> uint32_t received_pkts = 0; <spanclass="comment">/* Number of packets received */</span></div>
<divclass="line"><aid="l00050"name="l00050"></a><spanclass="lineno"> 50</span> uint32_t lost_pkts = 0; <spanclass="comment">/* Number of dropped RTP packets */</span></div>
<divclass="line"><aid="l00051"name="l00051"></a><spanclass="lineno"> 51</span> uint32_t received_bytes = 0; <spanclass="comment">/* Number of bytes received excluding RTP Header */</span></div>
<divclass="line"><aid="l00052"name="l00052"></a><spanclass="lineno"> 52</span><spanclass="keywordtype">bool</span> received_rtp_packet = <spanclass="keyword">false</span>; <spanclass="comment">// since last report</span></div>
<divclass="line"><aid="l00054"name="l00054"></a><spanclass="lineno"> 54</span> uint32_t expected_pkts = 0; <spanclass="comment">/* Number of expected packets */</span></div>
<divclass="line"><aid="l00055"name="l00055"></a><spanclass="lineno"> 55</span> uint32_t received_prior = 0; <spanclass="comment">/* Number of received packets in last report */</span></div>
<divclass="line"><aid="l00056"name="l00056"></a><spanclass="lineno"> 56</span> uint32_t expected_prior = 0; <spanclass="comment">/* Number of expected packets in last report */</span></div>
<divclass="line"><aid="l00058"name="l00058"></a><spanclass="lineno"> 58</span><spanclass="keywordtype">double</span> jitter = 0; <spanclass="comment">/* The estimation of jitter (see RFC 3550 A.8) */</span></div>
<divclass="line"><aid="l00062"name="l00062"></a><spanclass="lineno"> 62</span><spanclass="comment">/* Receiver clock related stuff */</span></div>
<divclass="line"><aid="l00063"name="l00063"></a><spanclass="lineno"> 63</span> uint64_t initial_ntp = 0; <spanclass="comment">/* Wallclock reading when the first RTP packet was received */</span></div>
<divclass="line"><aid="l00064"name="l00064"></a><spanclass="lineno"> 64</span> uint32_t initial_rtp = 0; <spanclass="comment">/* RTP timestamp of the first RTP packet received */</span></div>
<divclass="line"><aid="l00065"name="l00065"></a><spanclass="lineno"> 65</span> uint32_t clock_rate = 0; <spanclass="comment">/* Rate of the clock (used for jitter calculations) */</span></div>
<divclass="line"><aid="l00067"name="l00067"></a><spanclass="lineno"> 67</span> uint32_t lsr = 0; <spanclass="comment">/* Middle 32 bits of the 64-bit NTP timestamp of previous SR */</span></div>
<divclass="line"><aid="l00068"name="l00068"></a><spanclass="lineno"> 68</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="l00070"name="l00070"></a><spanclass="lineno"> 70</span> uint16_t max_seq = 0; <spanclass="comment">/* Highest sequence number received */</span></div>
<divclass="line"><aid="l00071"name="l00071"></a><spanclass="lineno"> 71</span> uint32_t base_seq = 0; <spanclass="comment">/* First sequence number received */</span></div>
<divclass="line"><aid="l00079"name="l00079"></a><spanclass="lineno"> 79</span> uint32_t probation = 0; <spanclass="comment">/* has the participant been fully accepted to the session */</span></div>
<divclass="line"><aid="l00080"name="l00080"></a><spanclass="lineno"> 80</span><spanclass="keywordtype">int</span> role = 0; <spanclass="comment">/* is the participant a sender or a receiver */</span></div>
<divclass="line"><aid="l00082"name="l00082"></a><spanclass="lineno"> 82</span><spanclass="comment">/* Save the latest RTCP packets received from this participant</span></div>
<divclass="line"><aid="l00083"name="l00083"></a><spanclass="lineno"> 83</span><spanclass="comment"> * Users can query these packets using the SSRC of participant */</span></div>
<divclass="line"><aid="l00131"name="l00131"></a><spanclass="lineno"> 131</span><spanclass="comment"> * return RTP_OK on success and RTP_MEMORY_ERROR if the allocation fails */</span></div>
<divclass="line"><aid="l00134"name="l00134"></a><spanclass="lineno"> 134</span><spanclass="comment">/* End the RTCP session and send RTCP BYE to all participants</span></div>
<divclass="line"><aid="l00139"name="l00139"></a><spanclass="lineno"> 139</span><spanclass="comment">/* Generate either RTCP Sender or Receiver report and sent it to all participants</span></div>
<divclass="line"><aid="l00140"name="l00140"></a><spanclass="lineno"> 140</span><spanclass="comment"> * Return RTP_OK on success and RTP_ERROR on error */</span></div>
<divclass="line"><aid="l00143"name="l00143"></a><spanclass="lineno"> 143</span><spanclass="comment">/* Handle incoming RTCP packet (first make sure it's a valid RTCP packet)</span></div>
<divclass="line"><aid="l00144"name="l00144"></a><spanclass="lineno"> 144</span><spanclass="comment"> * This function will call one of the above functions internally</span></div>
<divclass="line"><aid="l00146"name="l00146"></a><spanclass="lineno"> 146</span><spanclass="comment"> * Return RTP_OK on success and RTP_ERROR on error */</span></div>
<divclass="line"><aid="l00150"name="l00150"></a><spanclass="lineno"> 150</span><spanclass="comment">/* Send "frame" to all participants</span></div>
<divclass="line"><aid="l00152"name="l00152"></a><spanclass="lineno"> 152</span><spanclass="comment"> * These routines will convert all necessary fields to network byte order</span></div>
<divclass="line"><aid="l00154"name="l00154"></a><spanclass="lineno"> 154</span><spanclass="comment"> * Return RTP_OK on success</span></div>
<divclass="line"><aid="l00155"name="l00155"></a><spanclass="lineno"> 155</span><spanclass="comment"> * Return RTP_INVALID_VALUE if "frame" is in some way invalid</span></div>
<divclass="line"><aid="l00156"name="l00156"></a><spanclass="lineno"> 156</span><spanclass="comment"> * Return RTP_SEND_ERROR if sending "frame" did not succeed (see socket.hh for details) */</span></div>
<divclass="line"><aid="l00200"name="l00200"></a><spanclass="lineno"> 200</span><spanclass="comment">/* Return the latest RTCP packet received from participant of "ssrc"</span></div>
<divclass="line"><aid="l00201"name="l00201"></a><spanclass="lineno"> 201</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="l00203"name="l00203"></a><spanclass="lineno"> 203</span><spanclass="comment"> * NOTE: Caller is responsible for deallocating the memory */</span></div>
<divclass="line"><aid="l00209"name="l00209"></a><spanclass="lineno"> 209</span><spanclass="comment">/* Somebody joined the multicast group the owner of this RTCP instance is part of</span></div>
<divclass="line"><aid="l00210"name="l00210"></a><spanclass="lineno"> 210</span><spanclass="comment"> * Add it to RTCP participant list so we can start listening for reports</span></div>
<divclass="line"><aid="l00212"name="l00212"></a><spanclass="lineno"> 212</span><spanclass="comment"> * "clock_rate" tells how much the RTP timestamp advances, this information is needed</span></div>
<divclass="line"><aid="l00213"name="l00213"></a><spanclass="lineno"> 213</span><spanclass="comment"> * to calculate the interarrival jitter correctly. It has nothing do with our clock rate,</span></div>
<divclass="line"><aid="l00214"name="l00214"></a><spanclass="lineno"> 214</span><spanclass="comment"> * (or whether we're even sending anything)</span></div>
<divclass="line"><aid="l00216"name="l00216"></a><spanclass="lineno"> 216</span><spanclass="comment"> * Return RTP_OK on success and RTP_ERROR on error */</span></div>
<divclass="line"><aid="l00219"name="l00219"></a><spanclass="lineno"> 219</span><spanclass="comment">/* Functions for updating various RTP sender statistics */</span></div>
<divclass="line"><aid="l00222"name="l00222"></a><spanclass="lineno"> 222</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="l00223"name="l00223"></a><spanclass="lineno"> 223</span><spanclass="comment"> * generate new random SSRC and reinitialize our own RTCP state.</span></div>
<divclass="line"><aid="l00224"name="l00224"></a><spanclass="lineno"> 224</span><spanclass="comment"> * RTCP object still has the participants of "last session", we can use their SSRCs</span></div>
<divclass="line"><aid="l00225"name="l00225"></a><spanclass="lineno"> 225</span><spanclass="comment"> * to detected new collision</span></div>
<divclass="line"><aid="l00227"name="l00227"></a><spanclass="lineno"> 227</span><spanclass="comment"> * Return RTP_OK if reinitialization succeeded</span></div>
<divclass="line"><aid="l00228"name="l00228"></a><spanclass="lineno"> 228</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="l00234"name="l00234"></a><spanclass="lineno"> 234</span><spanclass="comment">/* Getter for interval_ms_, which is calculated by set_session_bandwidth</span></div>
<divclass="line"><aid="l00235"name="l00235"></a><spanclass="lineno"> 235</span><spanclass="comment"> * Be aware that this interval is frequently re-calculated in rtcp_runner() */</span></div>
<divclass="line"><aid="l00238"name="l00238"></a><spanclass="lineno"> 238</span><spanclass="comment">/* Set total bandwidth for this session, called at the start </span></div>
<divclass="line"><aid="l00239"name="l00239"></a><spanclass="lineno"> 239</span><spanclass="comment"> * This affects the RTCP packet transmission interval */</span></div>
<divclass="line"><aid="l00244"name="l00244"></a><spanclass="lineno"> 244</span><spanclass="comment">/* Store the following info in RTCP</span></div>
<divclass="line"><aid="l00245"name="l00245"></a><spanclass="lineno"> 245</span><spanclass="comment"> * Local IP address</span></div>
<divclass="line"><aid="l00246"name="l00246"></a><spanclass="lineno"> 246</span><spanclass="comment"> * Remote IP address</span></div>
<divclass="line"><aid="l00247"name="l00247"></a><spanclass="lineno"> 247</span><spanclass="comment"> * Local port number for RTCP</span></div>
<divclass="line"><aid="l00248"name="l00248"></a><spanclass="lineno"> 248</span><spanclass="comment"> * Destination port number for RTCP</span></div>
<divclass="line"><aid="l00249"name="l00249"></a><spanclass="lineno"> 249</span><spanclass="comment"> * These are used when adding new participants and creating sockets for them */</span></div>
<divclass="line"><aid="l00254"name="l00254"></a><spanclass="lineno"> 254</span><spanclass="comment">/* Return SSRCs of all participants */</span></div>
<divclass="line"><aid="l00274"name="l00274"></a><spanclass="lineno"> 274</span><spanclass="comment">/* Alternate way to get RTCP packets is to install a hook for them. So instead of</span></div>
<divclass="line"><aid="l00275"name="l00275"></a><spanclass="lineno"> 275</span><spanclass="comment"> * polling an RTCP packet, user can install a function that is called when</span></div>
<divclass="line"><aid="l00276"name="l00276"></a><spanclass="lineno"> 276</span><spanclass="comment"> * a specific RTCP packet is received. */</span></div>
<divclass="line"><aid="l00375"name="l00375"></a><spanclass="lineno"> 375</span><spanclass="comment">// These have been replaced by functions with unique_ptr in them</span></div>
<divclass="line"><aid="l00424"name="l00424"></a><spanclass="lineno"> 424</span><spanclass="comment">// the length field is the rtcp packet size measured in 32-bit words - 1</span></div>
<divclass="line"><aid="l00440"name="l00440"></a><spanclass="lineno"> 440</span><spanclass="comment">/* read the header values from rtcp packet */</span></div>
<divclass="line"><aid="l00448"name="l00448"></a><spanclass="lineno"> 448</span><spanclass="comment">/* Handle different kinds of incoming rtcp packets. The read header is passed to functions</span></div>
<divclass="line"><aid="l00449"name="l00449"></a><spanclass="lineno"> 449</span><spanclass="comment"> which read rest of the frame type specific data.</span></div>
<divclass="line"><aid="l00450"name="l00450"></a><spanclass="lineno"> 450</span><spanclass="comment"> * Return RTP_OK on success and RTP_ERROR on error */</span></div>
<divclass="line"><aid="l00466"name="l00466"></a><spanclass="lineno"> 466</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="l00467"name="l00467"></a><spanclass="lineno"> 467</span><spanclass="comment"> * when an RTP packet is received, we must check if we've already received a packet</span></div>
<divclass="line"><aid="l00468"name="l00468"></a><spanclass="lineno"> 468</span><spanclass="comment"> * from this sender and if not, create new entry to receiver_stats_ map */</span></div>
<divclass="line"><aid="l00472"name="l00472"></a><spanclass="lineno"> 472</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="l00473"name="l00473"></a><spanclass="lineno"> 473</span><spanclass="comment"> * the same address where we've received packets before.</span></div>
<divclass="line"><aid="l00475"name="l00475"></a><spanclass="lineno"> 475</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="l00476"name="l00476"></a><spanclass="lineno"> 476</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="l00477"name="l00477"></a><spanclass="lineno"> 477</span><spanclass="comment"> * we need to send RTCP BYE and rejoin to the session */</span></div>
<divclass="line"><aid="l00480"name="l00480"></a><spanclass="lineno"> 480</span><spanclass="comment">/* Move participant from initial_peers_ to participants_ */</span></div>
<divclass="line"><aid="l00483"name="l00483"></a><spanclass="lineno"> 483</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="l00484"name="l00484"></a><spanclass="lineno"> 484</span><spanclass="comment"> * Initialize statistics for the peer and move it to participants_ */</span></div>
<divclass="line"><aid="l00487"name="l00487"></a><spanclass="lineno"> 487</span><spanclass="comment">/* Initialize the RTP Sequence related stuff of peer</span></div>
<divclass="line"><aid="l00488"name="l00488"></a><spanclass="lineno"> 488</span><spanclass="comment"> * This function assumes that the peer already exists in the participants_ map */</span></div>
<divclass="line"><aid="l00491"name="l00491"></a><spanclass="lineno"> 491</span><spanclass="comment">/* Update the SSRC's sequence related data in participants_ map</span></div>
<divclass="line"><aid="l00493"name="l00493"></a><spanclass="lineno"> 493</span><spanclass="comment"> * Return RTP_OK if the received packet was OK</span></div>
<divclass="line"><aid="l00494"name="l00494"></a><spanclass="lineno"> 494</span><spanclass="comment"> * Return RTP_GENERIC_ERROR if it wasn't and</span></div>
<divclass="line"><aid="l00495"name="l00495"></a><spanclass="lineno"> 495</span><spanclass="comment"> * packet-related statistics should not be updated */</span></div>
<divclass="line"><aid="l00500"name="l00500"></a><spanclass="lineno"> 500</span><spanclass="comment"> * "pkt_size" tells how much rtcp_byte_count_</span></div>
<divclass="line"><aid="l00501"name="l00501"></a><spanclass="lineno"> 501</span><spanclass="comment"> * should be increased before calculating the new average */</span></div>
<divclass="line"><aid="l00504"name="l00504"></a><spanclass="lineno"> 504</span><spanclass="comment">/* Update average RTCP packet size variable</span></div>
<divclass="line"><aid="l00505"name="l00505"></a><spanclass="lineno"> 505</span><spanclass="comment"> * packet_size is the size of received RTCP packet in octets */</span></div>
<divclass="line"><aid="l00508"name="l00508"></a><spanclass="lineno"> 508</span><spanclass="comment">/* Calculate the RTCP report interval in seconds</span></div>
<divclass="line"><aid="l00509"name="l00509"></a><spanclass="lineno"> 509</span><spanclass="comment"> * rtcp_bw is given in kbps</span></div>
<divclass="line"><aid="l00510"name="l00510"></a><spanclass="lineno"> 510</span><spanclass="comment"> * Defined in RFC3550 Appendix A.7 */</span></div>
<divclass="line"><aid="l00514"name="l00514"></a><spanclass="lineno"> 514</span><spanclass="comment">/* RTCP runner keeps track of ssrcs and how long they have been silent.</span></div>
<divclass="line"><aid="l00515"name="l00515"></a><spanclass="lineno"> 515</span><spanclass="comment"> * By default a source get timed out if it has been silent for 25 seconds</span></div>
<divclass="line"><aid="l00516"name="l00516"></a><spanclass="lineno"> 516</span><spanclass="comment"> * If an ssrc is timed out, this function removes it from participants_ map and</span></div>
<divclass="line"><aid="l00517"name="l00517"></a><spanclass="lineno"> 517</span><spanclass="comment"> * updates any other infos */</span></div>
<divclass="line"><aid="l00520"name="l00520"></a><spanclass="lineno"> 520</span><spanclass="comment">/* Because struct statistics contains uvgRTP clock object we cannot</span></div>
<divclass="line"><aid="l00521"name="l00521"></a><spanclass="lineno"> 521</span><spanclass="comment"> * zero it out without compiler complaining about it so all the fields</span></div>
<divclass="line"><aid="l00522"name="l00522"></a><spanclass="lineno"> 522</span><spanclass="comment"> * must be set to zero manually */</span></div>
<divclass="line"><aid="l00540"name="l00540"></a><spanclass="lineno"> 540</span><spanclass="comment">/* are we a sender (and possible a receiver) or just a receiver */</span></div>
<divclass="line"><aid="l00544"name="l00544"></a><spanclass="lineno"> 544</span><spanclass="comment">// TODO: Check these, they don't seem to be used</span></div>
<divclass="line"><aid="l00545"name="l00545"></a><spanclass="lineno"> 545</span><spanclass="keywordtype">size_t</span> tp_; <spanclass="comment">/* the last time an RTCP packet was transmitted */</span></div>
<divclass="line"><aid="l00546"name="l00546"></a><spanclass="lineno"> 546</span><spanclass="keywordtype">size_t</span> tc_; <spanclass="comment">/* the current time */</span></div>
<divclass="line"><aid="l00547"name="l00547"></a><spanclass="lineno"> 547</span><spanclass="keywordtype">size_t</span> tn_; <spanclass="comment">/* the next scheduled transmission time of an RTCP packet */</span></div>
<divclass="line"><aid="l00548"name="l00548"></a><spanclass="lineno"> 548</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="l00549"name="l00549"></a><spanclass="lineno"> 549</span><spanclass="keywordtype">size_t</span> members_; <spanclass="comment">/* the most current estimate for the number of session members */</span></div>
<divclass="line"><aid="l00550"name="l00550"></a><spanclass="lineno"> 550</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="l00552"name="l00552"></a><spanclass="lineno"> 552</span><spanclass="comment">/* Total session bandwidth. RTCP bandwidth will be set to 5 % of this */</span></div>
<divclass="line"><aid="l00555"name="l00555"></a><spanclass="lineno"> 555</span><spanclass="comment">/* The target RTCP bandwidth, i.e., the total bandwidth</span></div>
<divclass="line"><aid="l00556"name="l00556"></a><spanclass="lineno"> 556</span><spanclass="comment"> * that will be used for RTCP packets by all members of this session,</span></div>
<divclass="line"><aid="l00557"name="l00557"></a><spanclass="lineno"> 557</span><spanclass="comment"> * in octets per second. This will be a specified fraction of the</span></div>
<divclass="line"><aid="l00558"name="l00558"></a><spanclass="lineno"> 558</span><spanclass="comment"> * "session bandwidth" parameter supplied to the application at startup. */</span></div>
<divclass="line"><aid="l00561"name="l00561"></a><spanclass="lineno"> 561</span><spanclass="comment">/* "Minimum" value for RTCP transmission interval, depends on the session bandwidth</span></div>
<divclass="line"><aid="l00562"name="l00562"></a><spanclass="lineno"> 562</span><spanclass="comment"> * Actual interval can be 50 % smaller due to randomisation */</span></div>
<divclass="line"><aid="l00565"name="l00565"></a><spanclass="lineno"> 565</span><spanclass="comment">/* Flag that is true if the application has sent data since</span></div>
<divclass="line"><aid="l00566"name="l00566"></a><spanclass="lineno"> 566</span><spanclass="comment"> * the 2nd previous RTCP report was transmitted. */</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">/* Store sender and receiver info, this is needed when calling </span></div>
<divclass="line"><aid="l00571"name="l00571"></a><spanclass="lineno"> 571</span><spanclass="comment"> * add_participant dynamically (i.e. after initializing the stream) */</span></div>
<divclass="line"><aid="l00577"name="l00577"></a><spanclass="lineno"> 577</span><spanclass="comment">/* The average compound RTCP packet size, in octets,</span></div>
<divclass="line"><aid="l00578"name="l00578"></a><spanclass="lineno"> 578</span><spanclass="comment"> * over all RTCP packets sent and received by this participant. The</span></div>
<divclass="line"><aid="l00579"name="l00579"></a><spanclass="lineno"> 579</span><spanclass="comment"> * size includes lower-layer transport and network protocol headers</span></div>
<divclass="line"><aid="l00580"name="l00580"></a><spanclass="lineno"> 580</span><spanclass="comment"> * (e.g., UDP and IP) as explained in Section 6.2 */</span></div>
<divclass="line"><aid="l00581"name="l00581"></a><spanclass="lineno"> 581</span><spanclass="comment">// TODO: Only set, never read</span></div>
<divclass="line"><aid="l00584"name="l00584"></a><spanclass="lineno"> 584</span><spanclass="comment">/* Average RTCP packet size in octets.</span></div>
<divclass="line"><aid="l00585"name="l00585"></a><spanclass="lineno"> 585</span><spanclass="comment"> * Initialized to 64 */</span></div>
<divclass="line"><aid="l00588"name="l00588"></a><spanclass="lineno"> 588</span><spanclass="comment">/* Number of RTCP packets and bytes sent and received by this participant */</span></div>
<divclass="line"><aid="l00589"name="l00589"></a><spanclass="lineno"> 589</span><spanclass="comment">// TODO: Only set, never read</span></div>
<divclass="line"><aid="l00596"name="l00596"></a><spanclass="lineno"> 596</span><spanclass="comment">/* Flag that is true if the application has not yet sent an RTCP packet. */</span></div>
<divclass="line"><aid="l00597"name="l00597"></a><spanclass="lineno"> 597</span><spanclass="comment">// TODO: Only set, never read</span></div>
<divclass="line"><aid="l00609"name="l00609"></a><spanclass="lineno"> 609</span><spanclass="comment">/* Clock rate of the media ie. how fast does the time increase */</span></div>
<divclass="line"><aid="l00612"name="l00612"></a><spanclass="lineno"> 612</span><spanclass="comment">/* The first value of RTP timestamp (aka t = 0) */</span></div>
<divclass="line"><aid="l00616"name="l00616"></a><spanclass="lineno"> 616</span> uint8_t num_receivers_; <spanclass="comment">// maximum is 32 at the moment (5 bits)</span></div>
<divclass="line"><aid="l00619"name="l00619"></a><spanclass="lineno"> 619</span><spanclass="comment">/* Address of the socket that we are sending data to */</span></div>
<divclass="line"><aid="l00624"name="l00624"></a><spanclass="lineno"> 624</span><spanclass="comment">/* Map for keeping track of sources for timeouts</span></div>
<divclass="line"><aid="l00625"name="l00625"></a><spanclass="lineno"> 625</span><spanclass="comment"> * First number is the sources ssrc</span></div>
<divclass="line"><aid="l00626"name="l00626"></a><spanclass="lineno"> 626</span><spanclass="comment"> * Second number is how many milliseconds it has been silent*/</span></div>
<divclass="line"><aid="l00629"name="l00629"></a><spanclass="lineno"> 629</span><spanclass="comment">/* statistics for RTCP Sender and Receiver Reports */</span></div>
<divclass="line"><aid="l00632"name="l00632"></a><spanclass="lineno"> 632</span><spanclass="comment">/* If we expect frames from remote but haven't received anything from remote yet,</span></div>
<divclass="line"><aid="l00633"name="l00633"></a><spanclass="lineno"> 633</span><spanclass="comment"> * the participant resides in this vector until he's moved to participants_ */</span></div>
<divclass="line"><aid="l00683"name="l00683"></a><spanclass="lineno"> 683</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="l00684"name="l00684"></a><spanclass="lineno"> 684</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="#l00120">rtcp.hh:120</a></div></div>
<divclass="ttc"id="aclassuvgrtp_1_1rtcp_html_a27adb6b5965dab3918bd02a2e7a2dfd2"><divclass="ttname"><ahref="classuvgrtp_1_1rtcp.html#a27adb6b5965dab3918bd02a2e7a2dfd2">uvgrtp::rtcp::remove_send_app_hook</a></div><divclass="ttdeci">rtp_error_t remove_send_app_hook(std::string app_name)</div><divclass="ttdoc">Remove a hook for sending APP packets *.</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#l00089">frame.hh:89</a></div></div>