OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <errno.h> | 5 #include <errno.h> |
6 #include <fcntl.h> | 6 #include <fcntl.h> |
7 #include <linux/if_tun.h> | 7 #include <linux/if_tun.h> |
8 #include <linux/types.h> | 8 #include <linux/types.h> |
9 #include <math.h> | 9 #include <math.h> |
10 #include <net/if.h> | 10 #include <net/if.h> |
(...skipping 20 matching lines...) Expand all Loading... |
31 #include "base/rand_util.h" | 31 #include "base/rand_util.h" |
32 #include "base/run_loop.h" | 32 #include "base/run_loop.h" |
33 #include "base/single_thread_task_runner.h" | 33 #include "base/single_thread_task_runner.h" |
34 #include "base/synchronization/waitable_event.h" | 34 #include "base/synchronization/waitable_event.h" |
35 #include "base/threading/thread.h" | 35 #include "base/threading/thread.h" |
36 #include "base/threading/thread_task_runner_handle.h" | 36 #include "base/threading/thread_task_runner_handle.h" |
37 #include "base/time/default_tick_clock.h" | 37 #include "base/time/default_tick_clock.h" |
38 #include "media/cast/test/utility/udp_proxy.h" | 38 #include "media/cast/test/utility/udp_proxy.h" |
39 #include "net/base/io_buffer.h" | 39 #include "net/base/io_buffer.h" |
40 #include "net/base/net_errors.h" | 40 #include "net/base/net_errors.h" |
41 #include "net/udp/udp_socket.h" | 41 #include "net/socket/udp_socket.h" |
42 | 42 |
43 namespace media { | 43 namespace media { |
44 namespace cast { | 44 namespace cast { |
45 namespace test { | 45 namespace test { |
46 | 46 |
47 const size_t kMaxPacketSize = 4096; | 47 const size_t kMaxPacketSize = 4096; |
48 | 48 |
49 class SendToFDPipe : public PacketPipe { | 49 class SendToFDPipe : public PacketPipe { |
50 public: | 50 public: |
51 explicit SendToFDPipe(int fd) : fd_(fd) { | 51 explicit SendToFDPipe(int fd) : fd_(fd) { |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 | 307 |
308 base::MessageLoopForIO message_loop; | 308 base::MessageLoopForIO message_loop; |
309 base::FileDescriptorWatcher file_descriptor_watcher(&message_loop); | 309 base::FileDescriptorWatcher file_descriptor_watcher(&message_loop); |
310 last_printout = base::TimeTicks::Now(); | 310 last_printout = base::TimeTicks::Now(); |
311 media::cast::test::QueueManager qm1(fd1, fd2, std::move(in_pipe)); | 311 media::cast::test::QueueManager qm1(fd1, fd2, std::move(in_pipe)); |
312 media::cast::test::QueueManager qm2(fd2, fd1, std::move(out_pipe)); | 312 media::cast::test::QueueManager qm2(fd2, fd1, std::move(out_pipe)); |
313 CheckByteCounters(); | 313 CheckByteCounters(); |
314 printf("Press Ctrl-C when done.\n"); | 314 printf("Press Ctrl-C when done.\n"); |
315 base::RunLoop().Run(); | 315 base::RunLoop().Run(); |
316 } | 316 } |
OLD | NEW |