OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/i18n/timezone.h" | 8 #include "base/i18n/timezone.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 capture_api_class_(api_type), | 50 capture_api_class_(api_type), |
51 capabilities_id_(id) { | 51 capabilities_id_(id) { |
52 } | 52 } |
53 #elif defined(OS_MACOSX) | 53 #elif defined(OS_MACOSX) |
54 VideoCaptureDevice::Name::Name(const std::string& name, | 54 VideoCaptureDevice::Name::Name(const std::string& name, |
55 const std::string& id, | 55 const std::string& id, |
56 const CaptureApiType api_type) | 56 const CaptureApiType api_type) |
57 : device_name_(name), | 57 : device_name_(name), |
58 unique_id_(id), | 58 unique_id_(id), |
59 capture_api_class_(api_type), | 59 capture_api_class_(api_type), |
60 transport_type_(OTHER_TRANSPORT), | 60 transport_type_(OTHER_TRANSPORT) {} |
61 is_blacklisted_(false) { | |
62 } | |
63 | 61 |
64 VideoCaptureDevice::Name::Name(const std::string& name, | 62 VideoCaptureDevice::Name::Name(const std::string& name, |
65 const std::string& id, | 63 const std::string& id, |
66 const CaptureApiType api_type, | 64 const CaptureApiType api_type, |
67 const TransportType transport_type) | 65 const TransportType transport_type) |
68 : device_name_(name), | 66 : device_name_(name), |
69 unique_id_(id), | 67 unique_id_(id), |
70 capture_api_class_(api_type), | 68 capture_api_class_(api_type), |
71 transport_type_(transport_type), | 69 transport_type_(transport_type) {} |
72 is_blacklisted_(false) { | |
73 } | |
74 #elif defined(ANDROID) | 70 #elif defined(ANDROID) |
75 VideoCaptureDevice::Name::Name(const std::string& name, | 71 VideoCaptureDevice::Name::Name(const std::string& name, |
76 const std::string& id, | 72 const std::string& id, |
77 const CaptureApiType api_type) | 73 const CaptureApiType api_type) |
78 : device_name_(name), unique_id_(id), capture_api_class_(api_type) { | 74 : device_name_(name), unique_id_(id), capture_api_class_(api_type) { |
79 } | 75 } |
80 #endif | 76 #endif |
81 | 77 |
82 VideoCaptureDevice::Name::~Name() { | 78 VideoCaptureDevice::Name::~Name() { |
83 } | 79 } |
(...skipping 18 matching lines...) Expand all Loading... |
102 default: | 98 default: |
103 NOTREACHED() << "Unknown Video Capture API type!"; | 99 NOTREACHED() << "Unknown Video Capture API type!"; |
104 return "Unknown API"; | 100 return "Unknown API"; |
105 } | 101 } |
106 } | 102 } |
107 #elif defined(OS_MACOSX) | 103 #elif defined(OS_MACOSX) |
108 const char* VideoCaptureDevice::Name::GetCaptureApiTypeString() const { | 104 const char* VideoCaptureDevice::Name::GetCaptureApiTypeString() const { |
109 switch (capture_api_type()) { | 105 switch (capture_api_type()) { |
110 case AVFOUNDATION: | 106 case AVFOUNDATION: |
111 return "AV Foundation"; | 107 return "AV Foundation"; |
112 case QTKIT: | |
113 return "QTKit"; | |
114 case DECKLINK: | 108 case DECKLINK: |
115 return "DeckLink"; | 109 return "DeckLink"; |
116 default: | 110 default: |
117 NOTREACHED() << "Unknown Video Capture API type!"; | 111 NOTREACHED() << "Unknown Video Capture API type!"; |
118 return "Unknown API"; | 112 return "Unknown API"; |
119 } | 113 } |
120 } | 114 } |
121 #elif defined(OS_ANDROID) | 115 #elif defined(OS_ANDROID) |
122 const char* VideoCaptureDevice::Name::GetCaptureApiTypeString() const { | 116 const char* VideoCaptureDevice::Name::GetCaptureApiTypeString() const { |
123 switch (capture_api_type()) { | 117 switch (capture_api_type()) { |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 switch (params.power_line_frequency) { | 165 switch (params.power_line_frequency) { |
172 case media::PowerLineFrequency::FREQUENCY_50HZ: // fall through | 166 case media::PowerLineFrequency::FREQUENCY_50HZ: // fall through |
173 case media::PowerLineFrequency::FREQUENCY_60HZ: | 167 case media::PowerLineFrequency::FREQUENCY_60HZ: |
174 return params.power_line_frequency; | 168 return params.power_line_frequency; |
175 default: | 169 default: |
176 return GetPowerLineFrequencyForLocation(); | 170 return GetPowerLineFrequencyForLocation(); |
177 } | 171 } |
178 } | 172 } |
179 | 173 |
180 } // namespace media | 174 } // namespace media |
OLD | NEW |