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

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

Issue 16294003: Update content/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 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 unified diff | Download patch | Annotate | Revision Log
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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 void RtcVideoCaptureDelegate::OnBufferReadyOnCaptureThread( 100 void RtcVideoCaptureDelegate::OnBufferReadyOnCaptureThread(
101 media::VideoCapture* capture, 101 media::VideoCapture* capture,
102 scoped_refptr<media::VideoCapture::VideoFrameBuffer> buf) { 102 scoped_refptr<media::VideoCapture::VideoFrameBuffer> buf) {
103 if (!captured_callback_.is_null()) { 103 if (!captured_callback_.is_null()) {
104 if (!got_first_frame_) { 104 if (!got_first_frame_) {
105 got_first_frame_ = true; 105 got_first_frame_ = true;
106 if (!state_callback_.is_null()) 106 if (!state_callback_.is_null())
107 state_callback_.Run(CAPTURE_RUNNING); 107 state_callback_.Run(CAPTURE_RUNNING);
108 } 108 }
109 109
110 captured_callback_.Run(*buf); 110 captured_callback_.Run(*buf.get());
111 } 111 }
112 capture->FeedBuffer(buf); 112 capture->FeedBuffer(buf);
113 } 113 }
114 114
115 void RtcVideoCaptureDelegate::OnErrorOnCaptureThread( 115 void RtcVideoCaptureDelegate::OnErrorOnCaptureThread(
116 media::VideoCapture* capture) { 116 media::VideoCapture* capture) {
117 error_occured_ = true; 117 error_occured_ = true;
118 if (!state_callback_.is_null()) 118 if (!state_callback_.is_null())
119 state_callback_.Run(CAPTURE_FAILED); 119 state_callback_.Run(CAPTURE_FAILED);
120 } 120 }
121 121
122 122
123 void RtcVideoCaptureDelegate::OnRemovedOnCaptureThread( 123 void RtcVideoCaptureDelegate::OnRemovedOnCaptureThread(
124 media::VideoCapture* capture) { 124 media::VideoCapture* capture) {
125 if (!error_occured_ && !state_callback_.is_null()) 125 if (!error_occured_ && !state_callback_.is_null())
126 state_callback_.Run(CAPTURE_STOPPED); 126 state_callback_.Run(CAPTURE_STOPPED);
127 } 127 }
128 128
129 } // namespace content 129 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/rtc_peer_connection_handler_unittest.cc ('k') | content/renderer/media/rtc_video_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698