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_NET_PACING_PACED_SENDER_H_ | 5 #ifndef MEDIA_CAST_TRANSPORT_PACING_PACED_SENDER_H_ |
6 #define MEDIA_CAST_NET_PACING_PACED_SENDER_H_ | 6 #define MEDIA_CAST_TRANSPORT_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/threading/non_thread_safe.h" | 14 #include "base/threading/non_thread_safe.h" |
15 #include "base/time/default_tick_clock.h" | 15 #include "base/time/default_tick_clock.h" |
16 #include "base/time/tick_clock.h" | 16 #include "base/time/tick_clock.h" |
17 #include "base/time/time.h" | 17 #include "base/time/time.h" |
18 #include "media/cast/cast_config.h" | 18 #include "media/cast/cast_config.h" |
19 #include "media/cast/cast_environment.h" | 19 #include "media/cast/cast_environment.h" |
20 | 20 |
21 namespace media { | 21 namespace media { |
22 namespace cast { | 22 namespace cast { |
| 23 namespace transport { |
23 | 24 |
24 // We have this pure virtual class to enable mocking. | 25 // We have this pure virtual class to enable mocking. |
25 class PacedPacketSender { | 26 class PacedPacketSender { |
26 public: | 27 public: |
27 // Inform the pacer / sender of the total number of packets. | 28 // Inform the pacer / sender of the total number of packets. |
28 virtual bool SendPackets(const PacketList& packets) = 0; | 29 virtual bool SendPackets(const PacketList& packets) = 0; |
29 | 30 |
30 virtual bool ResendPackets(const PacketList& packets) = 0; | 31 virtual bool ResendPackets(const PacketList& packets) = 0; |
31 | 32 |
32 virtual bool SendRtcpPacket(const Packet& packet) = 0; | 33 virtual bool SendRtcpPacket(const Packet& packet) = 0; |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 // Note: We can't combine the |packet_list_| and the |resend_packet_list_| | 72 // Note: We can't combine the |packet_list_| and the |resend_packet_list_| |
72 // since then we might get reordering of the retransmitted packets. | 73 // since then we might get reordering of the retransmitted packets. |
73 PacketList packet_list_; | 74 PacketList packet_list_; |
74 PacketList resend_packet_list_; | 75 PacketList resend_packet_list_; |
75 | 76 |
76 base::WeakPtrFactory<PacedSender> weak_factory_; | 77 base::WeakPtrFactory<PacedSender> weak_factory_; |
77 | 78 |
78 DISALLOW_COPY_AND_ASSIGN(PacedSender); | 79 DISALLOW_COPY_AND_ASSIGN(PacedSender); |
79 }; | 80 }; |
80 | 81 |
| 82 } // namespace transport |
81 } // namespace cast | 83 } // namespace cast |
82 } // namespace media | 84 } // namespace media |
83 | 85 |
84 #endif // MEDIA_CAST_NET_PACING_PACED_SENDER_H_ | 86 #endif // MEDIA_CAST_TRANSPORT_PACING_PACED_SENDER_H_ |
OLD | NEW |