Chromium Code Reviews| Index: content/renderer/media/video_capture_impl.cc |
| diff --git a/content/renderer/media/video_capture_impl.cc b/content/renderer/media/video_capture_impl.cc |
| index 9fd3601ba8edbc84af52e984c6a04f8d23943e96..6f390f6a90da7d06ea1d2d6b926565047f5b8760 100644 |
| --- a/content/renderer/media/video_capture_impl.cc |
| +++ b/content/renderer/media/video_capture_impl.cc |
| @@ -254,7 +254,8 @@ void VideoCaptureImpl::OnBufferReceived(int buffer_id, |
| DCHECK_EQ(format.pixel_format, media::PIXEL_FORMAT_I420); |
| if (state_ != VIDEO_CAPTURE_STATE_STARTED || suspended_) { |
| - Send(new VideoCaptureHostMsg_BufferReady(device_id_, buffer_id, 0)); |
| + Send(new VideoCaptureHostMsg_BufferReady( |
| + device_id_, buffer_id, std::vector<uint32>())); |
| return; |
| } |
| @@ -275,19 +276,18 @@ void VideoCaptureImpl::OnBufferReceived(int buffer_id, |
| buffer->buffer_size, |
| buffer->buffer->handle(), |
| timestamp - first_frame_timestamp_, |
| - media::BindToCurrentLoop(base::Bind( |
| - &VideoCaptureImpl::OnClientBufferFinished, |
| - weak_this_factory_.GetWeakPtr(), |
| - buffer_id, |
| - buffer, |
| - base::Passed(scoped_ptr<gpu::MailboxHolder>().Pass())))); |
| + media::BindToCurrentLoop( |
| + base::Bind(&VideoCaptureImpl::OnClientBufferFinished, |
| + weak_this_factory_.GetWeakPtr(), |
| + buffer_id, |
| + buffer, |
| + base::Passed(scoped_ptr<gpu::MailboxHolder>().Pass()), |
| + std::vector<uint32>()))); |
| for (ClientInfo::iterator it = clients_.begin(); it != clients_.end(); ++it) |
| it->first->OnFrameReady(this, frame); |
| } |
| -static void NullReadPixelsCB(const SkBitmap& bitmap) { NOTIMPLEMENTED(); } |
| - |
| void VideoCaptureImpl::OnMailboxBufferReceived( |
| int buffer_id, |
| const gpu::MailboxHolder& mailbox_holder, |
| @@ -297,7 +297,7 @@ void VideoCaptureImpl::OnMailboxBufferReceived( |
| if (state_ != VIDEO_CAPTURE_STATE_STARTED || suspended_) { |
| Send(new VideoCaptureHostMsg_BufferReady( |
| - device_id_, buffer_id, mailbox_holder.sync_point)); |
| + device_id_, buffer_id, std::vector<uint32>())); |
| return; |
| } |
| @@ -316,7 +316,7 @@ void VideoCaptureImpl::OnMailboxBufferReceived( |
| gfx::Rect(last_frame_format_.frame_size), |
| last_frame_format_.frame_size, |
| timestamp - first_frame_timestamp_, |
| - base::Bind(&NullReadPixelsCB)); |
| + media::VideoFrame::ReadPixelsCB()); |
|
danakj
2014/03/06 19:31:31
Unrelated change, do this separately?
dshwang
2014/03/06 19:51:37
ok, i'll do this change in separate CL.
|
| for (ClientInfo::iterator it = clients_.begin(); it != clients_.end(); ++it) |
| it->first->OnFrameReady(this, frame); |
| @@ -325,10 +325,11 @@ void VideoCaptureImpl::OnMailboxBufferReceived( |
| void VideoCaptureImpl::OnClientBufferFinished( |
| int buffer_id, |
| const scoped_refptr<ClientBuffer>& /* ignored_buffer */, |
| - scoped_ptr<gpu::MailboxHolder> mailbox_holder) { |
| + scoped_ptr<gpu::MailboxHolder> mailbox_holder, |
| + const std::vector<uint32>& release_sync_points) { |
| DCHECK(io_message_loop_proxy_->BelongsToCurrentThread()); |
| - const uint32 sync_point = (mailbox_holder ? mailbox_holder->sync_point : 0); |
| - Send(new VideoCaptureHostMsg_BufferReady(device_id_, buffer_id, sync_point)); |
| + Send(new VideoCaptureHostMsg_BufferReady( |
| + device_id_, buffer_id, release_sync_points)); |
| } |
| void VideoCaptureImpl::OnStateChanged(VideoCaptureState state) { |