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/video/capture/mac/video_capture_device_mac.h" | 5 #include "media/video/capture/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 | 10 |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/location.h" | 12 #include "base/location.h" |
13 #include "base/logging.h" | 13 #include "base/logging.h" |
14 #include "base/message_loop/message_loop_proxy.h" | |
15 #include "base/mac/scoped_ioobject.h" | 14 #include "base/mac/scoped_ioobject.h" |
16 #include "base/mac/scoped_ioplugininterface.h" | 15 #include "base/mac/scoped_ioplugininterface.h" |
| 16 #include "base/message_loop/message_loop_proxy.h" |
17 #include "base/strings/string_number_conversions.h" | 17 #include "base/strings/string_number_conversions.h" |
18 #include "base/time/time.h" | 18 #include "base/time/time.h" |
19 #import "media/base/mac/avfoundation_glue.h" | 19 #import "media/base/mac/avfoundation_glue.h" |
20 #import "media/video/capture/mac/platform_video_capturing_mac.h" | 20 #import "media/video/capture/mac/platform_video_capturing_mac.h" |
21 #import "media/video/capture/mac/video_capture_device_avfoundation_mac.h" | 21 #import "media/video/capture/mac/video_capture_device_avfoundation_mac.h" |
22 #import "media/video/capture/mac/video_capture_device_qtkit_mac.h" | 22 #import "media/video/capture/mac/video_capture_device_qtkit_mac.h" |
23 #include "ui/gfx/size.h" | 23 #include "ui/gfx/geometry/size.h" |
24 | 24 |
25 @implementation DeviceNameAndTransportType | 25 @implementation DeviceNameAndTransportType |
26 | 26 |
27 - (id)initWithName:(NSString*)deviceName transportType:(int32_t)transportType { | 27 - (id)initWithName:(NSString*)deviceName transportType:(int32_t)transportType { |
28 if (self = [super init]) { | 28 if (self = [super init]) { |
29 deviceName_.reset([deviceName copy]); | 29 deviceName_.reset([deviceName copy]); |
30 transportType_ = transportType; | 30 transportType_ = transportType; |
31 } | 31 } |
32 return self; | 32 return self; |
33 } | 33 } |
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
567 if (![capture_device_ setCaptureHeight:capture_format_.frame_size.height() | 567 if (![capture_device_ setCaptureHeight:capture_format_.frame_size.height() |
568 width:capture_format_.frame_size.width() | 568 width:capture_format_.frame_size.width() |
569 frameRate:capture_format_.frame_rate]) { | 569 frameRate:capture_format_.frame_rate]) { |
570 ReceiveError("Could not configure capture device."); | 570 ReceiveError("Could not configure capture device."); |
571 return false; | 571 return false; |
572 } | 572 } |
573 return true; | 573 return true; |
574 } | 574 } |
575 | 575 |
576 } // namespace media | 576 } // namespace media |
OLD | NEW |