| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 644 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 644 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 645 // | packet chunk | recv delta | recv delta | | 645 // | packet chunk | recv delta | recv delta | |
| 646 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 646 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 647 // . . | 647 // . . |
| 648 // . . | 648 // . . |
| 649 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 649 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 650 // | recv delta | recv delta | zero padding | | 650 // | recv delta | recv delta | zero padding | |
| 651 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 651 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 652 | 652 |
| 653 // De-serialize packet. | 653 // De-serialize packet. |
| 654 std::unique_ptr<TransportFeedback> TransportFeedback::ParseFrom( | 654 rtc::scoped_ptr<TransportFeedback> TransportFeedback::ParseFrom( |
| 655 const uint8_t* buffer, | 655 const uint8_t* buffer, |
| 656 size_t length) { | 656 size_t length) { |
| 657 std::unique_ptr<TransportFeedback> packet(new TransportFeedback()); | 657 rtc::scoped_ptr<TransportFeedback> packet(new TransportFeedback()); |
| 658 | 658 |
| 659 if (length < kMinSizeBytes) { | 659 if (length < kMinSizeBytes) { |
| 660 LOG(LS_WARNING) << "Buffer too small (" << length | 660 LOG(LS_WARNING) << "Buffer too small (" << length |
| 661 << " bytes) to fit a " | 661 << " bytes) to fit a " |
| 662 "FeedbackPacket. Minimum size = " << kMinSizeBytes; | 662 "FeedbackPacket. Minimum size = " << kMinSizeBytes; |
| 663 return nullptr; | 663 return nullptr; |
| 664 } | 664 } |
| 665 | 665 |
| 666 RTCPUtility::RtcpCommonHeader header; | 666 RTCPUtility::RtcpCommonHeader header; |
| 667 if (!RtcpParseCommonHeader(buffer, length, &header)) | 667 if (!RtcpParseCommonHeader(buffer, length, &header)) |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 767 "RLE block of size " << rle_chunk->NumSymbols() | 767 "RLE block of size " << rle_chunk->NumSymbols() |
| 768 << " but only " << max_size << " left to read."; | 768 << " but only " << max_size << " left to read."; |
| 769 delete rle_chunk; | 769 delete rle_chunk; |
| 770 return nullptr; | 770 return nullptr; |
| 771 } | 771 } |
| 772 return rle_chunk; | 772 return rle_chunk; |
| 773 } | 773 } |
| 774 | 774 |
| 775 } // namespace rtcp | 775 } // namespace rtcp |
| 776 } // namespace webrtc | 776 } // namespace webrtc |
| OLD | NEW |