| 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 27 matching lines...) Expand all Loading... |
| 47 // lengths are somewhat arbitrary as the EME spec doesn't specify any limits. | 49 // lengths are somewhat arbitrary as the EME spec doesn't specify any limits. |
| 48 kMinCertificateLength = 128, | 50 kMinCertificateLength = 128, |
| 49 kMaxCertificateLength = 16 * 1024, | 51 kMaxCertificateLength = 16 * 1024, |
| 50 kMaxSessionIdLength = 512, | 52 kMaxSessionIdLength = 512, |
| 51 kMinKeyIdLength = 1, | 53 kMinKeyIdLength = 1, |
| 52 kMaxKeyIdLength = 512, | 54 kMaxKeyIdLength = 512, |
| 53 kMaxKeyIds = 128, | 55 kMaxKeyIds = 128, |
| 54 kMaxInitDataLength = 64 * 1024, // 64 KB | 56 kMaxInitDataLength = 64 * 1024, // 64 KB |
| 55 kMaxSessionResponseLength = 64 * 1024, // 64 KB | 57 kMaxSessionResponseLength = 64 * 1024, // 64 KB |
| 56 kMaxKeySystemLength = 256, | 58 kMaxKeySystemLength = 256, |
| 59 |
| 60 // Minimum and maximum buffer sizes for certain audio platforms. |
| 61 #if defined(OS_MACOSX) |
| 62 kMinAudioBufferSize = 128, |
| 63 kMaxAudioBufferSize = 4096, |
| 64 #elif defined(USE_PULSEAUDIO) |
| 65 kMinAudioBufferSize = 512, |
| 66 kMaxAudioBufferSize = 8192, |
| 67 #elif defined(USE_CRAS) |
| 68 kMinAudioBufferSize = 256, |
| 69 kMaxAudioBufferSize = 8192, |
| 70 #endif |
| 57 }; | 71 }; |
| 58 | 72 |
| 59 } // namespace limits | 73 } // namespace limits |
| 60 | 74 |
| 61 } // namespace media | 75 } // namespace media |
| 62 | 76 |
| 63 #endif // MEDIA_BASE_LIMITS_H_ | 77 #endif // MEDIA_BASE_LIMITS_H_ |
| OLD | NEW |