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

Side by Side Diff: media/cast/net/pacing/paced_sender.h

Issue 388663003: Cast: Reshuffle files under media/cast (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: missing includes Created 6 years, 5 months 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
OLDNEW
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_TRANSPORT_PACING_PACED_SENDER_H_ 5 #ifndef MEDIA_CAST_NET_PACING_PACED_SENDER_H_
6 #define MEDIA_CAST_TRANSPORT_PACING_PACED_SENDER_H_ 6 #define MEDIA_CAST_NET_PACING_PACED_SENDER_H_
7 7
8 #include <list> 8 #include <list>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "base/single_thread_task_runner.h" 14 #include "base/single_thread_task_runner.h"
15 #include "base/threading/non_thread_safe.h" 15 #include "base/threading/non_thread_safe.h"
16 #include "base/time/default_tick_clock.h" 16 #include "base/time/default_tick_clock.h"
17 #include "base/time/tick_clock.h" 17 #include "base/time/tick_clock.h"
18 #include "base/time/time.h" 18 #include "base/time/time.h"
19 #include "media/cast/transport/cast_transport_config.h" 19 #include "media/cast/logging/logging_defines.h"
20 #include "media/cast/transport/transport/udp_transport.h" 20 #include "media/cast/net/cast_transport_config.h"
21 21
22 namespace media { 22 namespace media {
23 namespace cast { 23 namespace cast {
24 24
25 class LoggingImpl; 25 class LoggingImpl;
26 26
27 namespace transport {
28
29 // Use std::pair for free comparison operators. 27 // Use std::pair for free comparison operators.
30 // { capture_time, ssrc, packet_id } 28 // { capture_time, ssrc, packet_id }
31 // The PacketKey is designed to meet two criteria: 29 // The PacketKey is designed to meet two criteria:
32 // 1. When we re-send the same packet again, we can use the packet key 30 // 1. When we re-send the same packet again, we can use the packet key
33 // to identify it so that we can de-duplicate packets in the queue. 31 // to identify it so that we can de-duplicate packets in the queue.
34 // 2. The sort order of the PacketKey determines the order that packets 32 // 2. The sort order of the PacketKey determines the order that packets
35 // are sent out. Using the capture_time as the first member basically 33 // are sent out. Using the capture_time as the first member basically
36 // means that older packets are sent first. 34 // means that older packets are sent first.
37 typedef std::pair<base::TimeTicks, std::pair<uint32, uint16> > PacketKey; 35 typedef std::pair<base::TimeTicks, std::pair<uint32, uint16> > PacketKey;
38 typedef std::vector<std::pair<PacketKey, PacketRef> > SendPacketVector; 36 typedef std::vector<std::pair<PacketKey, PacketRef> > SendPacketVector;
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 base::TimeTicks burst_end_; 131 base::TimeTicks burst_end_;
134 132
135 State state_; 133 State state_;
136 134
137 // NOTE: Weak pointers must be invalidated before all other member variables. 135 // NOTE: Weak pointers must be invalidated before all other member variables.
138 base::WeakPtrFactory<PacedSender> weak_factory_; 136 base::WeakPtrFactory<PacedSender> weak_factory_;
139 137
140 DISALLOW_COPY_AND_ASSIGN(PacedSender); 138 DISALLOW_COPY_AND_ASSIGN(PacedSender);
141 }; 139 };
142 140
143 } // namespace transport
144 } // namespace cast 141 } // namespace cast
145 } // namespace media 142 } // namespace media
146 143
147 #endif // MEDIA_CAST_TRANSPORT_PACING_PACED_SENDER_H_ 144 #endif // MEDIA_CAST_NET_PACING_PACED_SENDER_H_
OLDNEW
« no previous file with comments | « media/cast/net/pacing/mock_paced_packet_sender.cc ('k') | media/cast/net/pacing/paced_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698