diff options
author | danilchap <danilchap@webrtc.org> | 2015-11-27 05:36:09 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-11-27 13:36:17 +0000 |
commit | f8385aded0943c7889d6e9b92f3c0978f3657bb2 (patch) | |
tree | 135af4f32aabf33802606049f95a33fc7b5e1311 /webrtc | |
parent | e997a7de1419c447d46cfc230111deffcbdfab19 (diff) | |
download | webrtc-f8385aded0943c7889d6e9b92f3c0978f3657bb2.tar.gz |
rtcp::Pli moved into own file and got a Parse function
Created rtcp::Psfb abstract class between rtcp::Pli and rtcp::RtcpPacket to hold common data for Feedback Message.
BUG=webrtc:5260
Review URL: https://codereview.webrtc.org/1446513002
Cr-Commit-Position: refs/heads/master@{#10823}
Diffstat (limited to 'webrtc')
-rw-r--r-- | webrtc/modules/modules.gyp | 1 | ||||
-rw-r--r-- | webrtc/modules/rtp_rtcp/BUILD.gn | 4 | ||||
-rw-r--r-- | webrtc/modules/rtp_rtcp/rtp_rtcp.gypi | 4 | ||||
-rw-r--r-- | webrtc/modules/rtp_rtcp/source/rtcp_packet.cc | 43 | ||||
-rw-r--r-- | webrtc/modules/rtp_rtcp/source/rtcp_packet.h | 51 | ||||
-rw-r--r-- | webrtc/modules/rtp_rtcp/source/rtcp_packet/pli.cc | 70 | ||||
-rw-r--r-- | webrtc/modules/rtp_rtcp/source/rtcp_packet/pli.h | 49 | ||||
-rw-r--r-- | webrtc/modules/rtp_rtcp/source/rtcp_packet/pli_unittest.cc | 66 | ||||
-rw-r--r-- | webrtc/modules/rtp_rtcp/source/rtcp_packet/psfb.cc | 45 | ||||
-rw-r--r-- | webrtc/modules/rtp_rtcp/source/rtcp_packet/psfb.h | 48 | ||||
-rw-r--r-- | webrtc/modules/rtp_rtcp/source/rtcp_packet_unittest.cc | 14 | ||||
-rw-r--r-- | webrtc/modules/rtp_rtcp/source/rtcp_receiver_unittest.cc | 1 | ||||
-rw-r--r-- | webrtc/modules/rtp_rtcp/source/rtcp_sender.cc | 1 |
13 files changed, 289 insertions, 108 deletions
diff --git a/webrtc/modules/modules.gyp b/webrtc/modules/modules.gyp index 599a931fb9..3d99253e4c 100644 --- a/webrtc/modules/modules.gyp +++ b/webrtc/modules/modules.gyp @@ -307,6 +307,7 @@ 'rtp_rtcp/source/rtcp_packet/app_unittest.cc', 'rtp_rtcp/source/rtcp_packet/bye_unittest.cc', 'rtp_rtcp/source/rtcp_packet/extended_jitter_report_unittest.cc', + 'rtp_rtcp/source/rtcp_packet/pli_unittest.cc', 'rtp_rtcp/source/rtcp_packet/report_block_unittest.cc', 'rtp_rtcp/source/rtcp_packet/transport_feedback_unittest.cc', 'rtp_rtcp/source/rtcp_receiver_unittest.cc', diff --git a/webrtc/modules/rtp_rtcp/BUILD.gn b/webrtc/modules/rtp_rtcp/BUILD.gn index 03b72adf6f..9624658cd4 100644 --- a/webrtc/modules/rtp_rtcp/BUILD.gn +++ b/webrtc/modules/rtp_rtcp/BUILD.gn @@ -52,6 +52,10 @@ source_set("rtp_rtcp") { "source/rtcp_packet/bye.h", "source/rtcp_packet/extended_jitter_report.cc", "source/rtcp_packet/extended_jitter_report.h", + "source/rtcp_packet/pli.cc", + "source/rtcp_packet/pli.h", + "source/rtcp_packet/psfb.cc", + "source/rtcp_packet/psfb.h", "source/rtcp_packet/report_block.cc", "source/rtcp_packet/report_block.h", "source/rtcp_packet/transport_feedback.cc", diff --git a/webrtc/modules/rtp_rtcp/rtp_rtcp.gypi b/webrtc/modules/rtp_rtcp/rtp_rtcp.gypi index eaa5b157fb..1e69c1226a 100644 --- a/webrtc/modules/rtp_rtcp/rtp_rtcp.gypi +++ b/webrtc/modules/rtp_rtcp/rtp_rtcp.gypi @@ -47,6 +47,10 @@ 'source/rtcp_packet/bye.h', 'source/rtcp_packet/extended_jitter_report.cc', 'source/rtcp_packet/extended_jitter_report.h', + 'source/rtcp_packet/pli.cc', + 'source/rtcp_packet/pli.h', + 'source/rtcp_packet/psfb.cc', + 'source/rtcp_packet/psfb.h', 'source/rtcp_packet/report_block.cc', 'source/rtcp_packet/report_block.h', 'source/rtcp_packet/transport_feedback.cc', diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_packet.cc b/webrtc/modules/rtp_rtcp/source/rtcp_packet.cc index e3305186a0..d23abdcdcf 100644 --- a/webrtc/modules/rtp_rtcp/source/rtcp_packet.cc +++ b/webrtc/modules/rtp_rtcp/source/rtcp_packet.cc @@ -31,7 +31,6 @@ using webrtc::RTCPUtility::RTCPPacketAPP; using webrtc::RTCPUtility::RTCPPacketPSFBAPP; using webrtc::RTCPUtility::RTCPPacketPSFBFIR; using webrtc::RTCPUtility::RTCPPacketPSFBFIRItem; -using webrtc::RTCPUtility::RTCPPacketPSFBPLI; using webrtc::RTCPUtility::RTCPPacketPSFBREMBItem; using webrtc::RTCPUtility::RTCPPacketPSFBRPSI; using webrtc::RTCPUtility::RTCPPacketPSFBSLI; @@ -203,34 +202,6 @@ void CreateSdes(const std::vector<Sdes::Chunk>& chunks, } } -// RFC 4585: Feedback format. -// -// Common packet format: -// -// 0 1 2 3 -// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// |V=2|P| FMT | PT | length | -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// | SSRC of packet sender | -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// | SSRC of media source | -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// : Feedback Control Information (FCI) : -// : -// - -// Picture loss indication (PLI) (RFC 4585). -// -// FCI: no feedback control information. - -void CreatePli(const RTCPPacketPSFBPLI& pli, - uint8_t* buffer, - size_t* pos) { - AssignUWord32(buffer, pos, pli.SenderSSRC); - AssignUWord32(buffer, pos, pli.MediaSSRC); -} - // Slice loss indication (SLI) (RFC 4585). // // FCI: @@ -777,20 +748,6 @@ size_t Sdes::BlockLength() const { return length; } -bool Pli::Create(uint8_t* packet, - size_t* index, - size_t max_length, - RtcpPacket::PacketReadyCallback* callback) const { - while (*index + BlockLength() > max_length) { - if (!OnBufferFull(packet, index, callback)) - return false; - } - const uint8_t kFmt = 1; - CreateHeader(kFmt, PT_PSFB, HeaderLength(), packet, index); - CreatePli(pli_, packet, index); - return true; -} - bool Sli::Create(uint8_t* packet, size_t* index, size_t max_length, diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_packet.h b/webrtc/modules/rtp_rtcp/source/rtcp_packet.h index 3ac66184bd..8e7e983f9a 100644 --- a/webrtc/modules/rtp_rtcp/source/rtcp_packet.h +++ b/webrtc/modules/rtp_rtcp/source/rtcp_packet.h @@ -319,57 +319,6 @@ class Sdes : public RtcpPacket { RTC_DISALLOW_COPY_AND_ASSIGN(Sdes); }; -// RFC 4585: Feedback format. -// -// Common packet format: -// -// 0 1 2 3 -// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// |V=2|P| FMT | PT | length | -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// | SSRC of packet sender | -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// | SSRC of media source | -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// : Feedback Control Information (FCI) : -// : - -// Picture loss indication (PLI) (RFC 4585). -// -// FCI: no feedback control information. - -class Pli : public RtcpPacket { - public: - Pli() : RtcpPacket() { - memset(&pli_, 0, sizeof(pli_)); - } - - virtual ~Pli() {} - - void From(uint32_t ssrc) { - pli_.SenderSSRC = ssrc; - } - void To(uint32_t ssrc) { - pli_.MediaSSRC = ssrc; - } - - protected: - bool Create(uint8_t* packet, - size_t* index, - size_t max_length, - RtcpPacket::PacketReadyCallback* callback) const override; - - private: - size_t BlockLength() const { - return kCommonFbFmtLength; - } - - RTCPUtility::RTCPPacketPSFBPLI pli_; - - RTC_DISALLOW_COPY_AND_ASSIGN(Pli); -}; - // Slice loss indication (SLI) (RFC 4585). // // FCI: diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_packet/pli.cc b/webrtc/modules/rtp_rtcp/source/rtcp_packet/pli.cc new file mode 100644 index 0000000000..3673491058 --- /dev/null +++ b/webrtc/modules/rtp_rtcp/source/rtcp_packet/pli.cc @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/pli.h" + +#include "webrtc/base/checks.h" +#include "webrtc/base/logging.h" + +using webrtc::RTCPUtility::RtcpCommonHeader; + +namespace webrtc { +namespace rtcp { + +// RFC 4585: Feedback format. +// +// Common packet format: +// +// 0 1 2 3 +// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +// |V=2|P| FMT | PT | length | +// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +// | SSRC of packet sender | +// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +// | SSRC of media source | +// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +// : Feedback Control Information (FCI) : +// : : + +// +// Picture loss indication (PLI) (RFC 4585). +// FCI: no feedback control information. +bool Pli::Parse(const RtcpCommonHeader& header, const uint8_t* payload) { + RTC_DCHECK(header.packet_type == kPacketType); + RTC_DCHECK(header.count_or_format == kFeedbackMessageType); + + if (header.payload_size_bytes < kCommonFeedbackLength) { + LOG(LS_WARNING) << "Packet is too small to be a valid PLI packet"; + return false; + } + + ParseCommonFeedback(payload); + return true; +} + +bool Pli::Create(uint8_t* packet, + size_t* index, + size_t max_length, + RtcpPacket::PacketReadyCallback* callback) const { + while (*index + BlockLength() > max_length) { + if (!OnBufferFull(packet, index, callback)) + return false; + } + + CreateHeader(kFeedbackMessageType, kPacketType, HeaderLength(), packet, + index); + CreateCommonFeedback(packet + *index); + *index += kCommonFeedbackLength; + return true; +} + +} // namespace rtcp +} // namespace webrtc diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_packet/pli.h b/webrtc/modules/rtp_rtcp/source/rtcp_packet/pli.h new file mode 100644 index 0000000000..5567825830 --- /dev/null +++ b/webrtc/modules/rtp_rtcp/source/rtcp_packet/pli.h @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + * + */ + +#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_PLI_H_ +#define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_PLI_H_ + +#include "webrtc/base/basictypes.h" +#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/psfb.h" + +namespace webrtc { +namespace rtcp { + +// Picture loss indication (PLI) (RFC 4585). +class Pli : public Psfb { + public: + static const uint8_t kFeedbackMessageType = 1; + + Pli() {} + virtual ~Pli() {} + + // Parse assumes header is already parsed and validated. + bool Parse(const RTCPUtility::RtcpCommonHeader& header, + const uint8_t* payload); // Size of the payload is in the header. + + protected: + bool Create(uint8_t* packet, + size_t* index, + size_t max_length, + RtcpPacket::PacketReadyCallback* callback) const override; + + private: + size_t BlockLength() const override { + return kHeaderLength + kCommonFeedbackLength; + } + + RTC_DISALLOW_COPY_AND_ASSIGN(Pli); +}; + +} // namespace rtcp +} // namespace webrtc +#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_PLI_H_ diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_packet/pli_unittest.cc b/webrtc/modules/rtp_rtcp/source/rtcp_packet/pli_unittest.cc new file mode 100644 index 0000000000..1c47c3ffb1 --- /dev/null +++ b/webrtc/modules/rtp_rtcp/source/rtcp_packet/pli_unittest.cc @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/pli.h" + +#include "testing/gtest/include/gtest/gtest.h" +#include "webrtc/modules/rtp_rtcp/source/rtcp_utility.h" + +using webrtc::rtcp::Pli; +using webrtc::rtcp::RawPacket; +using webrtc::RTCPUtility::RtcpCommonHeader; +using webrtc::RTCPUtility::RtcpParseCommonHeader; + +namespace webrtc { +namespace { + +const uint32_t kSenderSsrc = 0x12345678; +const uint32_t kRemoteSsrc = 0x23456789; +// Manually created Pli packet matching constants above. +const uint8_t kPacket[] = {0x81, 206, 0x00, 0x02, + 0x12, 0x34, 0x56, 0x78, + 0x23, 0x45, 0x67, 0x89}; +const size_t kPacketLength = sizeof(kPacket); + +TEST(RtcpPacketPliTest, Parse) { + RtcpCommonHeader header; + EXPECT_TRUE(RtcpParseCommonHeader(kPacket, kPacketLength, &header)); + Pli mutable_parsed; + EXPECT_TRUE(mutable_parsed.Parse( + header, kPacket + RtcpCommonHeader::kHeaderSizeBytes)); + const Pli& parsed = mutable_parsed; // Read values from constant object. + + EXPECT_EQ(kSenderSsrc, parsed.sender_ssrc()); + EXPECT_EQ(kRemoteSsrc, parsed.media_ssrc()); +} + +TEST(RtcpPacketPliTest, Create) { + Pli pli; + pli.From(kSenderSsrc); + pli.To(kRemoteSsrc); + + rtc::scoped_ptr<RawPacket> packet(pli.Build()); + + ASSERT_EQ(kPacketLength, packet->Length()); + EXPECT_EQ(0, memcmp(kPacket, packet->Buffer(), kPacketLength)); +} + +TEST(RtcpPacketPliTest, ParseFailsOnTooSmallPacket) { + RtcpCommonHeader header; + EXPECT_TRUE(RtcpParseCommonHeader(kPacket, kPacketLength, &header)); + header.payload_size_bytes--; + + Pli parsed; + EXPECT_FALSE( + parsed.Parse(header, kPacket + RtcpCommonHeader::kHeaderSizeBytes)); +} + +} // namespace +} // namespace webrtc diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_packet/psfb.cc b/webrtc/modules/rtp_rtcp/source/rtcp_packet/psfb.cc new file mode 100644 index 0000000000..d1ee401dab --- /dev/null +++ b/webrtc/modules/rtp_rtcp/source/rtcp_packet/psfb.cc @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/psfb.h" + +#include "webrtc/modules/rtp_rtcp/source/byte_io.h" + +namespace webrtc { +namespace rtcp { + +// RFC 4585: Feedback format. +// +// Common packet format: +// +// 0 1 2 3 +// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +// |V=2|P| FMT | PT | length | +// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +// 0 | SSRC of packet sender | +// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +// 4 | SSRC of media source | +// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +// : Feedback Control Information (FCI) : +// : : + +void Psfb::ParseCommonFeedback(const uint8_t* payload) { + sender_ssrc_ = ByteReader<uint32_t>::ReadBigEndian(&payload[0]); + media_ssrc_ = ByteReader<uint32_t>::ReadBigEndian(&payload[4]); +} + +void Psfb::CreateCommonFeedback(uint8_t* payload) const { + ByteWriter<uint32_t>::WriteBigEndian(&payload[0], sender_ssrc_); + ByteWriter<uint32_t>::WriteBigEndian(&payload[4], media_ssrc_); +} + +} // namespace rtcp +} // namespace webrtc diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_packet/psfb.h b/webrtc/modules/rtp_rtcp/source/rtcp_packet/psfb.h new file mode 100644 index 0000000000..dddcdecba6 --- /dev/null +++ b/webrtc/modules/rtp_rtcp/source/rtcp_packet/psfb.h @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + * + */ + +#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_PSFB_H_ +#define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_PSFB_H_ + +#include "webrtc/base/basictypes.h" +#include "webrtc/modules/rtp_rtcp/source/rtcp_packet.h" + +namespace webrtc { +namespace rtcp { + +// PSFB: Payload-specific feedback message. +// RFC 4585, Section 6.3. +class Psfb : public RtcpPacket { + public: + static const uint8_t kPacketType = 206; + + Psfb() : sender_ssrc_(0), media_ssrc_(0) {} + virtual ~Psfb() {} + + void From(uint32_t ssrc) { sender_ssrc_ = ssrc; } + void To(uint32_t ssrc) { media_ssrc_ = ssrc; } + + uint32_t sender_ssrc() const { return sender_ssrc_; } + uint32_t media_ssrc() const { return media_ssrc_; } + + protected: + static const size_t kCommonFeedbackLength = 8; + void ParseCommonFeedback(const uint8_t* payload); + void CreateCommonFeedback(uint8_t* payload) const; + + private: + uint32_t sender_ssrc_; + uint32_t media_ssrc_; +}; + +} // namespace rtcp +} // namespace webrtc +#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_PSFB_H_ diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_packet_unittest.cc b/webrtc/modules/rtp_rtcp/source/rtcp_packet_unittest.cc index 3cf3feacd6..1743d99c50 100644 --- a/webrtc/modules/rtp_rtcp/source/rtcp_packet_unittest.cc +++ b/webrtc/modules/rtp_rtcp/source/rtcp_packet_unittest.cc @@ -26,7 +26,6 @@ using webrtc::rtcp::Dlrr; using webrtc::rtcp::Empty; using webrtc::rtcp::Fir; using webrtc::rtcp::Nack; -using webrtc::rtcp::Pli; using webrtc::rtcp::Sdes; using webrtc::rtcp::SenderReport; using webrtc::rtcp::Sli; @@ -296,19 +295,6 @@ TEST(RtcpPacketTest, CnameItemWithEmptyString) { EXPECT_EQ("", parser.sdes_chunk()->Cname()); } -TEST(RtcpPacketTest, Pli) { - Pli pli; - pli.From(kSenderSsrc); - pli.To(kRemoteSsrc); - - rtc::scoped_ptr<RawPacket> packet(pli.Build()); - RtcpPacketParser parser; - parser.Parse(packet->Buffer(), packet->Length()); - EXPECT_EQ(1, parser.pli()->num_packets()); - EXPECT_EQ(kSenderSsrc, parser.pli()->Ssrc()); - EXPECT_EQ(kRemoteSsrc, parser.pli()->MediaSsrc()); -} - TEST(RtcpPacketTest, Sli) { const uint16_t kFirstMb = 7777; const uint16_t kNumberOfMb = 6666; diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_receiver_unittest.cc b/webrtc/modules/rtp_rtcp/source/rtcp_receiver_unittest.cc index 5b0e656e32..ac0389a03d 100644 --- a/webrtc/modules/rtp_rtcp/source/rtcp_receiver_unittest.cc +++ b/webrtc/modules/rtp_rtcp/source/rtcp_receiver_unittest.cc @@ -28,6 +28,7 @@ #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/app.h" #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/bye.h" #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/extended_jitter_report.h" +#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/pli.h" #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback.h" namespace webrtc { diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc b/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc index 99292994c1..eea1c81b79 100644 --- a/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc +++ b/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc @@ -24,6 +24,7 @@ #include "webrtc/modules/rtp_rtcp/source/byte_io.h" #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/app.h" #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/bye.h" +#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/pli.h" #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback.h" #include "webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.h" #include "webrtc/system_wrappers/include/critical_section_wrapper.h" |