OLD | NEW |
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/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 "base/bind.h" | 8 #include "base/bind.h" |
9 #include "content/renderer/media/video_capture_impl_manager.h" | 9 #include "content/renderer/media/video_capture_impl_manager.h" |
10 | 10 |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 video_type_ = capability.rawType; | 145 video_type_ = capability.rawType; |
146 width_ = capability.width; | 146 width_ = capability.width; |
147 height_ = capability.height; | 147 height_ = capability.height; |
148 frame_rate_ = capability.maxFPS; | 148 frame_rate_ = capability.maxFPS; |
149 state_ = video_capture::kStarted; | 149 state_ = video_capture::kStarted; |
150 | 150 |
151 media::VideoCaptureCapability cap; | 151 media::VideoCaptureCapability cap; |
152 cap.width = capability.width; | 152 cap.width = capability.width; |
153 cap.height = capability.height; | 153 cap.height = capability.height; |
154 cap.frame_rate = capability.maxFPS; | 154 cap.frame_rate = capability.maxFPS; |
155 cap.color = media::VideoFrame::I420; | 155 cap.color = media::VideoCaptureCapability::kI420; |
156 capture_engine_->StartCapture(this, cap); | 156 capture_engine_->StartCapture(this, cap); |
157 } | 157 } |
158 | 158 |
159 void VideoCaptureModuleImpl::StopCaptureOnCaptureThread() { | 159 void VideoCaptureModuleImpl::StopCaptureOnCaptureThread() { |
160 DCHECK(message_loop_proxy_->BelongsToCurrentThread()); | 160 DCHECK(message_loop_proxy_->BelongsToCurrentThread()); |
161 | 161 |
162 if (state_ != video_capture::kStarted) { | 162 if (state_ != video_capture::kStarted) { |
163 DVLOG(1) << "Got a StopCapture while not started!!! "; | 163 DVLOG(1) << "Got a StopCapture while not started!!! "; |
164 return; | 164 return; |
165 } | 165 } |
(...skipping 25 matching lines...) Expand all Loading... |
191 | 191 |
192 IncomingFrame( | 192 IncomingFrame( |
193 static_cast<WebRtc_UWord8*>(buf->memory_pointer), | 193 static_cast<WebRtc_UWord8*>(buf->memory_pointer), |
194 static_cast<WebRtc_Word32>(buf->buffer_size), | 194 static_cast<WebRtc_Word32>(buf->buffer_size), |
195 frameInfo_, | 195 frameInfo_, |
196 static_cast<WebRtc_Word64>( | 196 static_cast<WebRtc_Word64>( |
197 (buf->timestamp - start_time_).InMilliseconds())); | 197 (buf->timestamp - start_time_).InMilliseconds())); |
198 | 198 |
199 capture->FeedBuffer(buf); | 199 capture->FeedBuffer(buf); |
200 } | 200 } |
OLD | NEW |