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 |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 int SendPacket(const void* /*data*/, size_t /*len*/) override { | 202 bool SendRtp(const uint8_t* /*data*/, size_t /*len*/) override { |
203 return -1; | 203 return false; |
204 } | 204 } |
205 int SendRTCPPacket(const void* data, size_t len) override { | 205 bool SendRtcp(const uint8_t* data, size_t len) override { |
206 parser_.Parse(static_cast<const uint8_t*>(data), len); | 206 parser_.Parse(static_cast<const uint8_t*>(data), len); |
207 return static_cast<int>(len); | 207 return true; |
208 } | 208 } |
209 int OnReceivedPayloadData(const uint8_t* payload_data, | 209 int OnReceivedPayloadData(const uint8_t* payload_data, |
210 const size_t payload_size, | 210 const size_t payload_size, |
211 const WebRtcRTPHeader* rtp_header) override { | 211 const WebRtcRTPHeader* rtp_header) override { |
212 return 0; | 212 return 0; |
213 } | 213 } |
214 test::RtcpPacketParser parser_; | 214 test::RtcpPacketParser parser_; |
215 }; | 215 }; |
216 | 216 |
217 namespace { | 217 namespace { |
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
755 rtcp_sender_->SetREMBData(kBitrate, ssrcs); | 755 rtcp_sender_->SetREMBData(kBitrate, ssrcs); |
756 std::set<RTCPPacketType> packet_types; | 756 std::set<RTCPPacketType> packet_types; |
757 packet_types.insert(kRtcpRemb); | 757 packet_types.insert(kRtcpRemb); |
758 packet_types.insert(kRtcpPli); | 758 packet_types.insert(kRtcpPli); |
759 EXPECT_EQ(0, rtcp_sender_->SendCompoundRTCP(feedback_state(), packet_types)); | 759 EXPECT_EQ(0, rtcp_sender_->SendCompoundRTCP(feedback_state(), packet_types)); |
760 EXPECT_EQ(1, parser()->remb_item()->num_packets()); | 760 EXPECT_EQ(1, parser()->remb_item()->num_packets()); |
761 EXPECT_EQ(1, parser()->pli()->num_packets()); | 761 EXPECT_EQ(1, parser()->pli()->num_packets()); |
762 } | 762 } |
763 | 763 |
764 } // namespace webrtc | 764 } // namespace webrtc |
OLD | NEW |