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 per audio platform. | |
61 #if defined(OS_MACOSX) | |
62 kMinimumInputOutputBufferSize = 128, | |
o1ka
2017/06/09 10:52:39
To keep it simple, maybe just name them kMinAudioB
Andrew MacPherson
2017/06/12 11:23:33
Done.
| |
63 kMaximumInputOutputBufferSize = 4096, | |
64 kMinimumOutputBufferSize = kMinimumInputOutputBufferSize, | |
65 kMaximumOutputBufferSize = kMaximumInputOutputBufferSize, | |
66 #elif defined(USE_PULSEAUDIO) | |
67 kMinimumOutputBufferSize = 512, | |
68 kMaximumOutputBufferSize = 8192, | |
69 #elif defined(USE_CRAS) | |
70 kMinimumOutputBufferSize = 512, | |
o1ka
2017/06/09 10:52:39
This is a bit confusing, see
AudioManagerCras::Get
Andrew MacPherson
2017/06/12 11:23:33
Done, I've dropped the minimum to 256 now. Maybe G
| |
71 kMaximumOutputBufferSize = 8192, | |
72 #elif defined(OS_WIN) | |
73 // TODO(andrew.macpherson): I can't see any maximum buffer size specified for | |
74 // either Android or Windows, so I'm not sure if this should be INT_MAX or | |
75 // something else. Specifying 4096 so that there is no behaviour change since | |
76 // we had hardcoded 4096 as the maximum previously. | |
77 kMaximumOutputBufferSize = 4096, | |
78 #elif defined(OS_ANDROID) | |
79 kMaximumOutputBufferSize = 4096, | |
80 #endif | |
57 }; | 81 }; |
58 | 82 |
59 } // namespace limits | 83 } // namespace limits |
60 | 84 |
61 } // namespace media | 85 } // namespace media |
62 | 86 |
63 #endif // MEDIA_BASE_LIMITS_H_ | 87 #endif // MEDIA_BASE_LIMITS_H_ |
OLD | NEW |