| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |