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 "chrome/renderer/media/cast_transport_sender_ipc.h" | 5 #include "chrome/renderer/media/cast_transport_sender_ipc.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/id_map.h" | 8 #include "base/id_map.h" |
9 #include "chrome/common/cast_messages.h" | 9 #include "chrome/common/cast_messages.h" |
10 #include "chrome/renderer/media/cast_ipc_dispatcher.h" | 10 #include "chrome/renderer/media/cast_ipc_dispatcher.h" |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 data.rtp_timestamp = rtp_timestamp; | 72 data.rtp_timestamp = rtp_timestamp; |
73 Send(new CastHostMsg_SendRtcpFromRtpSender( | 73 Send(new CastHostMsg_SendRtcpFromRtpSender( |
74 channel_id_, | 74 channel_id_, |
75 data, | 75 data, |
76 dlrr)); | 76 dlrr)); |
77 } | 77 } |
78 | 78 |
79 void CastTransportSenderIPC::ResendPackets( | 79 void CastTransportSenderIPC::ResendPackets( |
80 bool is_audio, | 80 bool is_audio, |
81 const media::cast::MissingFramesAndPacketsMap& missing_packets, | 81 const media::cast::MissingFramesAndPacketsMap& missing_packets, |
82 bool cancel_rtx_if_not_in_list) { | 82 bool cancel_rtx_if_not_in_list, |
| 83 base::TimeDelta rtt) { |
83 Send(new CastHostMsg_ResendPackets(channel_id_, | 84 Send(new CastHostMsg_ResendPackets(channel_id_, |
84 is_audio, | 85 is_audio, |
85 missing_packets, | 86 missing_packets, |
86 cancel_rtx_if_not_in_list)); | 87 cancel_rtx_if_not_in_list, |
| 88 rtt)); |
87 } | 89 } |
88 | 90 |
89 void CastTransportSenderIPC::OnReceivedPacket( | 91 void CastTransportSenderIPC::OnReceivedPacket( |
90 const media::cast::Packet& packet) { | 92 const media::cast::Packet& packet) { |
91 if (!packet_callback_.is_null()) { | 93 if (!packet_callback_.is_null()) { |
92 // TODO(hubbe): Perhaps an non-ownership-transferring cb here? | 94 // TODO(hubbe): Perhaps an non-ownership-transferring cb here? |
93 scoped_ptr<media::cast::transport::Packet> packet_copy( | 95 scoped_ptr<media::cast::transport::Packet> packet_copy( |
94 new media::cast::transport::Packet(packet)); | 96 new media::cast::transport::Packet(packet)); |
95 packet_callback_.Run(packet_copy.Pass()); | 97 packet_callback_.Run(packet_copy.Pass()); |
96 } else { | 98 } else { |
(...skipping 11 matching lines...) Expand all Loading... |
108 raw_events_callback_.Run(packet_events); | 110 raw_events_callback_.Run(packet_events); |
109 } | 111 } |
110 | 112 |
111 void CastTransportSenderIPC::Send(IPC::Message* message) { | 113 void CastTransportSenderIPC::Send(IPC::Message* message) { |
112 if (CastIPCDispatcher::Get()) { | 114 if (CastIPCDispatcher::Get()) { |
113 CastIPCDispatcher::Get()->Send(message); | 115 CastIPCDispatcher::Get()->Send(message); |
114 } else { | 116 } else { |
115 delete message; | 117 delete message; |
116 } | 118 } |
117 } | 119 } |
OLD | NEW |