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

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

Issue 1369263002: Unify Transport and newapi::Transport interfaces. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: self-review Created 5 years, 2 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 19 matching lines...) Expand all
30 namespace { // Anonymous namespace; hide utility functions and classes. 30 namespace { // Anonymous namespace; hide utility functions and classes.
31 31
32 // This test transport verifies that no functions get called. 32 // This test transport verifies that no functions get called.
33 class TestTransport : public Transport, 33 class TestTransport : public Transport,
34 public NullRtpData { 34 public NullRtpData {
35 public: 35 public:
36 explicit TestTransport() : rtcp_receiver_(nullptr) {} 36 explicit TestTransport() : rtcp_receiver_(nullptr) {}
37 void SetRTCPReceiver(RTCPReceiver* rtcp_receiver) { 37 void SetRTCPReceiver(RTCPReceiver* rtcp_receiver) {
38 rtcp_receiver_ = rtcp_receiver; 38 rtcp_receiver_ = rtcp_receiver;
39 } 39 }
40 int SendPacket(const void* /*data*/, size_t /*len*/) override { 40 bool SendRtp(const uint8_t* /*data*/, size_t /*len*/) override {
41 ADD_FAILURE(); // FAIL() gives a compile error. 41 ADD_FAILURE(); // FAIL() gives a compile error.
42 return -1; 42 return false;
43 } 43 }
44 44
45 int SendRTCPPacket(const void* packet, size_t packet_len) override { 45 bool SendRtcp(const uint8_t* packet, size_t packet_len) override {
46 ADD_FAILURE(); 46 ADD_FAILURE();
47 return 0; 47 return true;
48 } 48 }
49 49
50 int OnReceivedPayloadData(const uint8_t* payloadData, 50 int OnReceivedPayloadData(const uint8_t* payloadData,
51 const size_t payloadSize, 51 const size_t payloadSize,
52 const WebRtcRTPHeader* rtpHeader) override { 52 const WebRtcRTPHeader* rtpHeader) override {
53 ADD_FAILURE(); 53 ADD_FAILURE();
54 return 0; 54 return 0;
55 } 55 }
56 RTCPReceiver* rtcp_receiver_; 56 RTCPReceiver* rtcp_receiver_;
57 }; 57 };
(...skipping 963 matching lines...) Expand 10 before | Expand all | Expand 10 after
1021 rr2.WithReportBlock(rb2); 1021 rr2.WithReportBlock(rb2);
1022 rtc::scoped_ptr<rtcp::RawPacket> p2(rr2.Build()); 1022 rtc::scoped_ptr<rtcp::RawPacket> p2(rr2.Build());
1023 EXPECT_EQ(0, InjectRtcpPacket(p2->Buffer(), p2->Length())); 1023 EXPECT_EQ(0, InjectRtcpPacket(p2->Buffer(), p2->Length()));
1024 EXPECT_TRUE(callback.Matches(kSourceSsrc, kSequenceNumber, kFractionLoss, 1024 EXPECT_TRUE(callback.Matches(kSourceSsrc, kSequenceNumber, kFractionLoss,
1025 kCumulativeLoss, kJitter)); 1025 kCumulativeLoss, kJitter));
1026 } 1026 }
1027 1027
1028 } // Anonymous namespace 1028 } // Anonymous namespace
1029 1029
1030 } // namespace webrtc 1030 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtcp_format_remb_unittest.cc ('k') | webrtc/modules/rtp_rtcp/source/rtcp_sender.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698