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

Unified Diff: webrtc/modules/rtp_rtcp/source/rtcp_receiver_unittest.cc

Issue 2742383004: Delete support for receiving RTCP RPSI and SLI messages. (Closed)
Patch Set: Rebased. Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc ('k') | webrtc/modules/rtp_rtcp/source/rtp_rtcp_config.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/rtp_rtcp/source/rtcp_receiver_unittest.cc
diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_receiver_unittest.cc b/webrtc/modules/rtp_rtcp/source/rtcp_receiver_unittest.cc
index c3ba79d2fc7badc4b246e525a5c9b58f9e5c0830..4b0255f23bf293e33ad0f6f13afb6d8606bbae6b 100644
--- a/webrtc/modules/rtp_rtcp/source/rtcp_receiver_unittest.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtcp_receiver_unittest.cc
@@ -28,10 +28,8 @@
#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/rapid_resync_request.h"
#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/receiver_report.h"
#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/remb.h"
-#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/rpsi.h"
#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/sdes.h"
#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/sender_report.h"
-#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/sli.h"
#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/tmmbr.h"
#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback.h"
#include "webrtc/modules/rtp_rtcp/source/rtcp_receiver.h"
@@ -65,8 +63,6 @@ class MockRtcpPacketTypeCounterObserver : public RtcpPacketTypeCounterObserver {
class MockRtcpIntraFrameObserver : public RtcpIntraFrameObserver {
public:
MOCK_METHOD1(OnReceivedIntraFrameRequest, void(uint32_t));
- MOCK_METHOD2(OnReceivedSLI, void(uint32_t, uint8_t));
- MOCK_METHOD2(OnReceivedRPSI, void(uint32_t, uint64_t));
};
class MockRtcpCallbackImpl : public RtcpStatisticsCallback {
@@ -176,60 +172,6 @@ TEST_F(RtcpReceiverTest, InvalidFeedbackPacketIsIgnored) {
InjectRtcpPacket(bad_packet);
}
-TEST_F(RtcpReceiverTest, RpsiWithFractionalPaddingIsIgnored) {
- // Padding size represent fractional number of bytes.
- const uint8_t kPaddingSizeBits = 0x0b;
- // clang-format off
- const uint8_t bad_packet[] = {0x80 | rtcp::Rpsi::kFeedbackMessageType,
- rtcp::Rpsi::kPacketType, 0, 3,
- 0x12, 0x34, 0x56, 0x78,
- 0x98, 0x76, 0x54, 0x32,
- kPaddingSizeBits, 0x00, 0x00, 0x00};
- // clang-format on
- EXPECT_CALL(intra_frame_observer_, OnReceivedRPSI(_, _)).Times(0);
- InjectRtcpPacket(bad_packet);
-}
-
-TEST_F(RtcpReceiverTest, RpsiWithTooLargePaddingIsIgnored) {
- // Padding size exceeds packet size.
- const uint8_t kPaddingSizeBits = 0xa8;
- // clang-format off
- const uint8_t bad_packet[] = {0x80 | rtcp::Rpsi::kFeedbackMessageType,
- rtcp::Rpsi::kPacketType, 0, 3,
- 0x12, 0x34, 0x56, 0x78,
- 0x98, 0x76, 0x54, 0x32,
- kPaddingSizeBits, 0x00, 0x00, 0x00};
- // clang-format on
- EXPECT_CALL(intra_frame_observer_, OnReceivedRPSI(_, _)).Times(0);
- InjectRtcpPacket(bad_packet);
-}
-
-// With parsing using rtcp classes this test will make no sense.
-// With current stateful parser this test was failing.
-TEST_F(RtcpReceiverTest, TwoHalfValidRpsiAreIgnored) {
- // clang-format off
- const uint8_t bad_packet[] = {0x80 | rtcp::Rpsi::kFeedbackMessageType,
- rtcp::Rpsi::kPacketType, 0, 2,
- 0x12, 0x34, 0x56, 0x78,
- 0x98, 0x76, 0x54, 0x32,
- 0x80 | rtcp::Rpsi::kFeedbackMessageType,
- rtcp::Rpsi::kPacketType, 0, 2,
- 0x12, 0x34, 0x56, 0x78,
- 0x98, 0x76, 0x54, 0x32};
- // clang-format on
- EXPECT_CALL(intra_frame_observer_, OnReceivedRPSI(_, _)).Times(0);
- InjectRtcpPacket(bad_packet);
-}
-
-TEST_F(RtcpReceiverTest, InjectRpsiPacket) {
- const uint64_t kPictureId = 0x123456789;
- rtcp::Rpsi rpsi;
- rpsi.SetPictureId(kPictureId);
-
- EXPECT_CALL(intra_frame_observer_, OnReceivedRPSI(_, kPictureId));
- InjectRtcpPacket(rpsi);
-}
-
TEST_F(RtcpReceiverTest, InjectSrPacket) {
RTCPSenderInfo info;
EXPECT_EQ(-1, rtcp_receiver_.SenderInfoReceived(&info));
@@ -684,15 +626,6 @@ TEST_F(RtcpReceiverTest, FirPacketNotToUsIgnored) {
InjectRtcpPacket(fir);
}
-TEST_F(RtcpReceiverTest, InjectSliPacket) {
- const uint8_t kPictureId = 40;
- rtcp::Sli sli;
- sli.AddPictureId(kPictureId);
-
- EXPECT_CALL(intra_frame_observer_, OnReceivedSLI(_, kPictureId));
- InjectRtcpPacket(sli);
-}
-
TEST_F(RtcpReceiverTest, ExtendedReportsPacketWithZeroReportBlocksIgnored) {
rtcp::ExtendedReports xr;
xr.SetSenderSsrc(kSenderSsrc);
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc ('k') | webrtc/modules/rtp_rtcp/source/rtp_rtcp_config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698