summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/media/cast_ipc_dispatcher.cc
diff options
context:
space:
mode:
authorimcheng@chromium.org <imcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-07 11:26:28 +0000
committerimcheng@chromium.org <imcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-07 11:26:28 +0000
commitf44823ce60dc63a2835765f584ba76a484c89839 (patch)
tree21bac700b6fae02fcdc93955606396755bc46295 /chrome/renderer/media/cast_ipc_dispatcher.cc
parent1e68ed1cfcb9eba851d46c54a5b79da8186a89e9 (diff)
downloadchromium_src-f44823ce60dc63a2835765f584ba76a484c89839.zip
chromium_src-f44823ce60dc63a2835765f584ba76a484c89839.tar.gz
chromium_src-f44823ce60dc63a2835765f584ba76a484c89839.tar.bz2
Cast: IPC from browser to renderer to send packet events from transport to cast library.
- Added a new IPC message: CastMsg_RawEvents - Transmit cast logging settings to transport on browser side by adding a new field in CastTransportConfig. - Install a LoggingImpl on transport side -- If raw event logging is enabled, install a SimpleEventSubscriber to capture packet events. -- If raw event logging is enabled, a RepeatingTimer will be started to call the subscriber to collect packet events and send back to cast library via the IPC. NOTE: Currently, no actual packet events are logged on the transport. That will be in the next CL. There are two ways to do this: - Pass LoggingImpl to sub components on the transport (paced_sender, rtp_packetizer, etc.) - Pass a callback that will be propagated down and invoked at the right place. BUG=343992 Review URL: https://codereview.chromium.org/178073004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255579 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/media/cast_ipc_dispatcher.cc')
-rw-r--r--chrome/renderer/media/cast_ipc_dispatcher.cc21
1 files changed, 16 insertions, 5 deletions
diff --git a/chrome/renderer/media/cast_ipc_dispatcher.cc b/chrome/renderer/media/cast_ipc_dispatcher.cc
index feff41d..022d7ec 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;
@@ -82,8 +83,8 @@ void CastIPCDispatcher::OnReceivedPacket(
if (sender) {
sender->OnReceivedPacket(packet);
} else {
- LOG(ERROR) << "CastIPCDispatcher::OnReceivedPacket "
- << "on non-existing channel.";
+ DVLOG(1) << "CastIPCDispatcher::OnReceivedPacket "
+ << "on non-existing channel.";
}
}
@@ -94,7 +95,7 @@ void CastIPCDispatcher::OnNotifyStatusChange(
if (sender) {
sender->OnNotifyStatusChange(status);
} else {
- LOG(ERROR)
+ DVLOG(1)
<< "CastIPCDispatcher::OnNotifystatusChange on non-existing channel.";
}
}
@@ -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.";
+ DVLOG(1) << "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 {
+ DVLOG(1) << "CastIPCDispatcher::OnRawEvents on non-existing channel.";
}
}