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

Unified Diff: content/renderer/media/video_capture_message_filter.cc

Issue 7222024: use control message instead of routed for video capture (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 6 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: content/renderer/media/video_capture_message_filter.cc
===================================================================
--- content/renderer/media/video_capture_message_filter.cc (revision 89543)
+++ content/renderer/media/video_capture_message_filter.cc (working copy)
@@ -8,9 +8,8 @@
#include "content/common/view_messages.h"
#include "content/renderer/render_thread.h"
-VideoCaptureMessageFilter::VideoCaptureMessageFilter(int32 route_id)
+VideoCaptureMessageFilter::VideoCaptureMessageFilter()
: last_device_id_(0),
- route_id_(route_id),
channel_(NULL) {
}
@@ -23,14 +22,10 @@
return false;
}
- message->set_routing_id(route_id_);
return channel_->Send(message);
}
bool VideoCaptureMessageFilter::OnMessageReceived(const IPC::Message& message) {
- if (message.routing_id() != route_id_)
- return false;
-
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(VideoCaptureMessageFilter, message)
IPC_MESSAGE_HANDLER(VideoCaptureMsg_BufferReady, OnBufferReceived)
@@ -64,7 +59,7 @@
channel_ = NULL;
}
-void VideoCaptureMessageFilter::OnBufferCreated(const IPC::Message& msg,
+void VideoCaptureMessageFilter::OnBufferCreated(
int device_id,
base::SharedMemoryHandle handle,
int length,
@@ -80,14 +75,14 @@
// Send the buffer back to Host in case it's waiting for all buffers
// to be returned.
base::SharedMemory::CloseHandle(handle);
- Send(new VideoCaptureHostMsg_BufferReady(0, device_id, buffer_id));
+ Send(new VideoCaptureHostMsg_BufferReady(device_id, buffer_id));
return;
}
delegate->OnBufferCreated(handle, length, buffer_id);
}
-void VideoCaptureMessageFilter::OnBufferReceived(const IPC::Message& msg,
+void VideoCaptureMessageFilter::OnBufferReceived(
int device_id,
int buffer_id,
base::Time timestamp) {
@@ -101,7 +96,7 @@
// Send the buffer back to Host in case it's waiting for all buffers
// to be returned.
- Send(new VideoCaptureHostMsg_BufferReady(0, device_id, buffer_id));
+ Send(new VideoCaptureHostMsg_BufferReady(device_id, buffer_id));
return;
}
@@ -123,9 +118,8 @@
}
void VideoCaptureMessageFilter::OnDeviceInfoReceived(
- const IPC::Message& msg,
int device_id,
- media::VideoCaptureParams& params) {
+ const media::VideoCaptureParams& params) {
Delegate* delegate = NULL;
if (delegates_.find(device_id) != delegates_.end())
delegate = delegates_.find(device_id)->second;
« no previous file with comments | « content/renderer/media/video_capture_message_filter.h ('k') | content/renderer/media/video_capture_message_filter_creator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698