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

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

Issue 955253002: Add metadata to media::VideoFrame and plumb it through IPC/MediaStream. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tommi's nits addressed Created 5 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: content/renderer/media/video_capture_message_filter.cc
diff --git a/content/renderer/media/video_capture_message_filter.cc b/content/renderer/media/video_capture_message_filter.cc
index 7157407fff2cbb9ddbc8671085d2f233c0eff035..dcdcc244922c356758a96bcbed87f0380d414e5a 100644
--- a/content/renderer/media/video_capture_message_filter.cc
+++ b/content/renderer/media/video_capture_message_filter.cc
@@ -122,32 +122,29 @@ void VideoCaptureMessageFilter::OnBufferCreated(
}
void VideoCaptureMessageFilter::OnBufferReceived(
- int device_id,
- int buffer_id,
- const media::VideoCaptureFormat& format,
- const gfx::Rect& visible_rect,
- base::TimeTicks timestamp) {
- Delegate* delegate = find_delegate(device_id);
+ const VideoCaptureMsg_BufferReady_Params& params) {
+ Delegate* delegate = find_delegate(params.device_id);
if (!delegate) {
DLOG(WARNING) << "OnBufferReceived: Got video SHM buffer for a "
"non-existent or removed video capture.";
// Send the buffer back to Host in case it's waiting for all buffers
// to be returned.
- Send(new VideoCaptureHostMsg_BufferReady(device_id, buffer_id, 0));
+ Send(new VideoCaptureHostMsg_BufferReady(
+ params.device_id, params.buffer_id, 0));
return;
}
- delegate->OnBufferReceived(buffer_id, format, visible_rect, timestamp);
+ delegate->OnBufferReceived(params.buffer_id,
+ params.coded_size,
+ params.visible_rect,
+ params.timestamp,
+ params.metadata);
}
void VideoCaptureMessageFilter::OnMailboxBufferReceived(
- int device_id,
- int buffer_id,
- const gpu::MailboxHolder& mailbox_holder,
- const media::VideoCaptureFormat& format,
- base::TimeTicks timestamp) {
- Delegate* delegate = find_delegate(device_id);
+ const VideoCaptureMsg_MailboxBufferReady_Params& params) {
+ Delegate* delegate = find_delegate(params.device_id);
if (!delegate) {
DLOG(WARNING) << "OnMailboxBufferReceived: Got video mailbox buffer for a "
@@ -155,12 +152,17 @@ void VideoCaptureMessageFilter::OnMailboxBufferReceived(
// Send the buffer back to Host in case it's waiting for all buffers
// to be returned.
- Send(new VideoCaptureHostMsg_BufferReady(device_id, buffer_id, 0));
+ Send(new VideoCaptureHostMsg_BufferReady(
+ params.device_id, params.buffer_id, 0));
return;
}
delegate->OnMailboxBufferReceived(
- buffer_id, mailbox_holder, format, timestamp);
+ params.buffer_id,
+ params.mailbox_holder,
+ params.packed_frame_size,
+ params.timestamp,
+ params.metadata);
}
void VideoCaptureMessageFilter::OnBufferDestroyed(
« no previous file with comments | « content/renderer/media/video_capture_message_filter.h ('k') | content/renderer/media/video_capture_message_filter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698