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

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

Issue 2805023002: Add read support of RtpStreamId/RepairedRtpStreamId header extensions. (Closed)
Patch Set: RtpStreamId::Parse return false on empty rsid Created 3 years, 8 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
OLDNEW
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 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 439 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
440 440
441 int min_playout_delay = (ptr[0] << 4) | ((ptr[1] >> 4) & 0xf); 441 int min_playout_delay = (ptr[0] << 4) | ((ptr[1] >> 4) & 0xf);
442 int max_playout_delay = ((ptr[1] & 0xf) << 8) | ptr[2]; 442 int max_playout_delay = ((ptr[1] & 0xf) << 8) | ptr[2];
443 header->extension.playout_delay.min_ms = 443 header->extension.playout_delay.min_ms =
444 min_playout_delay * PlayoutDelayLimits::kGranularityMs; 444 min_playout_delay * PlayoutDelayLimits::kGranularityMs;
445 header->extension.playout_delay.max_ms = 445 header->extension.playout_delay.max_ms =
446 max_playout_delay * PlayoutDelayLimits::kGranularityMs; 446 max_playout_delay * PlayoutDelayLimits::kGranularityMs;
447 break; 447 break;
448 } 448 }
449 case kRtpExtensionRtpStreamId: {
450 header->extension.stream_id.Set(rtc::MakeArrayView(ptr, len + 1));
nisse-webrtc 2017/04/11 10:42:53 This (and kRtpExtensionRepairedRtpStreamId below)
danilchap 2017/04/11 12:51:26 Yes, but that would produce a stream_id that is .e
nisse-webrtc 2017/04/11 13:34:49 Ok.
451 break;
452 }
453 case kRtpExtensionRepairedRtpStreamId: {
454 header->extension.repaired_stream_id.Set(
455 rtc::MakeArrayView(ptr, len + 1));
456 break;
457 }
449 case kRtpExtensionNone: 458 case kRtpExtensionNone:
450 case kRtpExtensionNumberOfExtensions: { 459 case kRtpExtensionNumberOfExtensions: {
451 RTC_NOTREACHED() << "Invalid extension type: " << type; 460 RTC_NOTREACHED() << "Invalid extension type: " << type;
452 return; 461 return;
453 } 462 }
454 } 463 }
455 } 464 }
456 ptr += (len + 1); 465 ptr += (len + 1);
457 } 466 }
458 } 467 }
459 468
460 } // namespace RtpUtility 469 } // namespace RtpUtility
461 } // namespace webrtc 470 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698