OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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 #ifndef WEBRTC_VOICE_ENGINE_TEST_AUTO_TEST_FAKES_CONFERENCE_TRANSPORT_H_ | 11 #ifndef WEBRTC_VOICE_ENGINE_TEST_AUTO_TEST_FAKES_CONFERENCE_TRANSPORT_H_ |
12 #define WEBRTC_VOICE_ENGINE_TEST_AUTO_TEST_FAKES_CONFERENCE_TRANSPORT_H_ | 12 #define WEBRTC_VOICE_ENGINE_TEST_AUTO_TEST_FAKES_CONFERENCE_TRANSPORT_H_ |
13 | 13 |
14 #include <deque> | 14 #include <deque> |
15 #include <map> | 15 #include <map> |
16 #include <utility> | 16 #include <utility> |
17 | 17 |
18 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
19 #include "webrtc/base/basictypes.h" | 19 #include "webrtc/base/basictypes.h" |
| 20 #include "webrtc/base/platform_thread.h" |
20 #include "webrtc/base/scoped_ptr.h" | 21 #include "webrtc/base/scoped_ptr.h" |
21 #include "webrtc/common_types.h" | 22 #include "webrtc/common_types.h" |
22 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h" | 23 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h" |
23 #include "webrtc/system_wrappers/include/critical_section_wrapper.h" | 24 #include "webrtc/system_wrappers/include/critical_section_wrapper.h" |
24 #include "webrtc/system_wrappers/include/event_wrapper.h" | 25 #include "webrtc/system_wrappers/include/event_wrapper.h" |
25 #include "webrtc/system_wrappers/include/thread_wrapper.h" | |
26 #include "webrtc/voice_engine/include/voe_base.h" | 26 #include "webrtc/voice_engine/include/voe_base.h" |
27 #include "webrtc/voice_engine/include/voe_codec.h" | 27 #include "webrtc/voice_engine/include/voe_codec.h" |
28 #include "webrtc/voice_engine/include/voe_file.h" | 28 #include "webrtc/voice_engine/include/voe_file.h" |
29 #include "webrtc/voice_engine/include/voe_network.h" | 29 #include "webrtc/voice_engine/include/voe_network.h" |
30 #include "webrtc/voice_engine/include/voe_rtp_rtcp.h" | 30 #include "webrtc/voice_engine/include/voe_rtp_rtcp.h" |
31 #include "webrtc/voice_engine/test/auto_test/fakes/loudest_filter.h" | 31 #include "webrtc/voice_engine/test/auto_test/fakes/loudest_filter.h" |
32 | 32 |
33 static const size_t kMaxPacketSizeByte = 1500; | 33 static const size_t kMaxPacketSizeByte = 1500; |
34 | 34 |
35 namespace voetest { | 35 namespace voetest { |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 } | 124 } |
125 | 125 |
126 int GetReceiverChannelForSsrc(unsigned int sender_ssrc) const; | 126 int GetReceiverChannelForSsrc(unsigned int sender_ssrc) const; |
127 void StorePacket(Packet::Type type, const void* data, size_t len); | 127 void StorePacket(Packet::Type type, const void* data, size_t len); |
128 void SendPacket(const Packet& packet); | 128 void SendPacket(const Packet& packet); |
129 bool DispatchPackets(); | 129 bool DispatchPackets(); |
130 | 130 |
131 const rtc::scoped_ptr<webrtc::CriticalSectionWrapper> pq_crit_; | 131 const rtc::scoped_ptr<webrtc::CriticalSectionWrapper> pq_crit_; |
132 const rtc::scoped_ptr<webrtc::CriticalSectionWrapper> stream_crit_; | 132 const rtc::scoped_ptr<webrtc::CriticalSectionWrapper> stream_crit_; |
133 const rtc::scoped_ptr<webrtc::EventWrapper> packet_event_; | 133 const rtc::scoped_ptr<webrtc::EventWrapper> packet_event_; |
134 const rtc::scoped_ptr<webrtc::ThreadWrapper> thread_; | 134 const rtc::scoped_ptr<webrtc::PlatformThread> thread_; |
135 | 135 |
136 unsigned int rtt_ms_; | 136 unsigned int rtt_ms_; |
137 unsigned int stream_count_; | 137 unsigned int stream_count_; |
138 | 138 |
139 std::map<unsigned int, std::pair<int, int>> streams_ | 139 std::map<unsigned int, std::pair<int, int>> streams_ |
140 GUARDED_BY(stream_crit_.get()); | 140 GUARDED_BY(stream_crit_.get()); |
141 std::deque<Packet> packet_queue_ GUARDED_BY(pq_crit_.get()); | 141 std::deque<Packet> packet_queue_ GUARDED_BY(pq_crit_.get()); |
142 | 142 |
143 int local_sender_; // Channel Id of local sender | 143 int local_sender_; // Channel Id of local sender |
144 int reflector_; | 144 int reflector_; |
(...skipping 10 matching lines...) Expand all Loading... |
155 webrtc::VoENetwork* remote_network_; | 155 webrtc::VoENetwork* remote_network_; |
156 webrtc::VoEFile* remote_file_; | 156 webrtc::VoEFile* remote_file_; |
157 | 157 |
158 LoudestFilter loudest_filter_; | 158 LoudestFilter loudest_filter_; |
159 | 159 |
160 const rtc::scoped_ptr<webrtc::RtpHeaderParser> rtp_header_parser_; | 160 const rtc::scoped_ptr<webrtc::RtpHeaderParser> rtp_header_parser_; |
161 }; | 161 }; |
162 } // namespace voetest | 162 } // namespace voetest |
163 | 163 |
164 #endif // WEBRTC_VOICE_ENGINE_TEST_AUTO_TEST_FAKES_CONFERENCE_TRANSPORT_H_ | 164 #endif // WEBRTC_VOICE_ENGINE_TEST_AUTO_TEST_FAKES_CONFERENCE_TRANSPORT_H_ |
OLD | NEW |