| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 RtcpPacket::PacketReadyCallback* callback) const { | 81 RtcpPacket::PacketReadyCallback* callback) const { |
| 82 RTC_DCHECK(!items_.empty()); | 82 RTC_DCHECK(!items_.empty()); |
| 83 while (*index + BlockLength() > max_length) { | 83 while (*index + BlockLength() > max_length) { |
| 84 if (!OnBufferFull(packet, index, callback)) | 84 if (!OnBufferFull(packet, index, callback)) |
| 85 return false; | 85 return false; |
| 86 } | 86 } |
| 87 const size_t index_end = *index + BlockLength(); | 87 const size_t index_end = *index + BlockLength(); |
| 88 | 88 |
| 89 CreateHeader(kFeedbackMessageType, kPacketType, HeaderLength(), packet, | 89 CreateHeader(kFeedbackMessageType, kPacketType, HeaderLength(), packet, |
| 90 index); | 90 index); |
| 91 RTC_DCHECK_EQ(0u, Rtpfb::media_ssrc()); | 91 RTC_DCHECK_EQ(0, Rtpfb::media_ssrc()); |
| 92 CreateCommonFeedback(packet + *index); | 92 CreateCommonFeedback(packet + *index); |
| 93 *index += kCommonFeedbackLength; | 93 *index += kCommonFeedbackLength; |
| 94 for (const TmmbItem& item : items_) { | 94 for (const TmmbItem& item : items_) { |
| 95 item.Create(packet + *index); | 95 item.Create(packet + *index); |
| 96 *index += TmmbItem::kLength; | 96 *index += TmmbItem::kLength; |
| 97 } | 97 } |
| 98 RTC_CHECK_EQ(index_end, *index); | 98 RTC_CHECK_EQ(index_end, *index); |
| 99 return true; | 99 return true; |
| 100 } | 100 } |
| 101 } // namespace rtcp | 101 } // namespace rtcp |
| 102 } // namespace webrtc | 102 } // namespace webrtc |
| OLD | NEW |