OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef MEDIA_CAST_TEST_TRANSPORT_TRANSPORT_H_ | 5 #ifndef MEDIA_CAST_TEST_TRANSPORT_TRANSPORT_H_ |
6 #define MEDIA_CAST_TEST_TRANSPORT_TRANSPORT_H_ | 6 #define MEDIA_CAST_TEST_TRANSPORT_TRANSPORT_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "media/cast/cast_config.h" | 9 #include "media/cast/cast_config.h" |
10 #include "media/cast/cast_environment.h" | 10 #include "media/cast/cast_environment.h" |
11 #include "net/udp/udp_server_socket.h" | 11 #include "net/udp/udp_server_socket.h" |
12 #include "net/udp/udp_socket.h" | |
13 | 12 |
14 | 13 |
15 namespace media { | 14 namespace media { |
16 namespace cast { | 15 namespace cast { |
17 namespace test { | 16 namespace test { |
18 | 17 |
19 class LocalUdpTransportData; | 18 class LocalUdpTransportData; |
20 class LocalPacketSender; | 19 class LocalPacketSender; |
21 | 20 |
22 // Helper class for Cast test applications. | 21 // Helper class for Cast test applications. |
(...skipping 12 matching lines...) Expand all Loading... |
35 // Specifies the destination port and IP address. | 34 // Specifies the destination port and IP address. |
36 void SetSendDestination(std::string ip_address, int port); | 35 void SetSendDestination(std::string ip_address, int port); |
37 | 36 |
38 PacketSender* packet_sender(); | 37 PacketSender* packet_sender(); |
39 | 38 |
40 void SetSendSidePacketLoss(int percentage); | 39 void SetSendSidePacketLoss(int percentage); |
41 | 40 |
42 void StopReceiving(); | 41 void StopReceiving(); |
43 | 42 |
44 private: | 43 private: |
45 scoped_ptr<net::DatagramServerSocket> udp_socket_; | 44 scoped_ptr<net::UDPServerSocket> udp_socket_; |
46 scoped_refptr<LocalPacketSender> packet_sender_; | 45 scoped_refptr<LocalPacketSender> packet_sender_; |
47 scoped_refptr<LocalUdpTransportData> local_udp_transport_data_; | 46 scoped_refptr<LocalUdpTransportData> local_udp_transport_data_; |
48 scoped_refptr<base::TaskRunner> io_thread_proxy_; | 47 scoped_refptr<base::TaskRunner> io_thread_proxy_; |
49 | 48 |
50 DISALLOW_COPY_AND_ASSIGN(Transport); | 49 DISALLOW_COPY_AND_ASSIGN(Transport); |
51 }; | 50 }; |
52 | 51 |
53 } // namespace test | 52 } // namespace test |
54 } // namespace cast | 53 } // namespace cast |
55 } // namespace media | 54 } // namespace media |
56 | 55 |
57 #endif // MEDIA_CAST_TEST_TRANSPORT_TRANSPORT_H_ | 56 #endif // MEDIA_CAST_TEST_TRANSPORT_TRANSPORT_H_ |
OLD | NEW |