| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "media/capture/video/video_capture_device_client.h" | 5 #include "media/capture/video/video_capture_device_client.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 .c_str()); | 369 .c_str()); |
| 370 DLOG(ERROR) << log_message; | 370 DLOG(ERROR) << log_message; |
| 371 OnLog(log_message); | 371 OnLog(log_message); |
| 372 receiver_->OnError(); | 372 receiver_->OnError(); |
| 373 } | 373 } |
| 374 | 374 |
| 375 void VideoCaptureDeviceClient::OnLog(const std::string& message) { | 375 void VideoCaptureDeviceClient::OnLog(const std::string& message) { |
| 376 receiver_->OnLog(message); | 376 receiver_->OnLog(message); |
| 377 } | 377 } |
| 378 | 378 |
| 379 void VideoCaptureDeviceClient::OnStarted() { |
| 380 receiver_->OnStarted(); |
| 381 } |
| 382 |
| 379 double VideoCaptureDeviceClient::GetBufferPoolUtilization() const { | 383 double VideoCaptureDeviceClient::GetBufferPoolUtilization() const { |
| 380 return buffer_pool_->GetBufferPoolUtilization(); | 384 return buffer_pool_->GetBufferPoolUtilization(); |
| 381 } | 385 } |
| 382 | 386 |
| 383 void VideoCaptureDeviceClient::InitializeI420PlanePointers( | 387 void VideoCaptureDeviceClient::InitializeI420PlanePointers( |
| 384 const gfx::Size& dimensions, | 388 const gfx::Size& dimensions, |
| 385 uint8_t* const data, | 389 uint8_t* const data, |
| 386 uint8_t** y_plane_data, | 390 uint8_t** y_plane_data, |
| 387 uint8_t** u_plane_data, | 391 uint8_t** u_plane_data, |
| 388 uint8_t** v_plane_data) { | 392 uint8_t** v_plane_data) { |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 425 auto buffer_access = buffer.handle_provider()->GetHandleForInProcessAccess(); | 429 auto buffer_access = buffer.handle_provider()->GetHandleForInProcessAccess(); |
| 426 memcpy(buffer_access->data(), data, length); | 430 memcpy(buffer_access->data(), data, length); |
| 427 const VideoCaptureFormat output_format = | 431 const VideoCaptureFormat output_format = |
| 428 VideoCaptureFormat(format.frame_size, format.frame_rate, | 432 VideoCaptureFormat(format.frame_size, format.frame_rate, |
| 429 media::PIXEL_FORMAT_Y16, media::PIXEL_STORAGE_CPU); | 433 media::PIXEL_FORMAT_Y16, media::PIXEL_STORAGE_CPU); |
| 430 OnIncomingCapturedBuffer(std::move(buffer), output_format, reference_time, | 434 OnIncomingCapturedBuffer(std::move(buffer), output_format, reference_time, |
| 431 timestamp); | 435 timestamp); |
| 432 } | 436 } |
| 433 | 437 |
| 434 } // namespace media | 438 } // namespace media |
| OLD | NEW |