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

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

Issue 8036005: Add a flag in StopCapture to allow event handler to choose event notification. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: add missing file Created 9 years, 2 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/video_capture_module_impl.h" 5 #include "content/renderer/media/video_capture_module_impl.h"
6 6
7 #include "base/atomicops.h" 7 #include "base/atomicops.h"
8 #include "content/renderer/media/video_capture_impl_manager.h" 8 #include "content/renderer/media/video_capture_impl_manager.h"
9 9
10 VideoCaptureModuleImpl::VideoCaptureModuleImpl( 10 VideoCaptureModuleImpl::VideoCaptureModuleImpl(
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 } 170 }
171 171
172 if (state_ != media::VideoCapture::kStarted) { 172 if (state_ != media::VideoCapture::kStarted) {
173 VLOG(1) << "Got a StopCapture while not started!!! "; 173 VLOG(1) << "Got a StopCapture while not started!!! ";
174 return; 174 return;
175 } 175 }
176 176
177 VLOG(1) << "StopCaptureOnCaptureThread. "; 177 VLOG(1) << "StopCaptureOnCaptureThread. ";
178 state_ = media::VideoCapture::kStopping; 178 state_ = media::VideoCapture::kStopping;
179 179
180 capture_engine_->StopCapture(this); 180 capture_engine_->StopCapture(this, true);
181 return; 181 return;
182 } 182 }
183 183
184 void VideoCaptureModuleImpl::OnStoppedOnCaptureThread( 184 void VideoCaptureModuleImpl::OnStoppedOnCaptureThread(
185 media::VideoCapture* capture) { 185 media::VideoCapture* capture) {
186 DCHECK(message_loop_proxy_->BelongsToCurrentThread()); 186 DCHECK(message_loop_proxy_->BelongsToCurrentThread());
187 187
188 VLOG(1) << "Capture Stopped!!! "; 188 VLOG(1) << "Capture Stopped!!! ";
189 state_ = media::VideoCapture::kStopped; 189 state_ = media::VideoCapture::kStopped;
190 got_first_frame_ = false; 190 got_first_frame_ = false;
(...skipping 27 matching lines...) Expand all
218 218
219 IncomingFrame( 219 IncomingFrame(
220 static_cast<WebRtc_UWord8*>(buf->memory_pointer), 220 static_cast<WebRtc_UWord8*>(buf->memory_pointer),
221 static_cast<WebRtc_Word32>(buf->buffer_size), 221 static_cast<WebRtc_Word32>(buf->buffer_size),
222 frameInfo_, 222 frameInfo_,
223 static_cast<WebRtc_Word64>( 223 static_cast<WebRtc_Word64>(
224 (buf->timestamp - start_time_).InMicroseconds())); 224 (buf->timestamp - start_time_).InMicroseconds()));
225 225
226 capture->FeedBuffer(buf); 226 capture->FeedBuffer(buf);
227 } 227 }
OLDNEW
« no previous file with comments | « content/renderer/media/video_capture_impl.cc ('k') | content/renderer/pepper_plugin_delegate_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698