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 uint32 ntp_seconds, | 60 uint32 ntp_seconds, |
67 uint32 ntp_fraction, | 61 uint32 ntp_fraction, |
68 uint32 rtp_timestamp, | 62 uint32 rtp_timestamp, |
69 const media::cast::transport::RtcpDlrrReportBlock& dlrr, | 63 const media::cast::transport::RtcpDlrrReportBlock& dlrr, |
70 uint32 sending_ssrc, | 64 uint32 sending_ssrc, |
71 const std::string& c_name) { | 65 const std::string& c_name) { |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 raw_events_callback_.Run(packet_events); | 106 raw_events_callback_.Run(packet_events); |
113 } | 107 } |
114 | 108 |
115 void CastTransportSenderIPC::Send(IPC::Message* message) { | 109 void CastTransportSenderIPC::Send(IPC::Message* message) { |
116 if (CastIPCDispatcher::Get()) { | 110 if (CastIPCDispatcher::Get()) { |
117 CastIPCDispatcher::Get()->Send(message); | 111 CastIPCDispatcher::Get()->Send(message); |
118 } else { | 112 } else { |
119 delete message; | 113 delete message; |
120 } | 114 } |
121 } | 115 } |
OLD | NEW |