Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // Contains limit definition constants for the media subsystem. | 5 // Contains limit definition constants for the media subsystem. |
| 6 | 6 |
| 7 #ifndef MEDIA_BASE_LIMITS_H_ | 7 #ifndef MEDIA_BASE_LIMITS_H_ |
| 8 #define MEDIA_BASE_LIMITS_H_ | 8 #define MEDIA_BASE_LIMITS_H_ |
| 9 | 9 |
| 10 #include "build/build_config.h" | |
| 11 | |
| 10 namespace media { | 12 namespace media { |
| 11 | 13 |
| 12 namespace limits { | 14 namespace limits { |
| 13 | 15 |
| 14 enum { | 16 enum { |
| 15 // Maximum possible dimension (width or height) for any video. | 17 // Maximum possible dimension (width or height) for any video. |
| 16 kMaxDimension = (1 << 15) - 1, // 32767 | 18 kMaxDimension = (1 << 15) - 1, // 32767 |
| 17 | 19 |
| 18 // Maximum possible canvas size (width multiplied by height) for any video. | 20 // Maximum possible canvas size (width multiplied by height) for any video. |
| 19 kMaxCanvas = (1 << (14 * 2)), // 16384 x 16384 | 21 kMaxCanvas = (1 << (14 * 2)), // 16384 x 16384 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 51 // lengths are somewhat arbitrary as the EME spec doesn't specify any limits. | 53 // lengths are somewhat arbitrary as the EME spec doesn't specify any limits. |
| 52 kMinCertificateLength = 128, | 54 kMinCertificateLength = 128, |
| 53 kMaxCertificateLength = 16 * 1024, | 55 kMaxCertificateLength = 16 * 1024, |
| 54 kMaxSessionIdLength = 512, | 56 kMaxSessionIdLength = 512, |
| 55 kMinKeyIdLength = 1, | 57 kMinKeyIdLength = 1, |
| 56 kMaxKeyIdLength = 512, | 58 kMaxKeyIdLength = 512, |
| 57 kMaxKeyIds = 128, | 59 kMaxKeyIds = 128, |
| 58 kMaxInitDataLength = 64 * 1024, // 64 KB | 60 kMaxInitDataLength = 64 * 1024, // 64 KB |
| 59 kMaxSessionResponseLength = 64 * 1024, // 64 KB | 61 kMaxSessionResponseLength = 64 * 1024, // 64 KB |
| 60 kMaxKeySystemLength = 256, | 62 kMaxKeySystemLength = 256, |
| 63 | |
| 64 // Minimum and maximum buffer sizes for certain audio platforms. | |
| 65 #if defined(OS_MACOSX) | |
| 66 // Values taken from AudioManagerMac. | |
|
DaleCurtis
2017/06/27 17:25:08
This is now the source of these values, so no need
Andrew MacPherson
2017/06/27 17:46:49
Done.
| |
| 67 kMinAudioBufferSize = 128, | |
| 68 kMaxAudioBufferSize = 4096, | |
| 69 #elif defined(USE_PULSEAUDIO) | |
| 70 // Values taken from AudioManagerPulse. | |
| 71 kMinAudioBufferSize = 512, | |
| 72 kMaxAudioBufferSize = 8192, | |
| 73 #elif defined(USE_CRAS) | |
| 74 // Values taken from AudioManagerCras, though the minimum was dropped from 512 | |
| 75 // to 256 to allow explicitly requesting this buffer size on any board. | |
| 76 kMinAudioBufferSize = 256, | |
| 77 kMaxAudioBufferSize = 8192, | |
| 78 #endif | |
| 61 }; | 79 }; |
| 62 | 80 |
| 63 } // namespace limits | 81 } // namespace limits |
| 64 | 82 |
| 65 } // namespace media | 83 } // namespace media |
| 66 | 84 |
| 67 #endif // MEDIA_BASE_LIMITS_H_ | 85 #endif // MEDIA_BASE_LIMITS_H_ |
| OLD | NEW |