| 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 "webkit/plugins/ppapi/ppb_video_capture_impl.h" | 5 #include "webkit/plugins/ppapi/ppb_video_capture_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 } | 283 } |
| 284 | 284 |
| 285 void PPB_VideoCapture_Impl::SetRequestedInfo( | 285 void PPB_VideoCapture_Impl::SetRequestedInfo( |
| 286 const PP_VideoCaptureDeviceInfo_Dev& device_info, | 286 const PP_VideoCaptureDeviceInfo_Dev& device_info, |
| 287 uint32_t buffer_count) { | 287 uint32_t buffer_count) { |
| 288 // Clamp the buffer count to between 1 and |kMaxBuffers|. | 288 // Clamp the buffer count to between 1 and |kMaxBuffers|. |
| 289 buffer_count_hint_ = std::min(std::max(buffer_count, 1U), kMaxBuffers); | 289 buffer_count_hint_ = std::min(std::max(buffer_count, 1U), kMaxBuffers); |
| 290 | 290 |
| 291 capability_.width = device_info.width; | 291 capability_.width = device_info.width; |
| 292 capability_.height = device_info.height; | 292 capability_.height = device_info.height; |
| 293 capability_.max_fps = device_info.frames_per_second; | 293 capability_.frame_rate = device_info.frames_per_second; |
| 294 capability_.expected_capture_delay = 0; // Ignored. | 294 capability_.expected_capture_delay = 0; // Ignored. |
| 295 capability_.raw_type = media::VideoFrame::I420; | 295 capability_.color = media::VideoFrame::I420; |
| 296 capability_.interlaced = false; // Ignored. | 296 capability_.interlaced = false; // Ignored. |
| 297 } | 297 } |
| 298 | 298 |
| 299 void PPB_VideoCapture_Impl::DetachPlatformVideoCapture() { | 299 void PPB_VideoCapture_Impl::DetachPlatformVideoCapture() { |
| 300 if (platform_video_capture_.get()) { | 300 if (platform_video_capture_.get()) { |
| 301 platform_video_capture_->DetachEventHandler(); | 301 platform_video_capture_->DetachEventHandler(); |
| 302 platform_video_capture_ = NULL; | 302 platform_video_capture_ = NULL; |
| 303 } | 303 } |
| 304 } | 304 } |
| 305 | 305 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 318 : in_use(false), | 318 : in_use(false), |
| 319 data(NULL), | 319 data(NULL), |
| 320 buffer() { | 320 buffer() { |
| 321 } | 321 } |
| 322 | 322 |
| 323 PPB_VideoCapture_Impl::BufferInfo::~BufferInfo() { | 323 PPB_VideoCapture_Impl::BufferInfo::~BufferInfo() { |
| 324 } | 324 } |
| 325 | 325 |
| 326 } // namespace ppapi | 326 } // namespace ppapi |
| 327 } // namespace webkit | 327 } // namespace webkit |
| OLD | NEW |