| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_factory_mac.h" | 5 #include "device/capture/video/mac/video_capture_device_factory_mac.h" |
| 6 | 6 |
| 7 #import <IOKit/audio/IOAudioTypes.h> | 7 #import <IOKit/audio/IOAudioTypes.h> |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <utility> | 10 #include <utility> |
| 11 | 11 |
| 12 #include "base/bind.h" | 12 #include "base/bind.h" |
| 13 #include "base/location.h" | 13 #include "base/location.h" |
| 14 #include "base/macros.h" | 14 #include "base/macros.h" |
| 15 #include "base/profiler/scoped_tracker.h" | 15 #include "base/profiler/scoped_tracker.h" |
| 16 #include "base/strings/string_util.h" | 16 #include "base/strings/string_util.h" |
| 17 #include "base/task_runner_util.h" | 17 #include "base/task_runner_util.h" |
| 18 #import "device/capture/video/mac/video_capture_device_avfoundation_mac.h" |
| 19 #import "device/capture/video/mac/video_capture_device_decklink_mac.h" |
| 20 #include "device/capture/video/mac/video_capture_device_mac.h" |
| 18 #import "media/base/mac/avfoundation_glue.h" | 21 #import "media/base/mac/avfoundation_glue.h" |
| 19 #import "media/capture/video/mac/video_capture_device_avfoundation_mac.h" | |
| 20 #import "media/capture/video/mac/video_capture_device_decklink_mac.h" | |
| 21 #include "media/capture/video/mac/video_capture_device_mac.h" | |
| 22 | 22 |
| 23 namespace media { | 23 namespace device { |
| 24 | 24 |
| 25 // Blacklisted devices are identified by a characteristic trailing substring of | 25 // Blacklisted devices are identified by a characteristic trailing substring of |
| 26 // uniqueId. At the moment these are just Blackmagic devices. | 26 // uniqueId. At the moment these are just Blackmagic devices. |
| 27 const char* kBlacklistedCamerasIdSignature[] = {"-01FDA82C8A9C"}; | 27 const char* kBlacklistedCamerasIdSignature[] = {"-01FDA82C8A9C"}; |
| 28 | 28 |
| 29 static bool IsDeviceBlacklisted( | 29 static bool IsDeviceBlacklisted( |
| 30 const VideoCaptureDeviceDescriptor& descriptor) { | 30 const VideoCaptureDeviceDescriptor& descriptor) { |
| 31 bool is_device_blacklisted = false; | 31 bool is_device_blacklisted = false; |
| 32 for (size_t i = 0; | 32 for (size_t i = 0; |
| 33 !is_device_blacklisted && i < arraysize(kBlacklistedCamerasIdSignature); | 33 !is_device_blacklisted && i < arraysize(kBlacklistedCamerasIdSignature); |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 } | 126 } |
| 127 } | 127 } |
| 128 | 128 |
| 129 // static | 129 // static |
| 130 VideoCaptureDeviceFactory* | 130 VideoCaptureDeviceFactory* |
| 131 VideoCaptureDeviceFactory::CreateVideoCaptureDeviceFactory( | 131 VideoCaptureDeviceFactory::CreateVideoCaptureDeviceFactory( |
| 132 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) { | 132 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) { |
| 133 return new VideoCaptureDeviceFactoryMac(); | 133 return new VideoCaptureDeviceFactoryMac(); |
| 134 } | 134 } |
| 135 | 135 |
| 136 } // namespace media | 136 } // namespace device |
| OLD | NEW |