| 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/mac/video_capture_device_mac.h" | 5 #include "media/capture/video/mac/video_capture_device_mac.h" |
| 6 | 6 |
| 7 #include <IOKit/IOCFPlugIn.h> | 7 #include <IOKit/IOCFPlugIn.h> |
| 8 #include <IOKit/usb/IOUSBLib.h> | 8 #include <IOKit/usb/IOUSBLib.h> |
| 9 #include <IOKit/usb/USBSpec.h> | 9 #include <IOKit/usb/USBSpec.h> |
| 10 #include <stddef.h> | 10 #include <stddef.h> |
| 11 #include <stdint.h> | 11 #include <stdint.h> |
| 12 | 12 |
| 13 #include <limits> | 13 #include <limits> |
| 14 #include <utility> | 14 #include <utility> |
| 15 | 15 |
| 16 #include "base/bind.h" | 16 #include "base/bind.h" |
| 17 #include "base/location.h" | 17 #include "base/location.h" |
| 18 #include "base/logging.h" | 18 #include "base/logging.h" |
| 19 #include "base/mac/scoped_ioobject.h" | 19 #include "base/mac/scoped_ioobject.h" |
| 20 #include "base/mac/scoped_ioplugininterface.h" | 20 #include "base/mac/scoped_ioplugininterface.h" |
| 21 #include "base/macros.h" | 21 #include "base/macros.h" |
| 22 #include "base/single_thread_task_runner.h" | 22 #include "base/single_thread_task_runner.h" |
| 23 #include "base/strings/string_number_conversions.h" | 23 #include "base/strings/string_number_conversions.h" |
| 24 #include "base/threading/thread_task_runner_handle.h" | 24 #include "base/threading/thread_task_runner_handle.h" |
| 25 #include "base/time/time.h" | 25 #include "base/time/time.h" |
| 26 #import "media/base/mac/avfoundation_glue.h" | |
| 27 #include "media/base/timestamp_constants.h" | 26 #include "media/base/timestamp_constants.h" |
| 28 #import "media/capture/video/mac/video_capture_device_avfoundation_mac.h" | 27 #import "media/capture/video/mac/video_capture_device_avfoundation_mac.h" |
| 29 #include "ui/gfx/geometry/size.h" | 28 #include "ui/gfx/geometry/size.h" |
| 30 | 29 |
| 31 @implementation DeviceNameAndTransportType | 30 @implementation DeviceNameAndTransportType |
| 32 | 31 |
| 33 - (id)initWithName:(NSString*)deviceName transportType:(int32_t)transportType { | 32 - (id)initWithName:(NSString*)deviceName transportType:(int32_t)transportType { |
| 34 if (self = [super init]) { | 33 if (self = [super init]) { |
| 35 deviceName_.reset([deviceName copy]); | 34 deviceName_.reset([deviceName copy]); |
| 36 transportType_ = transportType; | 35 transportType_ = transportType; |
| (...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 489 if (![capture_device_ setCaptureHeight:capture_format_.frame_size.height() | 488 if (![capture_device_ setCaptureHeight:capture_format_.frame_size.height() |
| 490 width:capture_format_.frame_size.width() | 489 width:capture_format_.frame_size.width() |
| 491 frameRate:capture_format_.frame_rate]) { | 490 frameRate:capture_format_.frame_rate]) { |
| 492 ReceiveError(FROM_HERE, "Could not configure capture device."); | 491 ReceiveError(FROM_HERE, "Could not configure capture device."); |
| 493 return false; | 492 return false; |
| 494 } | 493 } |
| 495 return true; | 494 return true; |
| 496 } | 495 } |
| 497 | 496 |
| 498 } // namespace media | 497 } // namespace media |
| OLD | NEW |