Chromium Code Reviews| Index: media/cast/net/cast_transport_sender.h |
| diff --git a/media/cast/net/cast_transport_sender.h b/media/cast/net/cast_transport_sender.h |
| index 0ff76e111e93b20d1ac41217f9d5373f4146499d..1afd5d06de482a1ef130c4f3a567f07bae0e3b9e 100644 |
| --- a/media/cast/net/cast_transport_sender.h |
| +++ b/media/cast/net/cast_transport_sender.h |
| @@ -25,6 +25,7 @@ |
| #include "base/single_thread_task_runner.h" |
| #include "base/threading/non_thread_safe.h" |
| #include "base/time/tick_clock.h" |
| +#include "base/values.h" |
| #include "media/cast/logging/logging_defines.h" |
| #include "media/cast/net/cast_transport_config.h" |
| #include "media/cast/net/cast_transport_defines.h" |
| @@ -57,16 +58,30 @@ typedef base::Callback<void(scoped_ptr<std::vector<FrameEvent>>, |
| // The application should only trigger this class from the transport thread. |
| class CastTransportSender : public base::NonThreadSafe { |
| public: |
| + // Interface used for receiving status updates, raw events, and RTP packets |
| + // from CastTransportSender. |
| + class Client { |
| + public: |
| + virtual ~Client(){}; |
| + // Audio and Video transport status change is reported on this callback. |
|
miu
2016/02/22 22:38:48
nit: Add newline above this line.
xjz
2016/02/23 21:51:46
Done.
|
| + virtual void OnStatusChanged(CastTransportStatus status) = 0; |
| + |
| + // Raw events will be invoked on this callback periodically, according to |
| + // the configured logging flush interval passed to |
| + // CastTransportSender::Create(). |
| + virtual void OnLoggingEventsReceived( |
| + scoped_ptr<std::vector<FrameEvent>> frame_events, |
| + scoped_ptr<std::vector<PacketEvent>> packet_events) = 0; |
| + |
| + // Called to pass RTP packets to the Client. |
| + virtual void ProcessRtpPacket(scoped_ptr<Packet> packet) = 0; |
| + }; |
| + |
| static scoped_ptr<CastTransportSender> Create( |
| - net::NetLog* net_log, |
| - base::TickClock* clock, |
| - const net::IPEndPoint& local_end_point, |
| - const net::IPEndPoint& remote_end_point, |
| - scoped_ptr<base::DictionaryValue> options, |
| - const CastTransportStatusCallback& status_callback, |
| - const BulkRawEventsCallback& raw_events_callback, |
| - base::TimeDelta raw_events_callback_interval, |
| - const PacketReceiverCallback& packet_callback, |
| + base::TickClock* clock, // Owned by the caller. |
| + base::TimeDelta logging_flush_interval, |
| + scoped_ptr<Client> client, |
| + scoped_ptr<PacketSender> transport, |
| const scoped_refptr<base::SingleThreadTaskRunner>& transport_task_runner); |
| virtual ~CastTransportSender() {} |
| @@ -122,6 +137,21 @@ class CastTransportSender : public base::NonThreadSafe { |
| base::TimeDelta target_delay, |
| const ReceiverRtcpEventSubscriber::RtcpEvents* rtcp_events, |
| const RtpReceiverStatistics* rtp_receiver_statistics) = 0; |
| + |
| + // Set options for the PacedSender and Wifi. |
| + // Possible keys are: |
|
miu
2016/02/22 22:38:48
nit: I'd suggest moving lines 142-153 to cast_tran
xjz
2016/02/23 21:51:46
Done.
|
| + // "pacer_target_burst_size": int |
| + // - Specifies how many packets to send per 10 ms ideally. |
| + // "pacer_max_burst_size": int |
| + // - Specifies how many pakcets to send per 10 ms, maximum. |
| + // "send_buffer_min_size": int |
| + // - Specifies the minimum socket send buffer size. |
| + // "disable_wifi_scan" (value ignored) |
| + // - Disable wifi scans while streaming. |
| + // "media_streaming_mode" (value ignored) |
| + // - Turn media streaming mode on. |
| + // Note, these options may be ignored on some platforms. |
| + virtual void SetOptions(const base::DictionaryValue& options) = 0; |
| }; |
| } // namespace cast |