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

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

Issue 1376673004: Add a PacketOptions struct to webrtc::Transport. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Comment added 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 21 matching lines...) Expand all
32 namespace { // Anonymous namespace; hide utility functions and classes. 32 namespace { // Anonymous namespace; hide utility functions and classes.
33 33
34 // This test transport verifies that no functions get called. 34 // This test transport verifies that no functions get called.
35 class TestTransport : public Transport, 35 class TestTransport : public Transport,
36 public NullRtpData { 36 public NullRtpData {
37 public: 37 public:
38 explicit TestTransport() : rtcp_receiver_(nullptr) {} 38 explicit TestTransport() : rtcp_receiver_(nullptr) {}
39 void SetRTCPReceiver(RTCPReceiver* rtcp_receiver) { 39 void SetRTCPReceiver(RTCPReceiver* rtcp_receiver) {
40 rtcp_receiver_ = rtcp_receiver; 40 rtcp_receiver_ = rtcp_receiver;
41 } 41 }
42 bool SendRtp(const uint8_t* /*data*/, size_t /*len*/) override { 42 bool SendRtp(const uint8_t* /*data*/,
43 size_t /*len*/,
44 const PacketOptions& options) override {
43 ADD_FAILURE(); // FAIL() gives a compile error. 45 ADD_FAILURE(); // FAIL() gives a compile error.
44 return false; 46 return false;
45 } 47 }
46 48
47 bool SendRtcp(const uint8_t* packet, size_t packet_len) override { 49 bool SendRtcp(const uint8_t* packet, size_t packet_len) override {
48 ADD_FAILURE(); 50 ADD_FAILURE();
49 return true; 51 return true;
50 } 52 }
51 53
52 int OnReceivedPayloadData(const uint8_t* payloadData, 54 int OnReceivedPayloadData(const uint8_t* payloadData,
(...skipping 1033 matching lines...) Expand 10 before | Expand all | Expand 10 after
1086 1088
1087 // Transport feedback should be ignored, but next packet should work. 1089 // Transport feedback should be ignored, but next packet should work.
1088 EXPECT_EQ(0u, rtcp_packet_info_.rtcpPacketTypeFlags & kRtcpTransportFeedback); 1090 EXPECT_EQ(0u, rtcp_packet_info_.rtcpPacketTypeFlags & kRtcpTransportFeedback);
1089 EXPECT_NE(0u, rtcp_packet_info_.rtcpPacketTypeFlags & kRtcpRemb); 1091 EXPECT_NE(0u, rtcp_packet_info_.rtcpPacketTypeFlags & kRtcpRemb);
1090 EXPECT_EQ(kBitrateBps, rtcp_packet_info_.receiverEstimatedMaxBitrate); 1092 EXPECT_EQ(kBitrateBps, rtcp_packet_info_.receiverEstimatedMaxBitrate);
1091 } 1093 }
1092 1094
1093 } // Anonymous namespace 1095 } // Anonymous namespace
1094 1096
1095 } // namespace webrtc 1097 } // 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_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698