OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_RECEIVER_HELP_H_ | 11 #ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_RECEIVER_HELP_H_ |
12 #define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_RECEIVER_HELP_H_ | 12 #define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_RECEIVER_HELP_H_ |
13 | 13 |
14 #include <list> | 14 #include <list> |
| 15 #include <map> |
15 #include <memory> | 16 #include <memory> |
16 #include <vector> | 17 #include <vector> |
17 | 18 |
18 #include "webrtc/base/constructormagic.h" | 19 #include "webrtc/base/constructormagic.h" |
19 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" // RTCPReportBloc
k | 20 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" |
20 #include "webrtc/modules/rtp_rtcp/source/rtcp_utility.h" | |
21 #include "webrtc/modules/rtp_rtcp/source/tmmbr_help.h" | 21 #include "webrtc/modules/rtp_rtcp/source/tmmbr_help.h" |
22 #include "webrtc/typedefs.h" | 22 #include "webrtc/typedefs.h" |
23 | 23 |
24 namespace webrtc { | 24 namespace webrtc { |
25 namespace rtcp { | 25 namespace rtcp { |
26 class TransportFeedback; | 26 class TransportFeedback; |
27 } | 27 } |
28 namespace RTCPHelp | 28 namespace RTCPHelp |
29 { | 29 { |
30 | 30 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 uint32_t xr_originator_ssrc; | 88 uint32_t xr_originator_ssrc; |
89 bool xr_dlrr_item; | 89 bool xr_dlrr_item; |
90 std::unique_ptr<RTCPVoIPMetric> VoIPMetric; | 90 std::unique_ptr<RTCPVoIPMetric> VoIPMetric; |
91 | 91 |
92 std::unique_ptr<rtcp::TransportFeedback> transport_feedback_; | 92 std::unique_ptr<rtcp::TransportFeedback> transport_feedback_; |
93 | 93 |
94 private: | 94 private: |
95 RTC_DISALLOW_COPY_AND_ASSIGN(RTCPPacketInformation); | 95 RTC_DISALLOW_COPY_AND_ASSIGN(RTCPPacketInformation); |
96 }; | 96 }; |
97 | 97 |
98 class RTCPReceiveInformation | 98 class RTCPReceiveInformation { |
99 { | 99 public: |
100 public: | 100 RTCPReceiveInformation(); |
101 RTCPReceiveInformation(); | 101 ~RTCPReceiveInformation(); |
102 ~RTCPReceiveInformation(); | |
103 | 102 |
104 void VerifyAndAllocateBoundingSet(const uint32_t minimumSize); | 103 void InsertTmmbrItem(uint32_t sender_ssrc, |
105 void VerifyAndAllocateTMMBRSet(const uint32_t minimumSize); | 104 const rtcp::TmmbItem& tmmbr_item, |
| 105 int64_t current_time_ms); |
106 | 106 |
107 void InsertTMMBRItem(const uint32_t senderSSRC, | 107 void GetTmmbrSet(int64_t current_time_ms, |
108 const RTCPUtility::RTCPPacketRTPFBTMMBRItem& TMMBRItem, | 108 std::vector<rtcp::TmmbItem>* candidates); |
109 const int64_t currentTimeMS); | |
110 | 109 |
111 // get | 110 void ClearTmmbr(); |
112 void GetTMMBRSet(int64_t current_time_ms, | |
113 std::vector<rtcp::TmmbItem>* candidates); | |
114 | 111 |
115 int64_t lastTimeReceived; | 112 int64_t last_time_received_ms = 0; |
116 | 113 |
117 // FIR | 114 int32_t last_fir_sequence_number = -1; |
118 int32_t lastFIRSequenceNumber; | 115 int64_t last_fir_request_ms = 0; |
119 int64_t lastFIRRequest; | |
120 | 116 |
121 // TMMBN | 117 bool ready_for_delete = false; |
122 TMMBRSet TmmbnBoundingSet; | |
123 | 118 |
124 // TMMBR | 119 std::vector<rtcp::TmmbItem> tmmbn; |
125 TMMBRSet TmmbrSet; | |
126 | 120 |
127 bool readyForDelete; | 121 private: |
128 private: | 122 struct TimedTmmbrItem { |
129 std::vector<int64_t> _tmmbrSetTimeouts; | 123 rtcp::TmmbItem tmmbr_item; |
| 124 int64_t last_updated_ms; |
| 125 }; |
| 126 |
| 127 std::map<uint32_t, TimedTmmbrItem> tmmbr_; |
130 }; | 128 }; |
131 | 129 |
132 } // end namespace RTCPHelp | 130 } // end namespace RTCPHelp |
133 } // namespace webrtc | 131 } // namespace webrtc |
134 | 132 |
135 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_RECEIVER_HELP_H_ | 133 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_RECEIVER_HELP_H_ |
OLD | NEW |