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/video/capture/video_capture_device.h" | 5 #include "media/video/capture/video_capture_device.h" |
| 6 | 6 |
| 7 #include "base/i18n/timezone.h" | 7 #include "base/i18n/timezone.h" |
| 8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
| 9 | 9 |
| 10 namespace media { | 10 namespace media { |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 50 const TransportType transport_type) | 50 const TransportType transport_type) |
| 51 : device_name_(name), | 51 : device_name_(name), |
| 52 unique_id_(id), | 52 unique_id_(id), |
| 53 capture_api_class_(api_type), | 53 capture_api_class_(api_type), |
| 54 transport_type_(transport_type), | 54 transport_type_(transport_type), |
| 55 is_blacklisted_(false) {} | 55 is_blacklisted_(false) {} |
| 56 #endif | 56 #endif |
| 57 | 57 |
| 58 VideoCaptureDevice::Name::~Name() {} | 58 VideoCaptureDevice::Name::~Name() {} |
| 59 | 59 |
| 60 VideoCaptureDevice::DeviceInfo::DeviceInfo() {} | |
|
perkj_chrome
2014/10/08 14:26:36
remove
mcasas
2014/10/08 14:49:39
Done.
| |
| 61 | |
| 62 VideoCaptureDevice::DeviceInfo::DeviceInfo( | |
| 63 const Name& name, | |
| 64 const VideoCaptureFormats& supported_formats) | |
| 65 : name(name), | |
| 66 supported_formats(supported_formats) {} | |
| 67 | |
| 68 VideoCaptureDevice::DeviceInfo::~DeviceInfo() {} | |
| 69 | |
| 60 VideoCaptureDevice::~VideoCaptureDevice() {} | 70 VideoCaptureDevice::~VideoCaptureDevice() {} |
| 61 | 71 |
| 62 int VideoCaptureDevice::GetPowerLineFrequencyForLocation() const { | 72 int VideoCaptureDevice::GetPowerLineFrequencyForLocation() const { |
| 63 std::string current_country = base::CountryCodeForCurrentTimezone(); | 73 std::string current_country = base::CountryCodeForCurrentTimezone(); |
| 64 if (current_country.empty()) | 74 if (current_country.empty()) |
| 65 return 0; | 75 return 0; |
| 66 // Sorted out list of countries with 60Hz power line frequency, from | 76 // Sorted out list of countries with 60Hz power line frequency, from |
| 67 // http://en.wikipedia.org/wiki/Mains_electricity_by_country | 77 // http://en.wikipedia.org/wiki/Mains_electricity_by_country |
| 68 const char* countries_using_60Hz[] = { | 78 const char* countries_using_60Hz[] = { |
| 69 "AI", "AO", "AS", "AW", "AZ", "BM", "BR", "BS", "BZ", "CA", "CO", | 79 "AI", "AO", "AS", "AW", "AZ", "BM", "BR", "BS", "BZ", "CA", "CO", |
| 70 "CR", "CU", "DO", "EC", "FM", "GT", "GU", "GY", "HN", "HT", "JP", | 80 "CR", "CU", "DO", "EC", "FM", "GT", "GU", "GY", "HN", "HT", "JP", |
| 71 "KN", "KR", "KY", "MS", "MX", "NI", "PA", "PE", "PF", "PH", "PR", | 81 "KN", "KR", "KY", "MS", "MX", "NI", "PA", "PE", "PF", "PH", "PR", |
| 72 "PW", "SA", "SR", "SV", "TT", "TW", "UM", "US", "VG", "VI", "VE"}; | 82 "PW", "SA", "SR", "SV", "TT", "TW", "UM", "US", "VG", "VI", "VE"}; |
| 73 const char** countries_using_60Hz_end = | 83 const char** countries_using_60Hz_end = |
| 74 countries_using_60Hz + arraysize(countries_using_60Hz); | 84 countries_using_60Hz + arraysize(countries_using_60Hz); |
| 75 if (std::find(countries_using_60Hz, countries_using_60Hz_end, | 85 if (std::find(countries_using_60Hz, countries_using_60Hz_end, |
| 76 current_country) == countries_using_60Hz_end) { | 86 current_country) == countries_using_60Hz_end) { |
| 77 return kPowerLine50Hz; | 87 return kPowerLine50Hz; |
| 78 } | 88 } |
| 79 return kPowerLine60Hz; | 89 return kPowerLine60Hz; |
| 80 } | 90 } |
| 81 | 91 |
| 82 bool VideoCaptureDevice::InitializeImageCapture( | 92 bool VideoCaptureDevice::InitializeImageCapture( |
| 83 const ImageCaptureFormat& image_format, | 93 const ImageCaptureFormat& image_format, |
| 84 scoped_ptr<ImageClient> client) { | 94 scoped_ptr<ImageClient> client) { |
| 85 return false; | 95 return false; |
| 86 } | 96 } |
| 87 | 97 |
| 88 } // namespace media | 98 } // namespace media |
| OLD | NEW |