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 |
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 plugin_interface_ref(video_control_interface); | 324 plugin_interface_ref(video_control_interface); |
325 | 325 |
326 SetAntiFlickerInVideoControlInterface(video_control_interface, frequency); | 326 SetAntiFlickerInVideoControlInterface(video_control_interface, frequency); |
327 } | 327 } |
328 } | 328 } |
329 | 329 |
330 const std::string VideoCaptureDevice::Name::GetModel() const { | 330 const std::string VideoCaptureDevice::Name::GetModel() const { |
331 // Skip the AVFoundation's not USB nor built-in devices. | 331 // Skip the AVFoundation's not USB nor built-in devices. |
332 if (capture_api_type() == AVFOUNDATION && transport_type() != USB_OR_BUILT_IN) | 332 if (capture_api_type() == AVFOUNDATION && transport_type() != USB_OR_BUILT_IN) |
333 return ""; | 333 return ""; |
| 334 if (capture_api_type() == DECKLINK) |
| 335 return ""; |
334 // Both PID and VID are 4 characters. | 336 // Both PID and VID are 4 characters. |
335 if (unique_id_.size() < 2 * kVidPidSize) | 337 if (unique_id_.size() < 2 * kVidPidSize) |
336 return ""; | 338 return ""; |
337 | 339 |
338 // The last characters of device id is a concatenation of VID and then PID. | 340 // The last characters of device id is a concatenation of VID and then PID. |
339 const size_t vid_location = unique_id_.size() - 2 * kVidPidSize; | 341 const size_t vid_location = unique_id_.size() - 2 * kVidPidSize; |
340 std::string id_vendor = unique_id_.substr(vid_location, kVidPidSize); | 342 std::string id_vendor = unique_id_.substr(vid_location, kVidPidSize); |
341 const size_t pid_location = unique_id_.size() - kVidPidSize; | 343 const size_t pid_location = unique_id_.size() - kVidPidSize; |
342 std::string id_product = unique_id_.substr(pid_location, kVidPidSize); | 344 std::string id_product = unique_id_.substr(pid_location, kVidPidSize); |
343 | 345 |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
573 if (![capture_device_ setCaptureHeight:capture_format_.frame_size.height() | 575 if (![capture_device_ setCaptureHeight:capture_format_.frame_size.height() |
574 width:capture_format_.frame_size.width() | 576 width:capture_format_.frame_size.width() |
575 frameRate:capture_format_.frame_rate]) { | 577 frameRate:capture_format_.frame_rate]) { |
576 ReceiveError("Could not configure capture device."); | 578 ReceiveError("Could not configure capture device."); |
577 return false; | 579 return false; |
578 } | 580 } |
579 return true; | 581 return true; |
580 } | 582 } |
581 | 583 |
582 } // namespace media | 584 } // namespace media |
OLD | NEW |