| 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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 | 223 |
| 224 bool RTPPayloadRegistry::IsRtx(const RTPHeader& header) const { | 224 bool RTPPayloadRegistry::IsRtx(const RTPHeader& header) const { |
| 225 rtc::CritScope cs(&crit_sect_); | 225 rtc::CritScope cs(&crit_sect_); |
| 226 return IsRtxInternal(header); | 226 return IsRtxInternal(header); |
| 227 } | 227 } |
| 228 | 228 |
| 229 bool RTPPayloadRegistry::IsRtxInternal(const RTPHeader& header) const { | 229 bool RTPPayloadRegistry::IsRtxInternal(const RTPHeader& header) const { |
| 230 return rtx_ && ssrc_rtx_ == header.ssrc; | 230 return rtx_ && ssrc_rtx_ == header.ssrc; |
| 231 } | 231 } |
| 232 | 232 |
| 233 bool RTPPayloadRegistry::RestoreOriginalPacket(uint8_t** restored_packet, | |
| 234 const uint8_t* packet, | |
| 235 size_t* packet_length, | |
| 236 uint32_t original_ssrc, | |
| 237 const RTPHeader& header) const { | |
| 238 return RestoreOriginalPacket(*restored_packet, packet, packet_length, | |
| 239 original_ssrc, header); | |
| 240 } | |
| 241 | |
| 242 bool RTPPayloadRegistry::RestoreOriginalPacket(uint8_t* restored_packet, | 233 bool RTPPayloadRegistry::RestoreOriginalPacket(uint8_t* restored_packet, |
| 243 const uint8_t* packet, | 234 const uint8_t* packet, |
| 244 size_t* packet_length, | 235 size_t* packet_length, |
| 245 uint32_t original_ssrc, | 236 uint32_t original_ssrc, |
| 246 const RTPHeader& header) const { | 237 const RTPHeader& header) const { |
| 247 if (kRtxHeaderSize + header.headerLength + header.paddingLength > | 238 if (kRtxHeaderSize + header.headerLength + header.paddingLength > |
| 248 *packet_length) { | 239 *packet_length) { |
| 249 return false; | 240 return false; |
| 250 } | 241 } |
| 251 const uint8_t* rtx_header = packet + header.headerLength; | 242 const uint8_t* rtx_header = packet + header.headerLength; |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 473 RTPPayloadStrategy* RTPPayloadStrategy::CreateStrategy( | 464 RTPPayloadStrategy* RTPPayloadStrategy::CreateStrategy( |
| 474 const bool handling_audio) { | 465 const bool handling_audio) { |
| 475 if (handling_audio) { | 466 if (handling_audio) { |
| 476 return new RTPPayloadAudioStrategy(); | 467 return new RTPPayloadAudioStrategy(); |
| 477 } else { | 468 } else { |
| 478 return new RTPPayloadVideoStrategy(); | 469 return new RTPPayloadVideoStrategy(); |
| 479 } | 470 } |
| 480 } | 471 } |
| 481 | 472 |
| 482 } // namespace webrtc | 473 } // namespace webrtc |
| OLD | NEW |