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 // This class maintains a send transport for audio and video in a Cast | 5 // This class maintains a send transport for audio and video in a Cast |
6 // Streaming session. | 6 // Streaming session. |
7 // Audio, video frames and RTCP messages are submitted to this object | 7 // Audio, video frames and RTCP messages are submitted to this object |
8 // and then packetized and paced to the underlying UDP socket. | 8 // and then packetized and paced to the underlying UDP socket. |
9 // | 9 // |
10 // The hierarchy of send transport in a Cast Streaming session: | 10 // The hierarchy of send transport in a Cast Streaming session: |
(...skipping 24 matching lines...) Expand all Loading... |
35 #include "base/memory/ref_counted.h" | 35 #include "base/memory/ref_counted.h" |
36 #include "base/memory/scoped_ptr.h" | 36 #include "base/memory/scoped_ptr.h" |
37 #include "base/memory/weak_ptr.h" | 37 #include "base/memory/weak_ptr.h" |
38 #include "base/time/tick_clock.h" | 38 #include "base/time/tick_clock.h" |
39 #include "base/time/time.h" | 39 #include "base/time/time.h" |
40 #include "media/cast/common/transport_encryption_handler.h" | 40 #include "media/cast/common/transport_encryption_handler.h" |
41 #include "media/cast/logging/logging_defines.h" | 41 #include "media/cast/logging/logging_defines.h" |
42 #include "media/cast/net/cast_transport_config.h" | 42 #include "media/cast/net/cast_transport_config.h" |
43 #include "media/cast/net/cast_transport_sender.h" | 43 #include "media/cast/net/cast_transport_sender.h" |
44 #include "media/cast/net/pacing/paced_sender.h" | 44 #include "media/cast/net/pacing/paced_sender.h" |
45 #include "media/cast/net/rtcp/rtcp.h" | 45 #include "media/cast/net/rtcp/sender_rtcp_session.h" |
46 #include "media/cast/net/rtp/rtp_parser.h" | 46 #include "media/cast/net/rtp/rtp_parser.h" |
47 #include "media/cast/net/rtp/rtp_sender.h" | 47 #include "media/cast/net/rtp/rtp_sender.h" |
48 #include "net/base/network_interfaces.h" | 48 #include "net/base/network_interfaces.h" |
49 | 49 |
50 namespace media { | 50 namespace media { |
51 namespace cast { | 51 namespace cast { |
52 | 52 |
53 class UdpTransport; | 53 class UdpTransport; |
54 | 54 |
55 class CastTransportSenderImpl : public CastTransportSender { | 55 class CastTransportSenderImpl : public CastTransportSender { |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 scoped_ptr<UdpTransport> transport_; | 172 scoped_ptr<UdpTransport> transport_; |
173 | 173 |
174 // Packet sender that performs pacing. | 174 // Packet sender that performs pacing. |
175 PacedSender pacer_; | 175 PacedSender pacer_; |
176 | 176 |
177 // Packetizer for audio and video frames. | 177 // Packetizer for audio and video frames. |
178 scoped_ptr<RtpSender> audio_sender_; | 178 scoped_ptr<RtpSender> audio_sender_; |
179 scoped_ptr<RtpSender> video_sender_; | 179 scoped_ptr<RtpSender> video_sender_; |
180 | 180 |
181 // Maintains RTCP session for audio and video. | 181 // Maintains RTCP session for audio and video. |
182 scoped_ptr<Rtcp> audio_rtcp_session_; | 182 scoped_ptr<SenderRtcpSession> audio_rtcp_session_; |
183 scoped_ptr<Rtcp> video_rtcp_session_; | 183 scoped_ptr<SenderRtcpSession> video_rtcp_session_; |
184 | 184 |
185 // Encrypts data in EncodedFrames before they are sent. Note that it's | 185 // Encrypts data in EncodedFrames before they are sent. Note that it's |
186 // important for the encryption to happen here, in code that would execute in | 186 // important for the encryption to happen here, in code that would execute in |
187 // the main browser process, for security reasons. This helps to mitigate | 187 // the main browser process, for security reasons. This helps to mitigate |
188 // the damage that could be caused by a compromised renderer process. | 188 // the damage that could be caused by a compromised renderer process. |
189 TransportEncryptionHandler audio_encryptor_; | 189 TransportEncryptionHandler audio_encryptor_; |
190 TransportEncryptionHandler video_encryptor_; | 190 TransportEncryptionHandler video_encryptor_; |
191 | 191 |
192 BulkRawEventsCallback raw_events_callback_; | 192 BulkRawEventsCallback raw_events_callback_; |
193 base::TimeDelta raw_events_callback_interval_; | 193 base::TimeDelta raw_events_callback_interval_; |
(...skipping 14 matching lines...) Expand all Loading... |
208 | 208 |
209 base::WeakPtrFactory<CastTransportSenderImpl> weak_factory_; | 209 base::WeakPtrFactory<CastTransportSenderImpl> weak_factory_; |
210 | 210 |
211 DISALLOW_COPY_AND_ASSIGN(CastTransportSenderImpl); | 211 DISALLOW_COPY_AND_ASSIGN(CastTransportSenderImpl); |
212 }; | 212 }; |
213 | 213 |
214 } // namespace cast | 214 } // namespace cast |
215 } // namespace media | 215 } // namespace media |
216 | 216 |
217 #endif // MEDIA_CAST_NET_CAST_TRANSPORT_SENDER_IMPL_H_ | 217 #endif // MEDIA_CAST_NET_CAST_TRANSPORT_SENDER_IMPL_H_ |
OLD | NEW |