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

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

Issue 23587018: Replace media::VideoCapture::VideoFrameBuffer with media::VideoFrame. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@git-svn
Patch Set: 49d9ad5a [pulsar]: nit fixes Created 7 years, 3 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/rtc_video_capture_delegate.cc
diff --git a/content/renderer/media/rtc_video_capture_delegate.cc b/content/renderer/media/rtc_video_capture_delegate.cc
index 9f69d797fe82a8e033d4c3653745069ebf5030c2..8b038d5c75cb441bf202e31710c5c4fc783cdf7d 100644
--- a/content/renderer/media/rtc_video_capture_delegate.cc
+++ b/content/renderer/media/rtc_video_capture_delegate.cc
@@ -81,13 +81,15 @@ void RtcVideoCaptureDelegate::OnRemoved(media::VideoCapture* capture) {
Release();
}
-void RtcVideoCaptureDelegate::OnBufferReady(
+void RtcVideoCaptureDelegate::OnFrameReady(
media::VideoCapture* capture,
- scoped_refptr<media::VideoCapture::VideoFrameBuffer> buf) {
+ const scoped_refptr<media::VideoFrame>& frame) {
message_loop_proxy_->PostTask(
FROM_HERE,
- base::Bind(&RtcVideoCaptureDelegate::OnBufferReadyOnCaptureThread,
- this, capture, buf));
+ base::Bind(&RtcVideoCaptureDelegate::OnFrameReadyOnCaptureThread,
+ this,
+ capture,
+ frame));
}
void RtcVideoCaptureDelegate::OnDeviceInfoReceived(
@@ -100,9 +102,9 @@ void RtcVideoCaptureDelegate::OnDeviceInfoChanged(
const media::VideoCaptureParams& device_info) {
}
-void RtcVideoCaptureDelegate::OnBufferReadyOnCaptureThread(
+void RtcVideoCaptureDelegate::OnFrameReadyOnCaptureThread(
media::VideoCapture* capture,
- scoped_refptr<media::VideoCapture::VideoFrameBuffer> buf) {
+ const scoped_refptr<media::VideoFrame>& frame) {
if (!captured_callback_.is_null()) {
if (!got_first_frame_) {
got_first_frame_ = true;
@@ -110,9 +112,8 @@ void RtcVideoCaptureDelegate::OnBufferReadyOnCaptureThread(
state_callback_.Run(CAPTURE_RUNNING);
}
- captured_callback_.Run(*buf.get());
+ captured_callback_.Run(frame);
}
- capture->FeedBuffer(buf);
}
void RtcVideoCaptureDelegate::OnErrorOnCaptureThread(

Powered by Google App Engine
This is Rietveld 408576698