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

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

Issue 10108009: Move VideoCapture::VideoCaptureCapability to video_capture_types.h (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix content_unittests build failure Created 8 years, 8 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
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 "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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 const webrtc::VideoCaptureCapability& capability) { 141 const webrtc::VideoCaptureCapability& capability) {
142 DCHECK(message_loop_proxy_->BelongsToCurrentThread()); 142 DCHECK(message_loop_proxy_->BelongsToCurrentThread());
143 DCHECK_EQ(capability.rawType, webrtc::kVideoI420); 143 DCHECK_EQ(capability.rawType, webrtc::kVideoI420);
144 144
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::VideoCapture::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.max_fps = capability.maxFPS; 154 cap.frame_rate = capability.maxFPS;
155 cap.raw_type = media::VideoFrame::I420; 155 cap.color = media::VideoFrame::I420;
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
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 }
OLDNEW
« no previous file with comments | « content/renderer/media/video_capture_module_impl.h ('k') | content/renderer/pepper/pepper_platform_video_capture_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698