OLD | NEW |
---|---|
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 Loading... | |
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 RTC_DCHECK_LE(len + 1, sizeof(header->extension.stream_id)); | |
nisse-webrtc
2017/04/10 07:15:27
len+1 here is a bit confusing, but I guess that's
danilchap
2017/04/10 08:39:41
Agree, I'll make a small follow up cl to make len
| |
451 header->extension.stream_id_size = len + 1; | |
452 memcpy(header->extension.stream_id, ptr, len + 1); | |
453 break; | |
454 } | |
455 case kRtpExtensionRepairedRtpStreamId: { | |
456 RTC_DCHECK_LE(len + 1, sizeof(header->extension.repaired_stream_id)); | |
457 header->extension.repaired_stream_id_size = len + 1; | |
458 memcpy(header->extension.repaired_stream_id, ptr, len + 1); | |
459 break; | |
460 } | |
449 case kRtpExtensionNone: | 461 case kRtpExtensionNone: |
450 case kRtpExtensionNumberOfExtensions: { | 462 case kRtpExtensionNumberOfExtensions: { |
451 RTC_NOTREACHED() << "Invalid extension type: " << type; | 463 RTC_NOTREACHED() << "Invalid extension type: " << type; |
452 return; | 464 return; |
453 } | 465 } |
454 } | 466 } |
455 } | 467 } |
456 ptr += (len + 1); | 468 ptr += (len + 1); |
457 } | 469 } |
458 } | 470 } |
459 | 471 |
460 } // namespace RtpUtility | 472 } // namespace RtpUtility |
461 } // namespace webrtc | 473 } // namespace webrtc |
OLD | NEW |