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 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
389 .c_str()); | 389 .c_str()); |
390 DLOG(ERROR) << log_message; | 390 DLOG(ERROR) << log_message; |
391 OnLog(log_message); | 391 OnLog(log_message); |
392 receiver_->OnError(); | 392 receiver_->OnError(); |
393 } | 393 } |
394 | 394 |
395 void VideoCaptureDeviceClient::OnLog(const std::string& message) { | 395 void VideoCaptureDeviceClient::OnLog(const std::string& message) { |
396 receiver_->OnLog(message); | 396 receiver_->OnLog(message); |
397 } | 397 } |
398 | 398 |
| 399 void VideoCaptureDeviceClient::OnStarted() { |
| 400 receiver_->OnStarted(); |
| 401 } |
| 402 |
399 double VideoCaptureDeviceClient::GetBufferPoolUtilization() const { | 403 double VideoCaptureDeviceClient::GetBufferPoolUtilization() const { |
400 return buffer_pool_->GetBufferPoolUtilization(); | 404 return buffer_pool_->GetBufferPoolUtilization(); |
401 } | 405 } |
402 | 406 |
403 void VideoCaptureDeviceClient::InitializeI420PlanePointers( | 407 void VideoCaptureDeviceClient::InitializeI420PlanePointers( |
404 const gfx::Size& dimensions, | 408 const gfx::Size& dimensions, |
405 uint8_t* const data, | 409 uint8_t* const data, |
406 uint8_t** y_plane_data, | 410 uint8_t** y_plane_data, |
407 uint8_t** u_plane_data, | 411 uint8_t** u_plane_data, |
408 uint8_t** v_plane_data) { | 412 uint8_t** v_plane_data) { |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
445 auto buffer_access = buffer.handle_provider()->GetHandleForInProcessAccess(); | 449 auto buffer_access = buffer.handle_provider()->GetHandleForInProcessAccess(); |
446 memcpy(buffer_access->data(), data, length); | 450 memcpy(buffer_access->data(), data, length); |
447 const VideoCaptureFormat output_format = | 451 const VideoCaptureFormat output_format = |
448 VideoCaptureFormat(format.frame_size, format.frame_rate, | 452 VideoCaptureFormat(format.frame_size, format.frame_rate, |
449 media::PIXEL_FORMAT_Y16, media::PIXEL_STORAGE_CPU); | 453 media::PIXEL_FORMAT_Y16, media::PIXEL_STORAGE_CPU); |
450 OnIncomingCapturedBuffer(std::move(buffer), output_format, reference_time, | 454 OnIncomingCapturedBuffer(std::move(buffer), output_format, reference_time, |
451 timestamp); | 455 timestamp); |
452 } | 456 } |
453 | 457 |
454 } // namespace media | 458 } // namespace media |
OLD | NEW |