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_DIRECT_TRANSPORT_H_ | 10 #ifndef WEBRTC_TEST_DIRECT_TRANSPORT_H_ |
11 #define WEBRTC_TEST_DIRECT_TRANSPORT_H_ | 11 #define WEBRTC_TEST_DIRECT_TRANSPORT_H_ |
12 | 12 |
13 #include <assert.h> | 13 #include <assert.h> |
14 | 14 |
15 #include <deque> | 15 #include <deque> |
16 | 16 |
17 #include "webrtc/base/criticalsection.h" | 17 #include "webrtc/base/criticalsection.h" |
| 18 #include "webrtc/base/event.h" |
18 #include "webrtc/base/platform_thread.h" | 19 #include "webrtc/base/platform_thread.h" |
19 #include "webrtc/base/scoped_ptr.h" | 20 #include "webrtc/base/scoped_ptr.h" |
20 #include "webrtc/system_wrappers/include/event_wrapper.h" | |
21 #include "webrtc/test/fake_network_pipe.h" | 21 #include "webrtc/test/fake_network_pipe.h" |
22 #include "webrtc/transport.h" | 22 #include "webrtc/transport.h" |
23 | 23 |
24 namespace webrtc { | 24 namespace webrtc { |
25 | 25 |
26 class Call; | 26 class Call; |
27 class Clock; | 27 class Clock; |
28 class PacketReceiver; | 28 class PacketReceiver; |
29 | 29 |
30 namespace test { | 30 namespace test { |
(...skipping 14 matching lines...) Expand all Loading... |
45 size_t length, | 45 size_t length, |
46 const PacketOptions& options) override; | 46 const PacketOptions& options) override; |
47 bool SendRtcp(const uint8_t* data, size_t length) override; | 47 bool SendRtcp(const uint8_t* data, size_t length) override; |
48 | 48 |
49 private: | 49 private: |
50 static bool NetworkProcess(void* transport); | 50 static bool NetworkProcess(void* transport); |
51 bool SendPackets(); | 51 bool SendPackets(); |
52 | 52 |
53 rtc::CriticalSection lock_; | 53 rtc::CriticalSection lock_; |
54 Call* const send_call_; | 54 Call* const send_call_; |
55 rtc::scoped_ptr<EventWrapper> packet_event_; | 55 rtc::Event packet_event_; |
56 rtc::PlatformThread thread_; | 56 rtc::PlatformThread thread_; |
57 Clock* const clock_; | 57 Clock* const clock_; |
58 | 58 |
59 bool shutting_down_; | 59 bool shutting_down_; |
60 | 60 |
61 FakeNetworkPipe fake_network_; | 61 FakeNetworkPipe fake_network_; |
62 }; | 62 }; |
63 } // namespace test | 63 } // namespace test |
64 } // namespace webrtc | 64 } // namespace webrtc |
65 | 65 |
66 #endif // WEBRTC_TEST_DIRECT_TRANSPORT_H_ | 66 #endif // WEBRTC_TEST_DIRECT_TRANSPORT_H_ |
OLD | NEW |