OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 #ifndef WEBRTC_TEST_RTP_RTCP_OBSERVER_H_ | 10 #ifndef WEBRTC_TEST_RTP_RTCP_OBSERVER_H_ |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 const int timeout_ms_; | 87 const int timeout_ms_; |
88 }; | 88 }; |
89 | 89 |
90 class PacketTransport : public test::DirectTransport { | 90 class PacketTransport : public test::DirectTransport { |
91 public: | 91 public: |
92 enum TransportType { kReceiver, kSender }; | 92 enum TransportType { kReceiver, kSender }; |
93 | 93 |
94 PacketTransport(Call* send_call, | 94 PacketTransport(Call* send_call, |
95 RtpRtcpObserver* observer, | 95 RtpRtcpObserver* observer, |
96 TransportType transport_type, | 96 TransportType transport_type, |
97 MediaType media_type, | 97 const std::map<uint8_t, MediaType>& payload_type_map, |
98 const FakeNetworkPipe::Config& configuration) | 98 const FakeNetworkPipe::Config& configuration) |
99 : test::DirectTransport(configuration, send_call, media_type), | 99 : test::DirectTransport(configuration, send_call, payload_type_map), |
100 observer_(observer), | 100 observer_(observer), |
101 transport_type_(transport_type) {} | 101 transport_type_(transport_type) {} |
102 | 102 |
103 private: | 103 private: |
104 bool SendRtp(const uint8_t* packet, | 104 bool SendRtp(const uint8_t* packet, |
105 size_t length, | 105 size_t length, |
106 const PacketOptions& options) override { | 106 const PacketOptions& options) override { |
107 EXPECT_FALSE(RtpHeaderParser::IsRtcp(packet, length)); | 107 EXPECT_FALSE(RtpHeaderParser::IsRtcp(packet, length)); |
108 RtpRtcpObserver::Action action; | 108 RtpRtcpObserver::Action action; |
109 { | 109 { |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 return true; // Will never happen, makes compiler happy. | 143 return true; // Will never happen, makes compiler happy. |
144 } | 144 } |
145 | 145 |
146 RtpRtcpObserver* const observer_; | 146 RtpRtcpObserver* const observer_; |
147 TransportType transport_type_; | 147 TransportType transport_type_; |
148 }; | 148 }; |
149 } // namespace test | 149 } // namespace test |
150 } // namespace webrtc | 150 } // namespace webrtc |
151 | 151 |
152 #endif // WEBRTC_TEST_RTP_RTCP_OBSERVER_H_ | 152 #endif // WEBRTC_TEST_RTP_RTCP_OBSERVER_H_ |
OLD | NEW |