Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(462)

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc

Issue 1414543002: Add back an override of RestoreOriginalPacket. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Add comment about deprecation Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/modules/rtp_rtcp/interface/rtp_payload_registry.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/interface/rtp_payload_registry.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698