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

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

Issue 387933005: Cast: Refactor RTCP handling (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test Created 6 years, 5 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
« no previous file with comments | « chrome/renderer/media/cast_ipc_dispatcher.h ('k') | chrome/renderer/media/cast_ipc_dispatcher_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2068bf02ecb6f81b846a7a4c14ab2eac0823c978..e17b103e5debb39f990532d1b09b8f275fcae8d0 100644
--- a/chrome/renderer/media/cast_ipc_dispatcher.cc
+++ b/chrome/renderer/media/cast_ipc_dispatcher.cc
@@ -48,9 +48,10 @@ bool CastIPCDispatcher::OnMessageReceived(const IPC::Message& message) {
DCHECK(io_message_loop_->BelongsToCurrentThread());
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(CastIPCDispatcher, message)
- IPC_MESSAGE_HANDLER(CastMsg_ReceivedPacket, OnReceivedPacket)
IPC_MESSAGE_HANDLER(CastMsg_NotifyStatusChange, OnNotifyStatusChange)
IPC_MESSAGE_HANDLER(CastMsg_RawEvents, OnRawEvents)
+ IPC_MESSAGE_HANDLER(CastMsg_Rtt, OnRtt)
+ IPC_MESSAGE_HANDLER(CastMsg_RtcpCastMessage, OnRtcpCastMessage)
IPC_MESSAGE_UNHANDLED(handled = false);
IPC_END_MESSAGE_MAP();
return handled;
@@ -75,18 +76,6 @@ void CastIPCDispatcher::OnChannelClosing() {
DCHECK_EQ(this, global_instance_);
}
-void CastIPCDispatcher::OnReceivedPacket(
- int32 channel_id,
- const media::cast::Packet& packet) {
- CastTransportSenderIPC* sender = id_map_.Lookup(channel_id);
- if (sender) {
- sender->OnReceivedPacket(packet);
- } else {
- DVLOG(1) << "CastIPCDispatcher::OnReceivedPacket "
- << "on non-existing channel.";
- }
-}
-
void CastIPCDispatcher::OnNotifyStatusChange(
int32 channel_id,
media::cast::CastTransportStatus status) {
@@ -101,11 +90,35 @@ void CastIPCDispatcher::OnNotifyStatusChange(
void CastIPCDispatcher::OnRawEvents(
int32 channel_id,
- const std::vector<media::cast::PacketEvent>& packet_events) {
+ const std::vector<media::cast::PacketEvent>& packet_events,
+ const std::vector<media::cast::FrameEvent>& frame_events) {
CastTransportSenderIPC* sender = id_map_.Lookup(channel_id);
if (sender) {
- sender->OnRawEvents(packet_events);
+ sender->OnRawEvents(packet_events, frame_events);
} else {
DVLOG(1) << "CastIPCDispatcher::OnRawEvents on non-existing channel.";
}
}
+
+void CastIPCDispatcher::OnRtt(int32 channel_id,
+ uint32 ssrc,
+ const media::cast::RtcpRttReport& rtt_report) {
+ CastTransportSenderIPC* sender = id_map_.Lookup(channel_id);
+ if (sender) {
+ sender->OnRtt(ssrc, rtt_report);
+ } else {
+ DVLOG(1) << "CastIPCDispatcher::OnRtt on non-existing channel.";
+ }
+}
+
+void CastIPCDispatcher::OnRtcpCastMessage(
+ int32 channel_id,
+ uint32 ssrc,
+ const media::cast::RtcpCastMessage& cast_message) {
+ CastTransportSenderIPC* sender = id_map_.Lookup(channel_id);
+ if (sender) {
+ sender->OnRtcpCastMessage(ssrc, cast_message);
+ } else {
+ DVLOG(1) << "CastIPCDispatcher::OnRtt on non-existing channel.";
+ }
+}
« no previous file with comments | « chrome/renderer/media/cast_ipc_dispatcher.h ('k') | chrome/renderer/media/cast_ipc_dispatcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698