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