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 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
411 .c_str()); | 411 .c_str()); |
412 DLOG(ERROR) << log_message; | 412 DLOG(ERROR) << log_message; |
413 OnLog(log_message); | 413 OnLog(log_message); |
414 receiver_->OnError(); | 414 receiver_->OnError(); |
415 } | 415 } |
416 | 416 |
417 void VideoCaptureDeviceClient::OnLog(const std::string& message) { | 417 void VideoCaptureDeviceClient::OnLog(const std::string& message) { |
418 receiver_->OnLog(message); | 418 receiver_->OnLog(message); |
419 } | 419 } |
420 | 420 |
| 421 void VideoCaptureDeviceClient::OnStarted() { |
| 422 receiver_->OnStarted(); |
| 423 } |
| 424 |
421 double VideoCaptureDeviceClient::GetBufferPoolUtilization() const { | 425 double VideoCaptureDeviceClient::GetBufferPoolUtilization() const { |
422 return buffer_pool_->GetBufferPoolUtilization(); | 426 return buffer_pool_->GetBufferPoolUtilization(); |
423 } | 427 } |
424 | 428 |
425 void VideoCaptureDeviceClient::InitializeI420PlanePointers( | 429 void VideoCaptureDeviceClient::InitializeI420PlanePointers( |
426 const gfx::Size& dimensions, | 430 const gfx::Size& dimensions, |
427 uint8_t* const data, | 431 uint8_t* const data, |
428 uint8_t** y_plane_data, | 432 uint8_t** y_plane_data, |
429 uint8_t** u_plane_data, | 433 uint8_t** u_plane_data, |
430 uint8_t** v_plane_data) { | 434 uint8_t** v_plane_data) { |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
467 auto buffer_access = buffer.handle_provider->GetHandleForInProcessAccess(); | 471 auto buffer_access = buffer.handle_provider->GetHandleForInProcessAccess(); |
468 memcpy(buffer_access->data(), data, length); | 472 memcpy(buffer_access->data(), data, length); |
469 const VideoCaptureFormat output_format = | 473 const VideoCaptureFormat output_format = |
470 VideoCaptureFormat(format.frame_size, format.frame_rate, | 474 VideoCaptureFormat(format.frame_size, format.frame_rate, |
471 media::PIXEL_FORMAT_Y16, media::PIXEL_STORAGE_CPU); | 475 media::PIXEL_FORMAT_Y16, media::PIXEL_STORAGE_CPU); |
472 OnIncomingCapturedBuffer(std::move(buffer), output_format, reference_time, | 476 OnIncomingCapturedBuffer(std::move(buffer), output_format, reference_time, |
473 timestamp); | 477 timestamp); |
474 } | 478 } |
475 | 479 |
476 } // namespace media | 480 } // namespace media |
OLD | NEW |