OLD | NEW |
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 |
11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
12 | 12 |
13 #include "webrtc/common_types.h" | 13 #include "webrtc/common_types.h" |
14 #include "webrtc/modules/remote_bitrate_estimator/include/bwe_defines.h" | 14 #include "webrtc/modules/remote_bitrate_estimator/include/bwe_defines.h" |
15 #include "webrtc/modules/remote_bitrate_estimator/include/mock/mock_remote_bitra
te_observer.h" | 15 #include "webrtc/modules/remote_bitrate_estimator/include/mock/mock_remote_bitra
te_observer.h" |
16 #include "webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_singl
e_stream.h" | 16 #include "webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_singl
e_stream.h" |
17 #include "webrtc/modules/rtp_rtcp/source/rtcp_receiver.h" | 17 #include "webrtc/modules/rtp_rtcp/source/rtcp_receiver.h" |
18 #include "webrtc/modules/rtp_rtcp/source/rtcp_sender.h" | 18 #include "webrtc/modules/rtp_rtcp/source/rtcp_sender.h" |
19 #include "webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.h" | 19 #include "webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.h" |
20 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h" | 20 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h" |
21 #include "webrtc/test/null_transport.h" | 21 #include "webrtc/test/null_transport.h" |
22 #include "webrtc/typedefs.h" | 22 #include "webrtc/typedefs.h" |
23 | 23 |
24 namespace webrtc { | 24 namespace webrtc { |
25 namespace { | 25 namespace { |
26 | 26 |
27 class TestTransport : public Transport { | 27 class TestTransport : public Transport { |
28 public: | 28 public: |
29 TestTransport(RTCPReceiver* rtcp_receiver) : rtcp_receiver_(rtcp_receiver) {} | 29 explicit TestTransport(RTCPReceiver* rtcp_receiver) |
| 30 : rtcp_receiver_(rtcp_receiver) {} |
30 | 31 |
31 bool SendRtp(const uint8_t* /*data*/, | 32 bool SendRtp(const uint8_t* /*data*/, |
32 size_t /*len*/, | 33 size_t /*len*/, |
33 const PacketOptions& options) override { | 34 const PacketOptions& options) override { |
34 return false; | 35 return false; |
35 } | 36 } |
36 bool SendRtcp(const uint8_t* packet, size_t packetLength) override { | 37 bool SendRtcp(const uint8_t* packet, size_t packetLength) override { |
37 RTCPUtility::RTCPParserV2 rtcpParser(packet, packetLength, | 38 RTCPUtility::RTCPParserV2 rtcpParser(packet, packetLength, |
38 true); // Allow non-compound RTCP | 39 true); // Allow non-compound RTCP |
39 | 40 |
(...skipping 83 matching lines...) Loading... |
123 TEST_F(RtcpFormatRembTest, TestCompund) { | 124 TEST_F(RtcpFormatRembTest, TestCompund) { |
124 uint32_t SSRCs[2] = {456789, 98765}; | 125 uint32_t SSRCs[2] = {456789, 98765}; |
125 rtcp_sender_->SetRTCPStatus(RtcpMode::kCompound); | 126 rtcp_sender_->SetRTCPStatus(RtcpMode::kCompound); |
126 rtcp_sender_->SetREMBData(1234, std::vector<uint32_t>(SSRCs, SSRCs + 2)); | 127 rtcp_sender_->SetREMBData(1234, std::vector<uint32_t>(SSRCs, SSRCs + 2)); |
127 RTCPSender::FeedbackState feedback_state = | 128 RTCPSender::FeedbackState feedback_state = |
128 dummy_rtp_rtcp_impl_->GetFeedbackState(); | 129 dummy_rtp_rtcp_impl_->GetFeedbackState(); |
129 EXPECT_EQ(0, rtcp_sender_->SendRTCP(feedback_state, kRtcpRemb)); | 130 EXPECT_EQ(0, rtcp_sender_->SendRTCP(feedback_state, kRtcpRemb)); |
130 } | 131 } |
131 } // namespace | 132 } // namespace |
132 } // namespace webrtc | 133 } // namespace webrtc |
OLD | NEW |