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

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtcp_sender_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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 } 192 }
193 uint32_t ssrc_; 193 uint32_t ssrc_;
194 RtcpPacketTypeCounter counter_; 194 RtcpPacketTypeCounter counter_;
195 }; 195 };
196 196
197 class TestTransport : public Transport, 197 class TestTransport : public Transport,
198 public NullRtpData { 198 public NullRtpData {
199 public: 199 public:
200 TestTransport() {} 200 TestTransport() {}
201 201
202 bool SendRtp(const uint8_t* /*data*/, size_t /*len*/) override { 202 bool SendRtp(const uint8_t* /*data*/,
203 size_t /*len*/,
204 const PacketOptions& options) override {
203 return false; 205 return false;
204 } 206 }
205 bool SendRtcp(const uint8_t* data, size_t len) override { 207 bool SendRtcp(const uint8_t* data, size_t len) override {
206 parser_.Parse(static_cast<const uint8_t*>(data), len); 208 parser_.Parse(static_cast<const uint8_t*>(data), len);
207 return true; 209 return true;
208 } 210 }
209 int OnReceivedPayloadData(const uint8_t* payload_data, 211 int OnReceivedPayloadData(const uint8_t* payload_data,
210 const size_t payload_size, 212 const size_t payload_size,
211 const WebRtcRTPHeader* rtp_header) override { 213 const WebRtcRTPHeader* rtp_header) override {
212 return 0; 214 return 0;
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
753 rtcp_sender_->SetREMBData(kBitrate, ssrcs); 755 rtcp_sender_->SetREMBData(kBitrate, ssrcs);
754 std::set<RTCPPacketType> packet_types; 756 std::set<RTCPPacketType> packet_types;
755 packet_types.insert(kRtcpRemb); 757 packet_types.insert(kRtcpRemb);
756 packet_types.insert(kRtcpPli); 758 packet_types.insert(kRtcpPli);
757 EXPECT_EQ(0, rtcp_sender_->SendCompoundRTCP(feedback_state(), packet_types)); 759 EXPECT_EQ(0, rtcp_sender_->SendCompoundRTCP(feedback_state(), packet_types));
758 EXPECT_EQ(1, parser()->remb_item()->num_packets()); 760 EXPECT_EQ(1, parser()->remb_item()->num_packets());
759 EXPECT_EQ(1, parser()->pli()->num_packets()); 761 EXPECT_EQ(1, parser()->pli()->num_packets());
760 } 762 }
761 763
762 } // namespace webrtc 764 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtcp_receiver_unittest.cc ('k') | webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698