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

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

Issue 1376673004: Add a PacketOptions struct to webrtc::Transport. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: . 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 13 matching lines...) Expand all
24 24
25 using namespace webrtc; 25 using namespace webrtc;
26 26
27 27
28 class TestTransport : public Transport { 28 class TestTransport : public Transport {
29 public: 29 public:
30 TestTransport(RTCPReceiver* rtcp_receiver) : 30 TestTransport(RTCPReceiver* rtcp_receiver) :
31 rtcp_receiver_(rtcp_receiver) { 31 rtcp_receiver_(rtcp_receiver) {
32 } 32 }
33 33
34 bool SendRtp(const uint8_t* /*data*/, size_t /*len*/) override { 34 bool SendRtp(const uint8_t* /*data*/,
35 size_t /*len*/,
36 const PacketOptions& options) override {
35 return false; 37 return false;
36 } 38 }
37 bool SendRtcp(const uint8_t* packet, size_t packetLength) override { 39 bool SendRtcp(const uint8_t* packet, size_t packetLength) override {
38 RTCPUtility::RTCPParserV2 rtcpParser((uint8_t*)packet, 40 RTCPUtility::RTCPParserV2 rtcpParser((uint8_t*)packet,
39 packetLength, 41 packetLength,
40 true); // Allow non-compound RTCP 42 true); // Allow non-compound RTCP
41 43
42 EXPECT_TRUE(rtcpParser.IsValid()); 44 EXPECT_TRUE(rtcpParser.IsValid());
43 RTCPHelp::RTCPPacketInformation rtcpPacketInformation; 45 RTCPHelp::RTCPPacketInformation rtcpPacketInformation;
44 EXPECT_EQ(0, rtcp_receiver_->IncomingRTCPPacket(rtcpPacketInformation, 46 EXPECT_EQ(0, rtcp_receiver_->IncomingRTCPPacket(rtcpPacketInformation,
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 126
125 TEST_F(RtcpFormatRembTest, TestCompund) { 127 TEST_F(RtcpFormatRembTest, TestCompund) {
126 uint32_t SSRCs[2] = {456789, 98765}; 128 uint32_t SSRCs[2] = {456789, 98765};
127 rtcp_sender_->SetRTCPStatus(kRtcpCompound); 129 rtcp_sender_->SetRTCPStatus(kRtcpCompound);
128 rtcp_sender_->SetREMBData(1234, std::vector<uint32_t>(SSRCs, SSRCs + 2)); 130 rtcp_sender_->SetREMBData(1234, std::vector<uint32_t>(SSRCs, SSRCs + 2));
129 RTCPSender::FeedbackState feedback_state = 131 RTCPSender::FeedbackState feedback_state =
130 dummy_rtp_rtcp_impl_->GetFeedbackState(); 132 dummy_rtp_rtcp_impl_->GetFeedbackState();
131 EXPECT_EQ(0, rtcp_sender_->SendRTCP(feedback_state, kRtcpRemb)); 133 EXPECT_EQ(0, rtcp_sender_->SendRTCP(feedback_state, kRtcpRemb));
132 } 134 }
133 } // namespace 135 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698