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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 void CastTransportSenderIPC::SendSenderReport( | 63 void CastTransportSenderIPC::SendSenderReport( |
64 uint32 ssrc, | 64 uint32 ssrc, |
65 base::TimeTicks current_time, | 65 base::TimeTicks current_time, |
66 uint32 current_time_as_rtp_timestamp) { | 66 uint32 current_time_as_rtp_timestamp) { |
67 Send(new CastHostMsg_SendSenderReport(channel_id_, | 67 Send(new CastHostMsg_SendSenderReport(channel_id_, |
68 ssrc, | 68 ssrc, |
69 current_time, | 69 current_time, |
70 current_time_as_rtp_timestamp)); | 70 current_time_as_rtp_timestamp)); |
71 } | 71 } |
72 | 72 |
73 void CastTransportSenderIPC::ResendPackets( | 73 void CastTransportSenderIPC::CancelSendingFrames( |
74 bool is_audio, | 74 uint32 ssrc, const std::vector<uint32>& frame_ids) { |
75 const media::cast::MissingFramesAndPacketsMap& missing_packets, | 75 Send(new CastHostMsg_CancelSendingFrames(channel_id_, |
76 bool cancel_rtx_if_not_in_list, | 76 ssrc, |
77 base::TimeDelta dedupe_window) { | 77 frame_ids)); |
78 Send(new CastHostMsg_ResendPackets(channel_id_, | 78 } |
79 is_audio, | 79 |
80 missing_packets, | 80 void CastTransportSenderIPC::ResendFrameForKickstart( |
81 cancel_rtx_if_not_in_list, | 81 uint32 ssrc, uint32 frame_id) { |
82 dedupe_window)); | 82 Send(new CastHostMsg_ResendFrameForKickstart(channel_id_, |
| 83 ssrc, |
| 84 frame_id)); |
83 } | 85 } |
84 | 86 |
85 void CastTransportSenderIPC::OnNotifyStatusChange( | 87 void CastTransportSenderIPC::OnNotifyStatusChange( |
86 media::cast::CastTransportStatus status) { | 88 media::cast::CastTransportStatus status) { |
87 status_callback_.Run(status); | 89 status_callback_.Run(status); |
88 } | 90 } |
89 | 91 |
90 void CastTransportSenderIPC::OnRawEvents( | 92 void CastTransportSenderIPC::OnRawEvents( |
91 const std::vector<media::cast::PacketEvent>& packet_events, | 93 const std::vector<media::cast::PacketEvent>& packet_events, |
92 const std::vector<media::cast::FrameEvent>& frame_events) { | 94 const std::vector<media::cast::FrameEvent>& frame_events) { |
(...skipping 30 matching lines...) Expand all Loading... |
123 it->second.cast_message_cb.Run(cast_message); | 125 it->second.cast_message_cb.Run(cast_message); |
124 } | 126 } |
125 | 127 |
126 void CastTransportSenderIPC::Send(IPC::Message* message) { | 128 void CastTransportSenderIPC::Send(IPC::Message* message) { |
127 if (CastIPCDispatcher::Get()) { | 129 if (CastIPCDispatcher::Get()) { |
128 CastIPCDispatcher::Get()->Send(message); | 130 CastIPCDispatcher::Get()->Send(message); |
129 } else { | 131 } else { |
130 delete message; | 132 delete message; |
131 } | 133 } |
132 } | 134 } |
OLD | NEW |