OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 | 225 |
226 bool RTPPayloadRegistry::IsRtx(const RTPHeader& header) const { | 226 bool RTPPayloadRegistry::IsRtx(const RTPHeader& header) const { |
227 CriticalSectionScoped cs(crit_sect_.get()); | 227 CriticalSectionScoped cs(crit_sect_.get()); |
228 return IsRtxInternal(header); | 228 return IsRtxInternal(header); |
229 } | 229 } |
230 | 230 |
231 bool RTPPayloadRegistry::IsRtxInternal(const RTPHeader& header) const { | 231 bool RTPPayloadRegistry::IsRtxInternal(const RTPHeader& header) const { |
232 return rtx_ && ssrc_rtx_ == header.ssrc; | 232 return rtx_ && ssrc_rtx_ == header.ssrc; |
233 } | 233 } |
234 | 234 |
| 235 bool RTPPayloadRegistry::RestoreOriginalPacket(uint8_t** restored_packet, |
| 236 const uint8_t* packet, |
| 237 size_t* packet_length, |
| 238 uint32_t original_ssrc, |
| 239 const RTPHeader& header) const { |
| 240 return RestoreOriginalPacket(*restored_packet, packet, packet_length, |
| 241 original_ssrc, header); |
| 242 } |
| 243 |
235 bool RTPPayloadRegistry::RestoreOriginalPacket(uint8_t* restored_packet, | 244 bool RTPPayloadRegistry::RestoreOriginalPacket(uint8_t* restored_packet, |
236 const uint8_t* packet, | 245 const uint8_t* packet, |
237 size_t* packet_length, | 246 size_t* packet_length, |
238 uint32_t original_ssrc, | 247 uint32_t original_ssrc, |
239 const RTPHeader& header) const { | 248 const RTPHeader& header) const { |
240 if (kRtxHeaderSize + header.headerLength + header.paddingLength > | 249 if (kRtxHeaderSize + header.headerLength + header.paddingLength > |
241 *packet_length) { | 250 *packet_length) { |
242 return false; | 251 return false; |
243 } | 252 } |
244 const uint8_t* rtx_header = packet + header.headerLength; | 253 const uint8_t* rtx_header = packet + header.headerLength; |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
474 RTPPayloadStrategy* RTPPayloadStrategy::CreateStrategy( | 483 RTPPayloadStrategy* RTPPayloadStrategy::CreateStrategy( |
475 const bool handling_audio) { | 484 const bool handling_audio) { |
476 if (handling_audio) { | 485 if (handling_audio) { |
477 return new RTPPayloadAudioStrategy(); | 486 return new RTPPayloadAudioStrategy(); |
478 } else { | 487 } else { |
479 return new RTPPayloadVideoStrategy(); | 488 return new RTPPayloadVideoStrategy(); |
480 } | 489 } |
481 } | 490 } |
482 | 491 |
483 } // namespace webrtc | 492 } // namespace webrtc |
OLD | NEW |