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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 class UdpTransport; | 47 class UdpTransport; |
48 | 48 |
49 class CastTransportSenderImpl : public CastTransportSender { | 49 class CastTransportSenderImpl : public CastTransportSender { |
50 public: | 50 public: |
51 // |external_transport| is only used for testing. | 51 // |external_transport| is only used for testing. |
52 // |raw_events_callback|: Raw events will be returned on this callback | 52 // |raw_events_callback|: Raw events will be returned on this callback |
53 // which will be invoked every |raw_events_callback_interval|. | 53 // which will be invoked every |raw_events_callback_interval|. |
54 // This can be a null callback, i.e. if user is not interested in raw events. | 54 // This can be a null callback, i.e. if user is not interested in raw events. |
55 // |raw_events_callback_interval|: This can be |base::TimeDelta()| if | 55 // |raw_events_callback_interval|: This can be |base::TimeDelta()| if |
56 // |raw_events_callback| is a null callback. | 56 // |raw_events_callback| is a null callback. |
| 57 // |options| contains optional settings for the transport, possible |
| 58 // keys are: |
| 59 // "DSCP" (value doesn't matter) - turns DSCP on |
| 60 // "pacer_target_burst_size": int - specifies how many packets to send |
| 61 // per 10 ms ideally. |
| 62 // "pacer_max_burst_size": int - specifies how many pakcets to send |
| 63 // per 10 ms, max |
57 CastTransportSenderImpl( | 64 CastTransportSenderImpl( |
58 net::NetLog* net_log, | 65 net::NetLog* net_log, |
59 base::TickClock* clock, | 66 base::TickClock* clock, |
60 const net::IPEndPoint& remote_end_point, | 67 const net::IPEndPoint& remote_end_point, |
61 scoped_ptr<base::DictionaryValue> options, | 68 scoped_ptr<base::DictionaryValue> options, |
62 const CastTransportStatusCallback& status_callback, | 69 const CastTransportStatusCallback& status_callback, |
63 const BulkRawEventsCallback& raw_events_callback, | 70 const BulkRawEventsCallback& raw_events_callback, |
64 base::TimeDelta raw_events_callback_interval, | 71 base::TimeDelta raw_events_callback_interval, |
65 const scoped_refptr<base::SingleThreadTaskRunner>& transport_task_runner, | 72 const scoped_refptr<base::SingleThreadTaskRunner>& transport_task_runner, |
66 PacketSender* external_transport); | 73 PacketSender* external_transport); |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 | 167 |
161 base::WeakPtrFactory<CastTransportSenderImpl> weak_factory_; | 168 base::WeakPtrFactory<CastTransportSenderImpl> weak_factory_; |
162 | 169 |
163 DISALLOW_COPY_AND_ASSIGN(CastTransportSenderImpl); | 170 DISALLOW_COPY_AND_ASSIGN(CastTransportSenderImpl); |
164 }; | 171 }; |
165 | 172 |
166 } // namespace cast | 173 } // namespace cast |
167 } // namespace media | 174 } // namespace media |
168 | 175 |
169 #endif // MEDIA_CAST_NET_CAST_TRANSPORT_IMPL_H_ | 176 #endif // MEDIA_CAST_NET_CAST_TRANSPORT_IMPL_H_ |
OLD | NEW |