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 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
576 // . . | 576 // . . |
577 // | inter-arrival jitter | | 577 // | inter-arrival jitter | |
578 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 578 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
579 // | 579 // |
580 // If present, this RTCP packet must be placed after a receiver report | 580 // If present, this RTCP packet must be placed after a receiver report |
581 // (inside a compound RTCP packet), and MUST have the same value for RC | 581 // (inside a compound RTCP packet), and MUST have the same value for RC |
582 // (reception report count) as the receiver report. | 582 // (reception report count) as the receiver report. |
583 | 583 |
584 RTCPSender::BuildResult RTCPSender::BuildExtendedJitterReport( | 584 RTCPSender::BuildResult RTCPSender::BuildExtendedJitterReport( |
585 RtcpContext* ctx) { | 585 RtcpContext* ctx) { |
586 // sanity | 586 rtcp::Ij ij; |
587 if (ctx->position + 8 >= IP_PACKET_SIZE) | 587 ij.WithJitterItem(ctx->jitter_transmission_offset); |
588 | |
589 PacketBuiltCallback callback(ctx); | |
590 if (!ij.BuildExternalBuffer(&ctx->buffer[ctx->position], | |
591 ctx->buffer_size - ctx->position, | |
592 &callback)) { | |
588 return BuildResult::kTruncated; | 593 return BuildResult::kTruncated; |
594 } | |
589 | 595 |
590 // add picture loss indicator | |
591 uint8_t RC = 1; | |
592 *ctx->AllocateData(1) = 0x80 + RC; | |
593 *ctx->AllocateData(1) = 195; | |
594 | |
595 // Used fixed length of 2 | |
596 *ctx->AllocateData(1) = 0; | |
597 *ctx->AllocateData(1) = 1; | |
598 | |
599 // Add inter-arrival jitter | |
600 ByteWriter<uint32_t>::WriteBigEndian(ctx->AllocateData(4), | |
601 ctx->jitter_transmission_offset); | |
åsapersson
2015/06/25 15:14:25
Not related to this cl but it seems like ctx->jitt
sprang_webrtc
2015/07/08 08:57:59
Indeed it seems so. This has evidently been the ca
stefan-webrtc
2015/07/08 09:09:39
I don't think it makes much sense to keep the tran
sprang_webrtc
2015/07/23 13:50:40
Acknowledged.
| |
602 return BuildResult::kSuccess; | 596 return BuildResult::kSuccess; |
603 } | 597 } |
604 | 598 |
605 RTCPSender::BuildResult RTCPSender::BuildPLI(RtcpContext* ctx) { | 599 RTCPSender::BuildResult RTCPSender::BuildPLI(RtcpContext* ctx) { |
606 // sanity | 600 // sanity |
607 if (ctx->position + 12 >= IP_PACKET_SIZE) | 601 if (ctx->position + 12 >= IP_PACKET_SIZE) |
608 return BuildResult::kTruncated; | 602 return BuildResult::kTruncated; |
609 | 603 |
610 // add picture loss indicator | 604 // add picture loss indicator |
611 uint8_t FMT = 1; | 605 uint8_t FMT = 1; |
(...skipping 946 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1558 | 1552 |
1559 bool RTCPSender::AllVolatileFlagsConsumed() const { | 1553 bool RTCPSender::AllVolatileFlagsConsumed() const { |
1560 for (const ReportFlag& flag : report_flags_) { | 1554 for (const ReportFlag& flag : report_flags_) { |
1561 if (flag.is_volatile) | 1555 if (flag.is_volatile) |
1562 return false; | 1556 return false; |
1563 } | 1557 } |
1564 return true; | 1558 return true; |
1565 } | 1559 } |
1566 | 1560 |
1567 } // namespace webrtc | 1561 } // namespace webrtc |
OLD | NEW |