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 761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
772 // Not allowed to send any RTCP packet without sender report. | 772 // Not allowed to send any RTCP packet without sender report. |
773 return -1; | 773 return -1; |
774 } | 774 } |
775 } | 775 } |
776 | 776 |
777 if (packet_type_counter_.first_packet_time_ms == -1) | 777 if (packet_type_counter_.first_packet_time_ms == -1) |
778 packet_type_counter_.first_packet_time_ms = clock_->TimeInMilliseconds(); | 778 packet_type_counter_.first_packet_time_ms = clock_->TimeInMilliseconds(); |
779 | 779 |
780 // We need to send our NTP even if we haven't received any reports. | 780 // We need to send our NTP even if we haven't received any reports. |
781 RtcpContext context(feedback_state, nack_size, nack_list, pictureID, | 781 RtcpContext context(feedback_state, nack_size, nack_list, pictureID, |
782 NtpTime(*clock_)); | 782 clock_->CurrentNtpTime()); |
783 | 783 |
784 PrepareReport(feedback_state); | 784 PrepareReport(feedback_state); |
785 | 785 |
786 std::unique_ptr<rtcp::RtcpPacket> packet_bye; | 786 std::unique_ptr<rtcp::RtcpPacket> packet_bye; |
787 | 787 |
788 auto it = report_flags_.begin(); | 788 auto it = report_flags_.begin(); |
789 while (it != report_flags_.end()) { | 789 while (it != report_flags_.end()) { |
790 auto builder_it = builders_.find(it->type); | 790 auto builder_it = builders_.find(it->type); |
791 RTC_DCHECK(builder_it != builders_.end()) | 791 RTC_DCHECK(builder_it != builders_.end()) |
792 << "Could not find builder for packet type " << it->type; | 792 << "Could not find builder for packet type " << it->type; |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1049 return false; | 1049 return false; |
1050 } | 1050 } |
1051 | 1051 |
1052 RTC_DCHECK_LE(max_packet_size_, IP_PACKET_SIZE); | 1052 RTC_DCHECK_LE(max_packet_size_, IP_PACKET_SIZE); |
1053 uint8_t buffer[IP_PACKET_SIZE]; | 1053 uint8_t buffer[IP_PACKET_SIZE]; |
1054 return packet.BuildExternalBuffer(buffer, max_packet_size_, &sender) && | 1054 return packet.BuildExternalBuffer(buffer, max_packet_size_, &sender) && |
1055 !sender.send_failure_; | 1055 !sender.send_failure_; |
1056 } | 1056 } |
1057 | 1057 |
1058 } // namespace webrtc | 1058 } // namespace webrtc |
OLD | NEW |