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 |
(...skipping 29 matching lines...) Expand all Loading... |
40 Clock* clock, | 40 Clock* clock, |
41 bool receiver_only, | 41 bool receiver_only, |
42 RtcpPacketTypeCounterObserver* packet_type_counter_observer, | 42 RtcpPacketTypeCounterObserver* packet_type_counter_observer, |
43 RtcpBandwidthObserver* rtcp_bandwidth_observer, | 43 RtcpBandwidthObserver* rtcp_bandwidth_observer, |
44 RtcpIntraFrameObserver* rtcp_intra_frame_observer, | 44 RtcpIntraFrameObserver* rtcp_intra_frame_observer, |
45 TransportFeedbackObserver* transport_feedback_observer, | 45 TransportFeedbackObserver* transport_feedback_observer, |
46 ModuleRtpRtcpImpl* owner) | 46 ModuleRtpRtcpImpl* owner) |
47 : TMMBRHelp(), | 47 : TMMBRHelp(), |
48 _clock(clock), | 48 _clock(clock), |
49 receiver_only_(receiver_only), | 49 receiver_only_(receiver_only), |
50 _method(RtcpMode::kOff), | |
51 _lastReceived(0), | 50 _lastReceived(0), |
52 _rtpRtcp(*owner), | 51 _rtpRtcp(*owner), |
53 _criticalSectionFeedbacks( | 52 _criticalSectionFeedbacks( |
54 CriticalSectionWrapper::CreateCriticalSection()), | 53 CriticalSectionWrapper::CreateCriticalSection()), |
55 _cbRtcpBandwidthObserver(rtcp_bandwidth_observer), | 54 _cbRtcpBandwidthObserver(rtcp_bandwidth_observer), |
56 _cbRtcpIntraFrameObserver(rtcp_intra_frame_observer), | 55 _cbRtcpIntraFrameObserver(rtcp_intra_frame_observer), |
57 _cbTransportFeedbackObserver(transport_feedback_observer), | 56 _cbTransportFeedbackObserver(transport_feedback_observer), |
58 _criticalSectionRTCPReceiver( | 57 _criticalSectionRTCPReceiver( |
59 CriticalSectionWrapper::CreateCriticalSection()), | 58 CriticalSectionWrapper::CreateCriticalSection()), |
60 main_ssrc_(0), | 59 main_ssrc_(0), |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 _receivedInfoMap.erase(first); | 95 _receivedInfoMap.erase(first); |
97 } | 96 } |
98 while (!_receivedCnameMap.empty()) { | 97 while (!_receivedCnameMap.empty()) { |
99 std::map<uint32_t, RTCPCnameInformation*>::iterator first = | 98 std::map<uint32_t, RTCPCnameInformation*>::iterator first = |
100 _receivedCnameMap.begin(); | 99 _receivedCnameMap.begin(); |
101 delete first->second; | 100 delete first->second; |
102 _receivedCnameMap.erase(first); | 101 _receivedCnameMap.erase(first); |
103 } | 102 } |
104 } | 103 } |
105 | 104 |
106 RtcpMode RTCPReceiver::Status() const { | |
107 CriticalSectionScoped lock(_criticalSectionRTCPReceiver); | |
108 return _method; | |
109 } | |
110 | |
111 void RTCPReceiver::SetRTCPStatus(RtcpMode method) { | |
112 CriticalSectionScoped lock(_criticalSectionRTCPReceiver); | |
113 _method = method; | |
114 } | |
115 | |
116 int64_t RTCPReceiver::LastReceived() { | 105 int64_t RTCPReceiver::LastReceived() { |
117 CriticalSectionScoped lock(_criticalSectionRTCPReceiver); | 106 CriticalSectionScoped lock(_criticalSectionRTCPReceiver); |
118 return _lastReceived; | 107 return _lastReceived; |
119 } | 108 } |
120 | 109 |
121 int64_t RTCPReceiver::LastReceivedReceiverReport() const { | 110 int64_t RTCPReceiver::LastReceivedReceiverReport() const { |
122 CriticalSectionScoped lock(_criticalSectionRTCPReceiver); | 111 CriticalSectionScoped lock(_criticalSectionRTCPReceiver); |
123 int64_t last_received_rr = -1; | 112 int64_t last_received_rr = -1; |
124 for (ReceivedInfoMap::const_iterator it = _receivedInfoMap.begin(); | 113 for (ReceivedInfoMap::const_iterator it = _receivedInfoMap.begin(); |
125 it != _receivedInfoMap.end(); ++it) { | 114 it != _receivedInfoMap.end(); ++it) { |
(...skipping 1328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1454 return -1; | 1443 return -1; |
1455 } | 1444 } |
1456 num += receiveInfo->TmmbrSet.lengthOfSet(); | 1445 num += receiveInfo->TmmbrSet.lengthOfSet(); |
1457 receiveInfoIt++; | 1446 receiveInfoIt++; |
1458 } | 1447 } |
1459 } | 1448 } |
1460 return num; | 1449 return num; |
1461 } | 1450 } |
1462 | 1451 |
1463 } // namespace webrtc | 1452 } // namespace webrtc |
OLD | NEW |