Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Side by Side Diff: media/cast/test/transport/transport.h

Issue 56333003: Adding transport to Cast/test (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Responding to review Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | media/cast/test/transport/transport.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef MEDIA_CAST_TEST_TRANSPORT_TRANSPORT_H_
6 #define MEDIA_CAST_TEST_TRANSPORT_TRANSPORT_H_
7
8 #include "base/memory/scoped_ptr.h"
9 #include "media/cast/cast_config.h"
10 #include "media/cast/cast_environment.h"
11 #include "net/udp/udp_server_socket.h"
12 #include "net/udp/udp_socket.h"
13
14
15 namespace media {
16 namespace cast {
17 namespace test {
18
19 class LocalUdpTransportData;
20 class LocalPacketSender;
21
22 // Helper class for Cast test applications.
23 class Transport {
24 public:
25 Transport(scoped_refptr<CastEnvironment> cast_environment);
26 ~Transport();
27
28 // Specifies the ports and IP address to receive packets on.
29 // Will start listening immediately.
30 void SetLocalReceiver(PacketReceiver* packet_receiver,
31 std::string ip_address,
32 int port);
33
34 // Specifies the destination port and IP address.
35 void SetSendDestination(std::string ip_address, int port);
36
37 PacketSender* packet_sender();
38
39 void SetSendSidePacketLoss(int percentage);
40
41 void StopReceiving();
42
43 private:
44 scoped_ptr<net::DatagramServerSocket> udp_socket_;
45 scoped_ptr<LocalPacketSender> packet_sender_;
46 scoped_ptr<LocalUdpTransportData> local_udp_transport_data_;
47
48 DISALLOW_COPY_AND_ASSIGN(Transport);
49 };
50
51 } // namespace test
52 } // namespace cast
53 } // namespace media
54
55 #endif // MEDIA_CAST_TEST_TRANSPORT_TRANSPORT_H_
OLDNEW
« no previous file with comments | « no previous file | media/cast/test/transport/transport.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698