| 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 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 // 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | 458 // 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 |
| 459 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 459 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 460 // |V=2|P| IC | PT | length | | 460 // |V=2|P| IC | PT | length | |
| 461 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 461 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 462 // | 462 // |
| 463 // Common header for all RTCP packets, 4 octets. | 463 // Common header for all RTCP packets, 4 octets. |
| 464 | 464 |
| 465 bool RTCPUtility::RtcpParseCommonHeader(const uint8_t* packet, | 465 bool RTCPUtility::RtcpParseCommonHeader(const uint8_t* packet, |
| 466 size_t size_bytes, | 466 size_t size_bytes, |
| 467 RtcpCommonHeader* parsed_header) { | 467 RtcpCommonHeader* parsed_header) { |
| 468 DCHECK(parsed_header != nullptr); | 468 RTC_DCHECK(parsed_header != nullptr); |
| 469 if (size_bytes < RtcpCommonHeader::kHeaderSizeBytes) { | 469 if (size_bytes < RtcpCommonHeader::kHeaderSizeBytes) { |
| 470 LOG(LS_WARNING) << "Too little data (" << size_bytes << " byte" | 470 LOG(LS_WARNING) << "Too little data (" << size_bytes << " byte" |
| 471 << (size_bytes != 1 ? "s" : "") | 471 << (size_bytes != 1 ? "s" : "") |
| 472 << ") remaining in buffer to parse RTCP header (4 bytes)."; | 472 << ") remaining in buffer to parse RTCP header (4 bytes)."; |
| 473 return false; | 473 return false; |
| 474 } | 474 } |
| 475 | 475 |
| 476 const uint8_t kRtcpVersion = 2; | 476 const uint8_t kRtcpVersion = 2; |
| 477 uint8_t version = packet[0] >> 6; | 477 uint8_t version = packet[0] >> 6; |
| 478 if (version != kRtcpVersion) { | 478 if (version != kRtcpVersion) { |
| (...skipping 1212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1691 const RTCPUtility::RtcpCommonHeader* | 1691 const RTCPUtility::RtcpCommonHeader* |
| 1692 RTCPUtility::RTCPPacketIterator::Current() { | 1692 RTCPUtility::RTCPPacketIterator::Current() { |
| 1693 if (!_ptrBlock) | 1693 if (!_ptrBlock) |
| 1694 { | 1694 { |
| 1695 return NULL; | 1695 return NULL; |
| 1696 } | 1696 } |
| 1697 | 1697 |
| 1698 return &_header; | 1698 return &_header; |
| 1699 } | 1699 } |
| 1700 } // namespace webrtc | 1700 } // namespace webrtc |
| OLD | NEW |