| 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(const TakePhotoCallback& photo_callback) { |
| 145 NOTIMPLEMENTED(); |
| 146 return false; |
| 147 } |
| 148 |
| 144 PowerLineFrequency VideoCaptureDevice::GetPowerLineFrequencyForLocation() | 149 PowerLineFrequency VideoCaptureDevice::GetPowerLineFrequencyForLocation() |
| 145 const { | 150 const { |
| 146 const std::string current_country = base::CountryCodeForCurrentTimezone(); | 151 const std::string current_country = base::CountryCodeForCurrentTimezone(); |
| 147 if (current_country.empty()) | 152 if (current_country.empty()) |
| 148 return PowerLineFrequency::FREQUENCY_DEFAULT; | 153 return PowerLineFrequency::FREQUENCY_DEFAULT; |
| 149 // Sorted out list of countries with 60Hz power line frequency, from | 154 // Sorted out list of countries with 60Hz power line frequency, from |
| 150 // http://en.wikipedia.org/wiki/Mains_electricity_by_country | 155 // http://en.wikipedia.org/wiki/Mains_electricity_by_country |
| 151 const char* countries_using_60Hz[] = { | 156 const char* countries_using_60Hz[] = { |
| 152 "AI", "AO", "AS", "AW", "AZ", "BM", "BR", "BS", "BZ", "CA", "CO", | 157 "AI", "AO", "AS", "AW", "AZ", "BM", "BR", "BS", "BZ", "CA", "CO", |
| 153 "CR", "CU", "DO", "EC", "FM", "GT", "GU", "GY", "HN", "HT", "JP", | 158 "CR", "CU", "DO", "EC", "FM", "GT", "GU", "GY", "HN", "HT", "JP", |
| (...skipping 13 matching lines...) Expand all Loading... |
| 167 switch (params.power_line_frequency) { | 172 switch (params.power_line_frequency) { |
| 168 case media::PowerLineFrequency::FREQUENCY_50HZ: // fall through | 173 case media::PowerLineFrequency::FREQUENCY_50HZ: // fall through |
| 169 case media::PowerLineFrequency::FREQUENCY_60HZ: | 174 case media::PowerLineFrequency::FREQUENCY_60HZ: |
| 170 return params.power_line_frequency; | 175 return params.power_line_frequency; |
| 171 default: | 176 default: |
| 172 return GetPowerLineFrequencyForLocation(); | 177 return GetPowerLineFrequencyForLocation(); |
| 173 } | 178 } |
| 174 } | 179 } |
| 175 | 180 |
| 176 } // namespace media | 181 } // namespace media |
| OLD | NEW |