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 kMinAudioBufferSize = 128, | |
| 67 kMaxAudioBufferSize = 4096, | |
|
Raymond Toy
2017/06/27 16:06:48
Any particular reason why 4096 and not 8192 like y
Andrew MacPherson
2017/06/27 17:03:40
4096 was just copied from audio_manager_mac.cc, I'
| |
| 68 #elif defined(USE_PULSEAUDIO) | |
| 69 kMinAudioBufferSize = 512, | |
|
Raymond Toy
2017/06/27 16:06:48
A comment here explaining why the min is 512 would
Andrew MacPherson
2017/06/27 17:03:41
Same as above, this is the value that was already
| |
| 70 kMaxAudioBufferSize = 8192, | |
| 71 #elif defined(USE_CRAS) | |
| 72 kMinAudioBufferSize = 256, | |
|
Raymond Toy
2017/06/27 16:06:48
Likewise a comment on the min value would be good.
Andrew MacPherson
2017/06/27 17:03:41
I've added a short comment here, does that work?
| |
| 73 kMaxAudioBufferSize = 8192, | |
| 74 #endif | |
| 61 }; | 75 }; |
| 62 | 76 |
| 63 } // namespace limits | 77 } // namespace limits |
| 64 | 78 |
| 65 } // namespace media | 79 } // namespace media |
| 66 | 80 |
| 67 #endif // MEDIA_BASE_LIMITS_H_ | 81 #endif // MEDIA_BASE_LIMITS_H_ |
| OLD | NEW |