| 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 "media/capture/video/video_capture_device.h" | 5 #include "media/capture/video/video_capture_device.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 DLOG(WARNING) << "No usable camera found"; | 329 DLOG(WARNING) << "No usable camera found"; |
| 330 return nullptr; | 330 return nullptr; |
| 331 #endif | 331 #endif |
| 332 | 332 |
| 333 if (device_descriptors_->empty()) { | 333 if (device_descriptors_->empty()) { |
| 334 DLOG(WARNING) << "No camera found"; | 334 DLOG(WARNING) << "No camera found"; |
| 335 return nullptr; | 335 return nullptr; |
| 336 } | 336 } |
| 337 DLOG(INFO) << "Using camera " | 337 DLOG(INFO) << "Using camera " |
| 338 << device_descriptors_->front().GetNameAndModel(); | 338 << device_descriptors_->front().GetNameAndModel(); |
| 339 ; | |
| 340 return base::MakeUnique<VideoCaptureDeviceDescriptor>( | 339 return base::MakeUnique<VideoCaptureDeviceDescriptor>( |
| 341 device_descriptors_->front()); | 340 device_descriptors_->front()); |
| 342 } | 341 } |
| 343 | 342 |
| 344 const VideoCaptureFormat& last_format() const { return last_format_; } | 343 const VideoCaptureFormat& last_format() const { return last_format_; } |
| 345 | 344 |
| 346 std::unique_ptr<VideoCaptureDeviceDescriptor> | 345 std::unique_ptr<VideoCaptureDeviceDescriptor> |
| 347 GetFirstDeviceDescriptorSupportingPixelFormat( | 346 GetFirstDeviceDescriptorSupportingPixelFormat( |
| 348 const VideoPixelFormat& pixel_format) { | 347 const VideoPixelFormat& pixel_format) { |
| 349 if (!FindUsableDeviceDescriptor()) | 348 if (!FindUsableDeviceDescriptor()) |
| (...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 694 | 693 |
| 695 device->GetPhotoState(std::move(scoped_get_callback)); | 694 device->GetPhotoState(std::move(scoped_get_callback)); |
| 696 run_loop.Run(); | 695 run_loop.Run(); |
| 697 | 696 |
| 698 ASSERT_TRUE(image_capture_client_->capabilities()); | 697 ASSERT_TRUE(image_capture_client_->capabilities()); |
| 699 | 698 |
| 700 device->StopAndDeAllocate(); | 699 device->StopAndDeAllocate(); |
| 701 } | 700 } |
| 702 | 701 |
| 703 }; // namespace media | 702 }; // namespace media |
| OLD | NEW |