| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef MEDIA_BASE_VIDEO_CAPTURE_TYPES_H_ | 5 #ifndef MEDIA_BASE_VIDEO_CAPTURE_TYPES_H_ |
| 6 #define MEDIA_BASE_VIDEO_CAPTURE_TYPES_H_ | 6 #define MEDIA_BASE_VIDEO_CAPTURE_TYPES_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 // Potential values of the googPowerLineFrequency optional constraint passed to | 55 // Potential values of the googPowerLineFrequency optional constraint passed to |
| 56 // getUserMedia. Note that the numeric values are currently significant, and are | 56 // getUserMedia. Note that the numeric values are currently significant, and are |
| 57 // used to map enum values to corresponding frequency values. | 57 // used to map enum values to corresponding frequency values. |
| 58 // TODO(ajose): http://crbug.com/525167 Consider making this a class. | 58 // TODO(ajose): http://crbug.com/525167 Consider making this a class. |
| 59 enum class PowerLineFrequency { | 59 enum class PowerLineFrequency { |
| 60 FREQUENCY_DEFAULT = 0, | 60 FREQUENCY_DEFAULT = 0, |
| 61 FREQUENCY_50HZ = 50, | 61 FREQUENCY_50HZ = 50, |
| 62 FREQUENCY_60HZ = 60, | 62 FREQUENCY_60HZ = 60, |
| 63 FREQUENCY_MAX = FREQUENCY_60HZ | 63 FREQUENCY_MAX = FREQUENCY_60HZ |
| 64 }; | 64 }; |
| 65 |
| 65 // Assert that the int:frequency mapping is correct. | 66 // Assert that the int:frequency mapping is correct. |
| 66 static_assert(static_cast<int>(PowerLineFrequency::FREQUENCY_DEFAULT) == 0, | 67 static_assert(static_cast<int>(PowerLineFrequency::FREQUENCY_DEFAULT) == 0, |
| 67 "static_cast<int>(FREQUENCY_DEFAULT) must equal 0."); | 68 "static_cast<int>(FREQUENCY_DEFAULT) must equal 0."); |
| 68 static_assert(static_cast<int>(PowerLineFrequency::FREQUENCY_50HZ) == 50, | 69 static_assert(static_cast<int>(PowerLineFrequency::FREQUENCY_50HZ) == 50, |
| 69 "static_cast<int>(FREQUENCY_DEFAULT) must equal 50."); | 70 "static_cast<int>(FREQUENCY_DEFAULT) must equal 50."); |
| 70 static_assert(static_cast<int>(PowerLineFrequency::FREQUENCY_60HZ) == 60, | 71 static_assert(static_cast<int>(PowerLineFrequency::FREQUENCY_60HZ) == 60, |
| 71 "static_cast<int>(FREQUENCY_DEFAULT) must equal 60."); | 72 "static_cast<int>(FREQUENCY_DEFAULT) must equal 60."); |
| 72 | 73 |
| 73 // Some drivers use rational time per frame instead of float frame rate, this | 74 // Some drivers use rational time per frame instead of float frame rate, this |
| 74 // constant k is used to convert between both: A fps -> [k/k*A] seconds/frame. | 75 // constant k is used to convert between both: A fps -> [k/k*A] seconds/frame. |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 // Policy for resolution change. | 138 // Policy for resolution change. |
| 138 ResolutionChangePolicy resolution_change_policy; | 139 ResolutionChangePolicy resolution_change_policy; |
| 139 | 140 |
| 140 // User-specified power line frequency. | 141 // User-specified power line frequency. |
| 141 PowerLineFrequency power_line_frequency; | 142 PowerLineFrequency power_line_frequency; |
| 142 }; | 143 }; |
| 143 | 144 |
| 144 } // namespace media | 145 } // namespace media |
| 145 | 146 |
| 146 #endif // MEDIA_BASE_VIDEO_CAPTURE_TYPES_H_ | 147 #endif // MEDIA_BASE_VIDEO_CAPTURE_TYPES_H_ |
| OLD | NEW |