Chromium Code Reviews| 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 134 } | 134 } |
| 135 } | 135 } |
| 136 #endif | 136 #endif |
| 137 | 137 |
| 138 VideoCaptureDevice::Client::Buffer::~Buffer() { | 138 VideoCaptureDevice::Client::Buffer::~Buffer() { |
| 139 } | 139 } |
| 140 | 140 |
| 141 VideoCaptureDevice::~VideoCaptureDevice() { | 141 VideoCaptureDevice::~VideoCaptureDevice() { |
| 142 } | 142 } |
| 143 | 143 |
| 144 bool VideoCaptureDevice::TakePhoto( | |
| 145 const TakePhotoCallback& /* photo_callback */) { | |
|
tommi (sloooow) - chröme
2016/05/09 11:17:33
since we generally don't use /* */ comment style,
mcasas
2016/05/09 16:48:41
Done.
| |
| 146 NOTIMPLEMENTED(); | |
| 147 return false; | |
| 148 } | |
| 149 | |
| 144 PowerLineFrequency VideoCaptureDevice::GetPowerLineFrequencyForLocation() | 150 PowerLineFrequency VideoCaptureDevice::GetPowerLineFrequencyForLocation() |
| 145 const { | 151 const { |
| 146 const std::string current_country = base::CountryCodeForCurrentTimezone(); | 152 const std::string current_country = base::CountryCodeForCurrentTimezone(); |
| 147 if (current_country.empty()) | 153 if (current_country.empty()) |
| 148 return PowerLineFrequency::FREQUENCY_DEFAULT; | 154 return PowerLineFrequency::FREQUENCY_DEFAULT; |
| 149 // Sorted out list of countries with 60Hz power line frequency, from | 155 // Sorted out list of countries with 60Hz power line frequency, from |
| 150 // http://en.wikipedia.org/wiki/Mains_electricity_by_country | 156 // http://en.wikipedia.org/wiki/Mains_electricity_by_country |
| 151 const char* countries_using_60Hz[] = { | 157 const char* countries_using_60Hz[] = { |
| 152 "AI", "AO", "AS", "AW", "AZ", "BM", "BR", "BS", "BZ", "CA", "CO", | 158 "AI", "AO", "AS", "AW", "AZ", "BM", "BR", "BS", "BZ", "CA", "CO", |
| 153 "CR", "CU", "DO", "EC", "FM", "GT", "GU", "GY", "HN", "HT", "JP", | 159 "CR", "CU", "DO", "EC", "FM", "GT", "GU", "GY", "HN", "HT", "JP", |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 167 switch (params.power_line_frequency) { | 173 switch (params.power_line_frequency) { |
| 168 case media::PowerLineFrequency::FREQUENCY_50HZ: // fall through | 174 case media::PowerLineFrequency::FREQUENCY_50HZ: // fall through |
| 169 case media::PowerLineFrequency::FREQUENCY_60HZ: | 175 case media::PowerLineFrequency::FREQUENCY_60HZ: |
| 170 return params.power_line_frequency; | 176 return params.power_line_frequency; |
| 171 default: | 177 default: |
| 172 return GetPowerLineFrequencyForLocation(); | 178 return GetPowerLineFrequencyForLocation(); |
| 173 } | 179 } |
| 174 } | 180 } |
| 175 | 181 |
| 176 } // namespace media | 182 } // namespace media |
| OLD | NEW |