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 | |
12 namespace media { | 10 namespace media { |
13 | 11 |
14 namespace limits { | 12 namespace limits { |
15 | 13 |
16 enum { | 14 enum { |
17 // Maximum possible dimension (width or height) for any video. | 15 // Maximum possible dimension (width or height) for any video. |
18 kMaxDimension = (1 << 15) - 1, // 32767 | 16 kMaxDimension = (1 << 15) - 1, // 32767 |
19 | 17 |
20 // Maximum possible canvas size (width multiplied by height) for any video. | 18 // Maximum possible canvas size (width multiplied by height) for any video. |
21 kMaxCanvas = (1 << (14 * 2)), // 16384 x 16384 | 19 kMaxCanvas = (1 << (14 * 2)), // 16384 x 16384 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 // lengths are somewhat arbitrary as the EME spec doesn't specify any limits. | 51 // lengths are somewhat arbitrary as the EME spec doesn't specify any limits. |
54 kMinCertificateLength = 128, | 52 kMinCertificateLength = 128, |
55 kMaxCertificateLength = 16 * 1024, | 53 kMaxCertificateLength = 16 * 1024, |
56 kMaxSessionIdLength = 512, | 54 kMaxSessionIdLength = 512, |
57 kMinKeyIdLength = 1, | 55 kMinKeyIdLength = 1, |
58 kMaxKeyIdLength = 512, | 56 kMaxKeyIdLength = 512, |
59 kMaxKeyIds = 128, | 57 kMaxKeyIds = 128, |
60 kMaxInitDataLength = 64 * 1024, // 64 KB | 58 kMaxInitDataLength = 64 * 1024, // 64 KB |
61 kMaxSessionResponseLength = 64 * 1024, // 64 KB | 59 kMaxSessionResponseLength = 64 * 1024, // 64 KB |
62 kMaxKeySystemLength = 256, | 60 kMaxKeySystemLength = 256, |
63 | |
64 // Minimum and maximum buffer sizes for certain audio platforms. | |
65 #if defined(OS_MACOSX) | |
66 kMinAudioBufferSize = 128, | |
67 kMaxAudioBufferSize = 4096, | |
68 #elif defined(USE_PULSEAUDIO) | |
69 kMinAudioBufferSize = 512, | |
70 kMaxAudioBufferSize = 8192, | |
71 #elif defined(USE_CRAS) | |
72 // Though CRAS has different per-board defaults, allow explicitly requesting | |
73 // this buffer size on any board. | |
74 kMinAudioBufferSize = 256, | |
75 kMaxAudioBufferSize = 8192, | |
76 #endif | |
77 }; | 61 }; |
78 | 62 |
79 } // namespace limits | 63 } // namespace limits |
80 | 64 |
81 } // namespace media | 65 } // namespace media |
82 | 66 |
83 #endif // MEDIA_BASE_LIMITS_H_ | 67 #endif // MEDIA_BASE_LIMITS_H_ |
OLD | NEW |