| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 // since then we might get reordering of the retransmitted packets. | 71 // since then we might get reordering of the retransmitted packets. |
| 71 PacketList packet_list_; | 72 PacketList packet_list_; |
| 72 PacketList resend_packet_list_; | 73 PacketList resend_packet_list_; |
| 73 PacketSender* transport_; | 74 PacketSender* transport_; |
| 74 | 75 |
| 75 base::WeakPtrFactory<PacedSender> weak_factory_; | 76 base::WeakPtrFactory<PacedSender> weak_factory_; |
| 76 | 77 |
| 77 DISALLOW_COPY_AND_ASSIGN(PacedSender); | 78 DISALLOW_COPY_AND_ASSIGN(PacedSender); |
| 78 }; | 79 }; |
| 79 | 80 |
| 81 } // namespace transport |
| 80 } // namespace cast | 82 } // namespace cast |
| 81 } // namespace media | 83 } // namespace media |
| 82 | 84 |
| 83 #endif // MEDIA_CAST_NET_PACING_PACED_SENDER_H_ | 85 #endif // MEDIA_CAST_TRANSPORT_PACING_PACED_SENDER_H_ |
| OLD | NEW |