1 /** \addtogroup RTP_Stack 2 * @{ 3 */ 4 5 /** 6 * @class RtpTimerInfo 7 * 8 * @brief It stores timer info for RTCP transmission timer interval calculation. 9 */ 10 11 /** 12 * Copyright (C) 2022 The Android Open Source Project 13 * 14 * Licensed under the Apache License, Version 2.0 (the "License"); 15 * you may not use this file except in compliance with the License. 16 * You may obtain a copy of the License at 17 * 18 * http://www.apache.org/licenses/LICENSE-2.0 19 * 20 * Unless required by applicable law or agreed to in writing, software 21 * distributed under the License is distributed on an "AS IS" BASIS, 22 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 23 * See the License for the specific language governing permissions and 24 * limitations under the License. 25 */ 26 27 #ifndef __RTP_TIMER_INFO_H__ 28 #define __RTP_TIMER_INFO_H__ 29 30 #include <RtpGlobal.h> 31 32 class RtpTimerInfo 33 { 34 // the last time an RTCP packet was transmitted; 35 RtpDt_UInt32 m_uiTp; 36 // the current time; TBD..replace with system time 37 RtpDt_UInt32 m_uiTc; 38 // the next scheduled transmission time of an RTCP packet 39 RtpDt_UInt32 m_uiTn; 40 /** the estimated number of session members at the time tn 41 was last recomputed 42 */ 43 RtpDt_UInt32 m_uiPmembers; 44 /**the most current estimate for the number of session 45 members 46 */ 47 RtpDt_UInt32 m_uiMembers; 48 /**the most current estimate for the number of senders in 49 the session;*/ 50 RtpDt_UInt32 m_uiSenders; 51 /**The target RTCP bandwidth, i.e., the total bandwidth 52 that will be used for RTCP packets by all members of this session, 53 in octets per second. This will be a specified fraction of the 54 "session bandwidth" parameter supplied to the application at 55 startup*/ 56 RtpDt_UInt32 m_uiRtcpBw; 57 /**Flag that is true if the application has sent data 58 since the 2nd previous RTCP report was transmitted 59 */ 60 RtpDt_UInt32 m_uiWeSent; 61 /** The average compound RTCP packet size, in octets, 62 over all RTCP packets sent and received by this participant. The 63 size includes lower-layer transport and network protocol headers 64 (e.g., UDP and IP) as explained in Section 6.2. 65 */ 66 RtpDt_Int32 m_ulAvgRtcpSize; 67 /** Flag that is true if the application has not yet sent 68 an RTCP packet.*/ 69 eRtp_Bool m_bInitial; 70 71 // increment sender count by uiIncrVal 72 RtpDt_Void incrSndrCount(IN RtpDt_UInt32 uiIncrVal); 73 74 public: 75 /** 76 * All member vars are inited to zero 77 */ 78 RtpTimerInfo(); 79 80 // Destructor 81 ~RtpTimerInfo(); 82 83 // get method for m_uiTp 84 RtpDt_UInt32 getTp(); 85 // set method for m_uiTp 86 RtpDt_Void setTp(IN RtpDt_UInt32 uiTp); 87 88 // get method for m_uiTc 89 RtpDt_UInt32 getTc(); 90 91 // get method for m_uiTn 92 RtpDt_UInt32 getTn(); 93 // set method for m_uiTn 94 RtpDt_Void setTn(IN RtpDt_UInt32 uiTn); 95 96 // get method for m_uiPmembers 97 RtpDt_UInt32 getPmembers(); 98 // set method for m_uiPmembers 99 RtpDt_Void setPmembers(IN RtpDt_UInt32 uiPmembers); 100 101 // get method for m_uiRtcpBw 102 RtpDt_UInt32 getRtcpBw(); 103 // set method for m_uiRtcpBw 104 RtpDt_Void setRtcpBw(IN RtpDt_UInt32 uiRtcpBw); 105 106 // get method for m_uiWeSent 107 RtpDt_UInt32 getWeSent(); 108 // set method for m_uiWeSent 109 RtpDt_Void setWeSent(IN RtpDt_UInt32 uiWeSent); 110 111 // get method for m_ulAvgRtcpSize 112 RtpDt_Int32 getAvgRtcpSize(); 113 // set method for m_ulAvgRtcpSize 114 RtpDt_Void setAvgRtcpSize(IN RtpDt_Int32 uiAvgRtcpSize); 115 116 // get method for m_uiInitial 117 eRtp_Bool isInitial(); 118 // set method for m_uiInitial 119 RtpDt_Void setInitial(IN eRtp_Bool bSetInitial); 120 121 // It updates AVG RTCP SIZE 122 RtpDt_Void updateAvgRtcpSize(IN RtpDt_UInt32 uiRcvdPktSize); 123 124 // It updates Tn and Tp after receiving BYE packet 125 eRtp_Bool updateByePktInfo(IN RtpDt_UInt32 uiMemSize); 126 127 // It makes all members with default values 128 RtpDt_Void cleanUp(); 129 }; 130 131 #endif //__RTP_TIMER_INFO_H__ 132 133 /** @}*/ 134