| 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 #include "media/cast/transport/cast_transport_sender_impl.h" | 5 #include "media/cast/net/cast_transport_sender_impl.h" |
| 6 | 6 |
| 7 #include "base/single_thread_task_runner.h" | 7 #include "base/single_thread_task_runner.h" |
| 8 #include "media/cast/transport/cast_transport_config.h" | 8 #include "media/cast/net/cast_transport_config.h" |
| 9 #include "media/cast/transport/cast_transport_defines.h" | 9 #include "media/cast/net/cast_transport_defines.h" |
| 10 #include "media/cast/net/udp_transport.h" |
| 10 #include "net/base/net_util.h" | 11 #include "net/base/net_util.h" |
| 11 | 12 |
| 12 namespace media { | 13 namespace media { |
| 13 namespace cast { | 14 namespace cast { |
| 14 namespace transport { | |
| 15 | 15 |
| 16 scoped_ptr<CastTransportSender> CastTransportSender::Create( | 16 scoped_ptr<CastTransportSender> CastTransportSender::Create( |
| 17 net::NetLog* net_log, | 17 net::NetLog* net_log, |
| 18 base::TickClock* clock, | 18 base::TickClock* clock, |
| 19 const net::IPEndPoint& remote_end_point, | 19 const net::IPEndPoint& remote_end_point, |
| 20 const CastTransportStatusCallback& status_callback, | 20 const CastTransportStatusCallback& status_callback, |
| 21 const BulkRawEventsCallback& raw_events_callback, | 21 const BulkRawEventsCallback& raw_events_callback, |
| 22 base::TimeDelta raw_events_callback_interval, | 22 base::TimeDelta raw_events_callback_interval, |
| 23 const scoped_refptr<base::SingleThreadTaskRunner>& transport_task_runner) { | 23 const scoped_refptr<base::SingleThreadTaskRunner>& transport_task_runner) { |
| 24 return scoped_ptr<CastTransportSender>( | 24 return scoped_ptr<CastTransportSender>( |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 } | 196 } |
| 197 | 197 |
| 198 void CastTransportSenderImpl::SendRawEvents() { | 198 void CastTransportSenderImpl::SendRawEvents() { |
| 199 DCHECK(event_subscriber_.get()); | 199 DCHECK(event_subscriber_.get()); |
| 200 DCHECK(!raw_events_callback_.is_null()); | 200 DCHECK(!raw_events_callback_.is_null()); |
| 201 std::vector<PacketEvent> packet_events; | 201 std::vector<PacketEvent> packet_events; |
| 202 event_subscriber_->GetPacketEventsAndReset(&packet_events); | 202 event_subscriber_->GetPacketEventsAndReset(&packet_events); |
| 203 raw_events_callback_.Run(packet_events); | 203 raw_events_callback_.Run(packet_events); |
| 204 } | 204 } |
| 205 | 205 |
| 206 } // namespace transport | |
| 207 } // namespace cast | 206 } // namespace cast |
| 208 } // namespace media | 207 } // namespace media |
| OLD | NEW |