| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 payload_(NULL), | 70 payload_(NULL), |
| 71 packet_length_bytes_(allocated_bytes), | 71 packet_length_bytes_(allocated_bytes), |
| 72 payload_length_bytes_(0), | 72 payload_length_bytes_(0), |
| 73 virtual_packet_length_bytes_(virtual_packet_length_bytes), | 73 virtual_packet_length_bytes_(virtual_packet_length_bytes), |
| 74 virtual_payload_length_bytes_(0), | 74 virtual_payload_length_bytes_(0), |
| 75 time_ms_(time_ms) { | 75 time_ms_(time_ms) { |
| 76 std::unique_ptr<RtpHeaderParser> parser(RtpHeaderParser::Create()); | 76 std::unique_ptr<RtpHeaderParser> parser(RtpHeaderParser::Create()); |
| 77 valid_header_ = ParseHeader(*parser); | 77 valid_header_ = ParseHeader(*parser); |
| 78 } | 78 } |
| 79 | 79 |
| 80 Packet::~Packet() = default; |
| 81 |
| 80 bool Packet::ExtractRedHeaders(std::list<RTPHeader*>* headers) const { | 82 bool Packet::ExtractRedHeaders(std::list<RTPHeader*>* headers) const { |
| 81 // | 83 // |
| 82 // 0 1 2 3 | 84 // 0 1 2 3 |
| 83 // 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 | 85 // 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 |
| 84 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 86 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 85 // |1| block PT | timestamp offset | block length | | 87 // |1| block PT | timestamp offset | block length | |
| 86 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 88 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 87 // |1| ... | | 89 // |1| ... | |
| 88 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 90 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 89 // |0| block PT | | 91 // |0| block PT | |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 destination->payload_type_frequency = header_.payload_type_frequency; | 164 destination->payload_type_frequency = header_.payload_type_frequency; |
| 163 memcpy(&destination->arrOfCSRCs, | 165 memcpy(&destination->arrOfCSRCs, |
| 164 &header_.arrOfCSRCs, | 166 &header_.arrOfCSRCs, |
| 165 sizeof(header_.arrOfCSRCs)); | 167 sizeof(header_.arrOfCSRCs)); |
| 166 memcpy( | 168 memcpy( |
| 167 &destination->extension, &header_.extension, sizeof(header_.extension)); | 169 &destination->extension, &header_.extension, sizeof(header_.extension)); |
| 168 } | 170 } |
| 169 | 171 |
| 170 } // namespace test | 172 } // namespace test |
| 171 } // namespace webrtc | 173 } // namespace webrtc |
| OLD | NEW |