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

Unified Diff: chrome/renderer/media/cast_ipc_dispatcher.cc

Issue 178073004: Cast: IPC from browser to renderer to send packet events from transport to cast library. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change sender app Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/renderer/media/cast_ipc_dispatcher.cc
diff --git a/chrome/renderer/media/cast_ipc_dispatcher.cc b/chrome/renderer/media/cast_ipc_dispatcher.cc
index feff41dd8704b055b78d00dea6357b5d4d06f49c..943315d26ca4ed5455a19f3740ecb64350b61da7 100644
--- a/chrome/renderer/media/cast_ipc_dispatcher.cc
+++ b/chrome/renderer/media/cast_ipc_dispatcher.cc
@@ -51,6 +51,7 @@ bool CastIPCDispatcher::OnMessageReceived(const IPC::Message& message) {
IPC_MESSAGE_HANDLER(CastMsg_ReceivedPacket, OnReceivedPacket)
IPC_MESSAGE_HANDLER(CastMsg_NotifyStatusChange, OnNotifyStatusChange)
IPC_MESSAGE_HANDLER(CastMsg_RtpStatistics, OnRtpStatistics)
+ IPC_MESSAGE_HANDLER(CastMsg_RawEvents, OnRawEvents)
IPC_MESSAGE_UNHANDLED(handled = false);
IPC_END_MESSAGE_MAP();
return handled;
@@ -109,7 +110,17 @@ void CastIPCDispatcher::OnRtpStatistics(
if (sender) {
sender->OnRtpStatistics(audio, sender_info, time_sent, rtp_timestamp);
} else {
- LOG(ERROR)
- << "CastIPCDispatcher::OnNotifystatusChange on non-existing channel.";
+ LOG(ERROR) << "CastIPCDispatcher::OnRtpStatistics on non-existing channel.";
+ }
+}
+
+void CastIPCDispatcher::OnRawEvents(
+ int32 channel_id,
+ const std::vector<media::cast::PacketEvent>& packet_events) {
+ CastTransportSenderIPC* sender = id_map_.Lookup(channel_id);
+ if (sender) {
+ sender->OnRawEvents(packet_events);
+ } else {
+ LOG(ERROR) << "CastIPCDispatcher::OnRawEvents on non-existing channel.";
}
}

Powered by Google App Engine
This is Rietveld 408576698