Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Side by Side Diff: media/video/capture/video_capture_device.cc

Issue 1090273006: Revert of VideoCapture: add support for GpuMemoryBuffer allocation and lifetime mgmt in VideoCaptureBufferPool (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 case TANGO: 121 case TANGO:
122 return "Tango API"; 122 return "Tango API";
123 case API_TYPE_UNKNOWN: 123 case API_TYPE_UNKNOWN:
124 default: 124 default:
125 NOTREACHED() << "Unknown Video Capture API type!"; 125 NOTREACHED() << "Unknown Video Capture API type!";
126 return "Unknown API"; 126 return "Unknown API";
127 } 127 }
128 } 128 }
129 #endif 129 #endif
130 130
131 VideoCaptureDevice::Client::Buffer::~Buffer() {}
132
133 VideoCaptureDevice::~VideoCaptureDevice() {} 131 VideoCaptureDevice::~VideoCaptureDevice() {}
134 132
135 int VideoCaptureDevice::GetPowerLineFrequencyForLocation() const { 133 int VideoCaptureDevice::GetPowerLineFrequencyForLocation() const {
136 std::string current_country = base::CountryCodeForCurrentTimezone(); 134 std::string current_country = base::CountryCodeForCurrentTimezone();
137 if (current_country.empty()) 135 if (current_country.empty())
138 return 0; 136 return 0;
139 // Sorted out list of countries with 60Hz power line frequency, from 137 // Sorted out list of countries with 60Hz power line frequency, from
140 // http://en.wikipedia.org/wiki/Mains_electricity_by_country 138 // http://en.wikipedia.org/wiki/Mains_electricity_by_country
141 const char* countries_using_60Hz[] = { 139 const char* countries_using_60Hz[] = {
142 "AI", "AO", "AS", "AW", "AZ", "BM", "BR", "BS", "BZ", "CA", "CO", 140 "AI", "AO", "AS", "AW", "AZ", "BM", "BR", "BS", "BZ", "CA", "CO",
143 "CR", "CU", "DO", "EC", "FM", "GT", "GU", "GY", "HN", "HT", "JP", 141 "CR", "CU", "DO", "EC", "FM", "GT", "GU", "GY", "HN", "HT", "JP",
144 "KN", "KR", "KY", "MS", "MX", "NI", "PA", "PE", "PF", "PH", "PR", 142 "KN", "KR", "KY", "MS", "MX", "NI", "PA", "PE", "PF", "PH", "PR",
145 "PW", "SA", "SR", "SV", "TT", "TW", "UM", "US", "VG", "VI", "VE"}; 143 "PW", "SA", "SR", "SV", "TT", "TW", "UM", "US", "VG", "VI", "VE"};
146 const char** countries_using_60Hz_end = 144 const char** countries_using_60Hz_end =
147 countries_using_60Hz + arraysize(countries_using_60Hz); 145 countries_using_60Hz + arraysize(countries_using_60Hz);
148 if (std::find(countries_using_60Hz, countries_using_60Hz_end, 146 if (std::find(countries_using_60Hz, countries_using_60Hz_end,
149 current_country) == countries_using_60Hz_end) { 147 current_country) == countries_using_60Hz_end) {
150 return kPowerLine50Hz; 148 return kPowerLine50Hz;
151 } 149 }
152 return kPowerLine60Hz; 150 return kPowerLine60Hz;
153 } 151 }
154 152
155 } // namespace media 153 } // namespace media
OLDNEW
« no previous file with comments | « media/video/capture/video_capture_device.h ('k') | media/video/capture/video_capture_device_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698