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 // This file contains the interface to the cast RTP sender. | 5 // This file contains the interface to the cast RTP sender. |
6 | 6 |
7 #ifndef MEDIA_CAST_TRANSPORT_RTP_SENDER_RTP_SENDER_H_ | 7 #ifndef MEDIA_CAST_NET_RTP_RTP_SENDER_H_ |
8 #define MEDIA_CAST_TRANSPORT_RTP_SENDER_RTP_SENDER_H_ | 8 #define MEDIA_CAST_NET_RTP_RTP_SENDER_H_ |
9 | 9 |
10 #include <map> | 10 #include <map> |
11 #include <set> | 11 #include <set> |
12 | 12 |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/memory/weak_ptr.h" |
14 #include "base/time/tick_clock.h" | 15 #include "base/time/tick_clock.h" |
15 #include "base/time/time.h" | 16 #include "base/time/time.h" |
16 #include "base/memory/weak_ptr.h" | |
17 #include "media/cast/cast_config.h" | 17 #include "media/cast/cast_config.h" |
18 #include "media/cast/cast_environment.h" | 18 #include "media/cast/cast_environment.h" |
19 #include "media/cast/transport/cast_transport_defines.h" | 19 #include "media/cast/net/cast_transport_defines.h" |
20 #include "media/cast/transport/cast_transport_sender.h" | 20 #include "media/cast/net/cast_transport_sender.h" |
21 #include "media/cast/transport/pacing/paced_sender.h" | 21 #include "media/cast/net/pacing/paced_sender.h" |
22 #include "media/cast/transport/rtp_sender/packet_storage/packet_storage.h" | 22 #include "media/cast/net/rtp/packet_storage.h" |
23 #include "media/cast/transport/rtp_sender/rtp_packetizer/rtp_packetizer.h" | 23 #include "media/cast/net/rtp/rtp_packetizer.h" |
24 | 24 |
25 namespace media { | 25 namespace media { |
26 namespace cast { | 26 namespace cast { |
27 | 27 |
28 namespace transport { | |
29 | |
30 // This object is only called from the main cast thread. | 28 // This object is only called from the main cast thread. |
31 // This class handles splitting encoded audio and video frames into packets and | 29 // This class handles splitting encoded audio and video frames into packets and |
32 // add an RTP header to each packet. The sent packets are stored until they are | 30 // add an RTP header to each packet. The sent packets are stored until they are |
33 // acknowledged by the remote peer or timed out. | 31 // acknowledged by the remote peer or timed out. |
34 class RtpSender { | 32 class RtpSender { |
35 public: | 33 public: |
36 RtpSender( | 34 RtpSender( |
37 base::TickClock* clock, | 35 base::TickClock* clock, |
38 const scoped_refptr<base::SingleThreadTaskRunner>& transport_task_runner, | 36 const scoped_refptr<base::SingleThreadTaskRunner>& transport_task_runner, |
39 PacedSender* const transport); | 37 PacedSender* const transport); |
(...skipping 27 matching lines...) Expand all Loading... |
67 scoped_ptr<PacketStorage> storage_; | 65 scoped_ptr<PacketStorage> storage_; |
68 PacedSender* const transport_; | 66 PacedSender* const transport_; |
69 scoped_refptr<base::SingleThreadTaskRunner> transport_task_runner_; | 67 scoped_refptr<base::SingleThreadTaskRunner> transport_task_runner_; |
70 | 68 |
71 // NOTE: Weak pointers must be invalidated before all other member variables. | 69 // NOTE: Weak pointers must be invalidated before all other member variables. |
72 base::WeakPtrFactory<RtpSender> weak_factory_; | 70 base::WeakPtrFactory<RtpSender> weak_factory_; |
73 | 71 |
74 DISALLOW_COPY_AND_ASSIGN(RtpSender); | 72 DISALLOW_COPY_AND_ASSIGN(RtpSender); |
75 }; | 73 }; |
76 | 74 |
77 } // namespace transport | |
78 } // namespace cast | 75 } // namespace cast |
79 } // namespace media | 76 } // namespace media |
80 | 77 |
81 #endif // MEDIA_CAST_TRANSPORT_RTP_SENDER_RTP_SENDER_H_ | 78 #endif // MEDIA_CAST_NET_RTP_SENDER_RTP_SENDER_H_ |
OLD | NEW |