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 19 matching lines...) Expand all Loading... |
30 namespace { // Anonymous namespace; hide utility functions and classes. | 30 namespace { // Anonymous namespace; hide utility functions and classes. |
31 | 31 |
32 // This test transport verifies that no functions get called. | 32 // This test transport verifies that no functions get called. |
33 class TestTransport : public Transport, | 33 class TestTransport : public Transport, |
34 public NullRtpData { | 34 public NullRtpData { |
35 public: | 35 public: |
36 explicit TestTransport() : rtcp_receiver_(nullptr) {} | 36 explicit TestTransport() : rtcp_receiver_(nullptr) {} |
37 void SetRTCPReceiver(RTCPReceiver* rtcp_receiver) { | 37 void SetRTCPReceiver(RTCPReceiver* rtcp_receiver) { |
38 rtcp_receiver_ = rtcp_receiver; | 38 rtcp_receiver_ = rtcp_receiver; |
39 } | 39 } |
40 int SendPacket(const void* /*data*/, size_t /*len*/) override { | 40 bool SendRtp(const uint8_t* /*data*/, size_t /*len*/) override { |
41 ADD_FAILURE(); // FAIL() gives a compile error. | 41 ADD_FAILURE(); // FAIL() gives a compile error. |
42 return -1; | 42 return false; |
43 } | 43 } |
44 | 44 |
45 int SendRTCPPacket(const void* packet, size_t packet_len) override { | 45 bool SendRtcp(const uint8_t* packet, size_t packet_len) override { |
46 ADD_FAILURE(); | 46 ADD_FAILURE(); |
47 return 0; | 47 return true; |
48 } | 48 } |
49 | 49 |
50 int OnReceivedPayloadData(const uint8_t* payloadData, | 50 int OnReceivedPayloadData(const uint8_t* payloadData, |
51 const size_t payloadSize, | 51 const size_t payloadSize, |
52 const WebRtcRTPHeader* rtpHeader) override { | 52 const WebRtcRTPHeader* rtpHeader) override { |
53 ADD_FAILURE(); | 53 ADD_FAILURE(); |
54 return 0; | 54 return 0; |
55 } | 55 } |
56 RTCPReceiver* rtcp_receiver_; | 56 RTCPReceiver* rtcp_receiver_; |
57 }; | 57 }; |
(...skipping 963 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1021 rr2.WithReportBlock(rb2); | 1021 rr2.WithReportBlock(rb2); |
1022 rtc::scoped_ptr<rtcp::RawPacket> p2(rr2.Build()); | 1022 rtc::scoped_ptr<rtcp::RawPacket> p2(rr2.Build()); |
1023 EXPECT_EQ(0, InjectRtcpPacket(p2->Buffer(), p2->Length())); | 1023 EXPECT_EQ(0, InjectRtcpPacket(p2->Buffer(), p2->Length())); |
1024 EXPECT_TRUE(callback.Matches(kSourceSsrc, kSequenceNumber, kFractionLoss, | 1024 EXPECT_TRUE(callback.Matches(kSourceSsrc, kSequenceNumber, kFractionLoss, |
1025 kCumulativeLoss, kJitter)); | 1025 kCumulativeLoss, kJitter)); |
1026 } | 1026 } |
1027 | 1027 |
1028 } // Anonymous namespace | 1028 } // Anonymous namespace |
1029 | 1029 |
1030 } // namespace webrtc | 1030 } // namespace webrtc |
OLD | NEW |