| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 | 11 |
| 12 namespace media { | 12 namespace media { |
| 13 | 13 |
| 14 struct Limits { | 14 struct Limits { |
| 15 // For video. | 15 // For video. |
| 16 static const size_t kMaxDimension = (1 << 15) - 1; // 32767 | 16 static const size_t kMaxDimension = (1 << 15) - 1; // 32767 |
| 17 static const size_t kMaxCanvas = (1 << (14 * 2)); // 16384 x 16384 | 17 static const size_t kMaxCanvas = (1 << (14 * 2)); // 16384 x 16384 |
| 18 | 18 |
| 19 // Total number of video frames which are populating in the pipeline. | 19 // Total number of video frames which are populating in the pipeline. |
| 20 static const size_t kMaxVideoFrames = 4; | 20 static const size_t kMaxVideoFrames = 4; |
| 21 | 21 |
| 22 // Following limits are used by AudioParameters::IsValid(). | 22 // Following limits are used by AudioParameters::IsValid(). |
| 23 // The 192 Khz constant is the frequency of quicktime lossless audio codec. | 23 // The 192 Khz constant is the frequency of quicktime lossless audio codec. |
| 24 // MP4 is limited to 96 Khz, and mp3 is limited to 48 Khz. | 24 // MP4 is limited to 96 Khz, and mp3 is limited to 48 Khz. |
| 25 // OGG vorbis was initially limited to 96 Khz, but recent tools are unlimited. | 25 // OGG vorbis was initially limited to 96 Khz, but recent tools are unlimited. |
| 26 // 192 Khz is also the limit on most PC audio hardware. | 26 // 192 Khz is also the limit on most PC audio hardware. |
| 27 static const int kMaxSampleRate = 192000; | 27 static const int kMaxSampleRate = 192000; |
| 28 static const int kMaxChannels = 32; | 28 static const int kMaxChannels = 32; |
| 29 static const int kMaxBitsPerSample = 64; | 29 static const int kMaxBitsPerSample = 64; |
| 30 static const int kMaxSamplesPerPacket = kMaxSampleRate; |
| 30 | 31 |
| 31 // Maximum possible time. | 32 // Maximum possible time. |
| 32 static const int64 kMaxTimeInMicroseconds = kint64max; | 33 static const int64 kMaxTimeInMicroseconds = kint64max; |
| 33 }; | 34 }; |
| 34 | 35 |
| 35 } // namespace media | 36 } // namespace media |
| 36 | 37 |
| 37 #endif // MEDIA_BASE_LIMITS_H_ | 38 #endif // MEDIA_BASE_LIMITS_H_ |
| OLD | NEW |