| 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 28 matching lines...) Expand all Loading... |
| 39 const media::cast::transport::CastTransportAudioConfig& config) { | 39 const media::cast::transport::CastTransportAudioConfig& config) { |
| 40 Send(new CastHostMsg_InitializeAudio(channel_id_, config)); | 40 Send(new CastHostMsg_InitializeAudio(channel_id_, config)); |
| 41 } | 41 } |
| 42 | 42 |
| 43 void CastTransportSenderIPC::InitializeVideo( | 43 void CastTransportSenderIPC::InitializeVideo( |
| 44 const media::cast::transport::CastTransportVideoConfig& config) { | 44 const media::cast::transport::CastTransportVideoConfig& config) { |
| 45 Send(new CastHostMsg_InitializeVideo(channel_id_, config)); | 45 Send(new CastHostMsg_InitializeVideo(channel_id_, config)); |
| 46 } | 46 } |
| 47 | 47 |
| 48 void CastTransportSenderIPC::InsertCodedAudioFrame( | 48 void CastTransportSenderIPC::InsertCodedAudioFrame( |
| 49 const media::cast::transport::EncodedAudioFrame* audio_frame, | 49 const media::cast::transport::EncodedFrame& audio_frame) { |
| 50 const base::TimeTicks& recorded_time) { | 50 Send(new CastHostMsg_InsertCodedAudioFrame(channel_id_, audio_frame)); |
| 51 Send(new CastHostMsg_InsertCodedAudioFrame(channel_id_, | |
| 52 *audio_frame, | |
| 53 recorded_time)); | |
| 54 } | 51 } |
| 55 | 52 |
| 56 void CastTransportSenderIPC::InsertCodedVideoFrame( | 53 void CastTransportSenderIPC::InsertCodedVideoFrame( |
| 57 const media::cast::transport::EncodedVideoFrame* video_frame, | 54 const media::cast::transport::EncodedFrame& video_frame) { |
| 58 const base::TimeTicks& capture_time) { | 55 Send(new CastHostMsg_InsertCodedVideoFrame(channel_id_, video_frame)); |
| 59 Send(new CastHostMsg_InsertCodedVideoFrame(channel_id_, | |
| 60 *video_frame, | |
| 61 capture_time)); | |
| 62 } | 56 } |
| 63 | 57 |
| 64 void CastTransportSenderIPC::SendRtcpFromRtpSender( | 58 void CastTransportSenderIPC::SendRtcpFromRtpSender( |
| 65 uint32 packet_type_flags, | 59 uint32 packet_type_flags, |
| 66 const media::cast::transport::RtcpSenderInfo& sender_info, | 60 const media::cast::transport::RtcpSenderInfo& sender_info, |
| 67 const media::cast::transport::RtcpDlrrReportBlock& dlrr, | 61 const media::cast::transport::RtcpDlrrReportBlock& dlrr, |
| 68 uint32 sending_ssrc, | 62 uint32 sending_ssrc, |
| 69 const std::string& c_name) { | 63 const std::string& c_name) { |
| 70 struct media::cast::transport::SendRtcpFromRtpSenderData data; | 64 struct media::cast::transport::SendRtcpFromRtpSenderData data; |
| 71 data.packet_type_flags = packet_type_flags; | 65 data.packet_type_flags = packet_type_flags; |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 raw_events_callback_.Run(packet_events); | 123 raw_events_callback_.Run(packet_events); |
| 130 } | 124 } |
| 131 | 125 |
| 132 void CastTransportSenderIPC::Send(IPC::Message* message) { | 126 void CastTransportSenderIPC::Send(IPC::Message* message) { |
| 133 if (CastIPCDispatcher::Get()) { | 127 if (CastIPCDispatcher::Get()) { |
| 134 CastIPCDispatcher::Get()->Send(message); | 128 CastIPCDispatcher::Get()->Send(message); |
| 135 } else { | 129 } else { |
| 136 delete message; | 130 delete message; |
| 137 } | 131 } |
| 138 } | 132 } |
| OLD | NEW |