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

Side by Side Diff: content/renderer/media/rtc_video_capture_delegate.cc

Issue 11275088: Remove implicit scoped_refptr operator T* Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 8 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/media/rtc_video_capture_delegate.h" 5 #include "content/renderer/media/rtc_video_capture_delegate.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 8
9 namespace content { 9 namespace content {
10 10
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 void RtcVideoCaptureDelegate::OnBufferReadyOnCaptureThread( 91 void RtcVideoCaptureDelegate::OnBufferReadyOnCaptureThread(
92 media::VideoCapture* capture, 92 media::VideoCapture* capture,
93 scoped_refptr<media::VideoCapture::VideoFrameBuffer> buf) { 93 scoped_refptr<media::VideoCapture::VideoFrameBuffer> buf) {
94 if (!captured_callback_.is_null()) { 94 if (!captured_callback_.is_null()) {
95 if (!got_first_frame_) { 95 if (!got_first_frame_) {
96 got_first_frame_ = true; 96 got_first_frame_ = true;
97 if (!state_callback_.is_null()) 97 if (!state_callback_.is_null())
98 state_callback_.Run(CAPTURE_RUNNING); 98 state_callback_.Run(CAPTURE_RUNNING);
99 } 99 }
100 100
101 captured_callback_.Run(*buf); 101 captured_callback_.Run(*buf.get());
102 } 102 }
103 capture->FeedBuffer(buf); 103 capture->FeedBuffer(buf);
104 } 104 }
105 105
106 void RtcVideoCaptureDelegate::OnErrorOnCaptureThread( 106 void RtcVideoCaptureDelegate::OnErrorOnCaptureThread(
107 media::VideoCapture* capture, int error_code) { 107 media::VideoCapture* capture, int error_code) {
108 if (!state_callback_.is_null()) 108 if (!state_callback_.is_null())
109 state_callback_.Run(got_first_frame_ ? CAPTURE_STOPPED : CAPTURE_FAILED); 109 state_callback_.Run(got_first_frame_ ? CAPTURE_STOPPED : CAPTURE_FAILED);
110 } 110 }
111 111
112 } // namespace content 112 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/rtc_peer_connection_handler.cc ('k') | content/renderer/media/video_capture_impl_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698