Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(675)

Side by Side Diff: chrome/renderer/media/cast_transport_sender_ipc.cc

Issue 519443002: Cast: merge InsertCoded{Audio,Video}Frame into InsertFrame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 void CastTransportSenderIPC::InitializeVideo( 44 void CastTransportSenderIPC::InitializeVideo(
45 const media::cast::CastTransportRtpConfig& config, 45 const media::cast::CastTransportRtpConfig& config,
46 const media::cast::RtcpCastMessageCallback& cast_message_cb, 46 const media::cast::RtcpCastMessageCallback& cast_message_cb,
47 const media::cast::RtcpRttCallback& rtt_cb) { 47 const media::cast::RtcpRttCallback& rtt_cb) {
48 clients_[config.ssrc].cast_message_cb = cast_message_cb; 48 clients_[config.ssrc].cast_message_cb = cast_message_cb;
49 clients_[config.ssrc].rtt_cb = rtt_cb; 49 clients_[config.ssrc].rtt_cb = rtt_cb;
50 Send(new CastHostMsg_InitializeVideo(channel_id_, config)); 50 Send(new CastHostMsg_InitializeVideo(channel_id_, config));
51 } 51 }
52 52
53 void CastTransportSenderIPC::InsertCodedAudioFrame( 53 void CastTransportSenderIPC::InsertFrame(uint32 ssrc,
54 const media::cast::EncodedFrame& audio_frame) { 54 const media::cast::EncodedFrame& frame) {
55 Send(new CastHostMsg_InsertCodedAudioFrame(channel_id_, audio_frame)); 55 Send(new CastHostMsg_InsertFrame(channel_id_, ssrc, frame));
56 }
57
58 void CastTransportSenderIPC::InsertCodedVideoFrame(
59 const media::cast::EncodedFrame& video_frame) {
60 Send(new CastHostMsg_InsertCodedVideoFrame(channel_id_, video_frame));
61 } 56 }
62 57
63 void CastTransportSenderIPC::SendSenderReport( 58 void CastTransportSenderIPC::SendSenderReport(
64 uint32 ssrc, 59 uint32 ssrc,
65 base::TimeTicks current_time, 60 base::TimeTicks current_time,
66 uint32 current_time_as_rtp_timestamp) { 61 uint32 current_time_as_rtp_timestamp) {
67 Send(new CastHostMsg_SendSenderReport(channel_id_, 62 Send(new CastHostMsg_SendSenderReport(channel_id_,
68 ssrc, 63 ssrc,
69 current_time, 64 current_time,
70 current_time_as_rtp_timestamp)); 65 current_time_as_rtp_timestamp));
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 it->second.cast_message_cb.Run(cast_message); 120 it->second.cast_message_cb.Run(cast_message);
126 } 121 }
127 122
128 void CastTransportSenderIPC::Send(IPC::Message* message) { 123 void CastTransportSenderIPC::Send(IPC::Message* message) {
129 if (CastIPCDispatcher::Get()) { 124 if (CastIPCDispatcher::Get()) {
130 CastIPCDispatcher::Get()->Send(message); 125 CastIPCDispatcher::Get()->Send(message);
131 } else { 126 } else {
132 delete message; 127 delete message;
133 } 128 }
134 } 129 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698