OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_CAST_TRANSPORT_IMPL_H_ | 5 #ifndef MEDIA_CAST_NET_CAST_TRANSPORT_IMPL_H_ |
6 #define MEDIA_CAST_TRANSPORT_CAST_TRANSPORT_IMPL_H_ | 6 #define MEDIA_CAST_NET_CAST_TRANSPORT_IMPL_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "base/time/tick_clock.h" | 11 #include "base/time/tick_clock.h" |
12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
13 #include "base/timer/timer.h" | 13 #include "base/timer/timer.h" |
| 14 #include "media/cast/common/transport_encryption_handler.h" |
14 #include "media/cast/logging/logging_defines.h" | 15 #include "media/cast/logging/logging_defines.h" |
15 #include "media/cast/logging/simple_event_subscriber.h" | 16 #include "media/cast/logging/simple_event_subscriber.h" |
16 #include "media/cast/transport/cast_transport_config.h" | 17 #include "media/cast/net/cast_transport_config.h" |
17 #include "media/cast/transport/cast_transport_sender.h" | 18 #include "media/cast/net/cast_transport_sender.h" |
18 #include "media/cast/transport/pacing/paced_sender.h" | 19 #include "media/cast/net/pacing/paced_sender.h" |
19 #include "media/cast/transport/rtcp/rtcp_builder.h" | 20 #include "media/cast/net/rtcp/rtcp_builder.h" |
20 #include "media/cast/transport/rtp_sender/rtp_sender.h" | 21 #include "media/cast/net/rtp/rtp_sender.h" |
21 #include "media/cast/transport/utility/transport_encryption_handler.h" | |
22 | 22 |
23 namespace media { | 23 namespace media { |
24 namespace cast { | 24 namespace cast { |
25 namespace transport { | 25 |
| 26 class UdpTransport; |
26 | 27 |
27 class CastTransportSenderImpl : public CastTransportSender { | 28 class CastTransportSenderImpl : public CastTransportSender { |
28 public: | 29 public: |
29 // external_transport is only used for testing. | 30 // external_transport is only used for testing. |
30 // Note that SetPacketReceiver does not work if an external | 31 // Note that SetPacketReceiver does not work if an external |
31 // transport is provided. | 32 // transport is provided. |
32 // |raw_events_callback|: Raw events will be returned on this callback | 33 // |raw_events_callback|: Raw events will be returned on this callback |
33 // which will be invoked every |raw_events_callback_interval|. | 34 // which will be invoked every |raw_events_callback_interval|. |
34 // This can be a null callback, i.e. if user is not interested in raw events. | 35 // This can be a null callback, i.e. if user is not interested in raw events. |
35 // |raw_events_callback_interval|: This can be |base::TimeDelta()| if | 36 // |raw_events_callback_interval|: This can be |base::TimeDelta()| if |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 | 96 |
96 // This is non-null iff |raw_events_callback_| is non-null. | 97 // This is non-null iff |raw_events_callback_| is non-null. |
97 scoped_ptr<SimpleEventSubscriber> event_subscriber_; | 98 scoped_ptr<SimpleEventSubscriber> event_subscriber_; |
98 base::RepeatingTimer<CastTransportSenderImpl> raw_events_timer_; | 99 base::RepeatingTimer<CastTransportSenderImpl> raw_events_timer_; |
99 | 100 |
100 BulkRawEventsCallback raw_events_callback_; | 101 BulkRawEventsCallback raw_events_callback_; |
101 | 102 |
102 DISALLOW_COPY_AND_ASSIGN(CastTransportSenderImpl); | 103 DISALLOW_COPY_AND_ASSIGN(CastTransportSenderImpl); |
103 }; | 104 }; |
104 | 105 |
105 } // namespace transport | |
106 } // namespace cast | 106 } // namespace cast |
107 } // namespace media | 107 } // namespace media |
108 | 108 |
109 #endif // MEDIA_CAST_TRANSPORT_CAST_TRANSPORT_IMPL_H_ | 109 #endif // MEDIA_CAST_NET_CAST_TRANSPORT_IMPL_H_ |
OLD | NEW |