Chromium Code Reviews| Index: media/base/limits.h |
| diff --git a/media/base/limits.h b/media/base/limits.h |
| index 93522d2baa28c165d7227baf83758644c30e0b93..1e8156dc49b564e1d055b4fa367c8800237411d0 100644 |
| --- a/media/base/limits.h |
| +++ b/media/base/limits.h |
| @@ -11,28 +11,34 @@ |
| namespace media { |
| -struct Limits { |
| - // For video. |
| - static const int kMaxDimension = (1 << 15) - 1; // 32767 |
| - static const int kMaxCanvas = (1 << (14 * 2)); // 16384 x 16384 |
| - |
| - // Total number of video frames which are populating in the pipeline. |
| - static const size_t kMaxVideoFrames = 4; |
| - |
| - // Following limits are used by AudioParameters::IsValid(). |
| - // The 192 Khz constant is the frequency of quicktime lossless audio codec. |
| - // MP4 is limited to 96 Khz, and mp3 is limited to 48 Khz. |
| - // OGG vorbis was initially limited to 96 Khz, but recent tools are unlimited. |
| - // 192 Khz is also the limit on most PC audio hardware. |
| - static const int kMaxSampleRate = 192000; |
| - static const int kMinSampleRate = 8000; |
| - static const int kMaxChannels = 32; |
| - static const int kMaxBitsPerSample = 64; |
| - static const int kMaxSamplesPerPacket = kMaxSampleRate; |
| - |
| - // Maximum possible time. |
| - static const int64 kMaxTimeInMicroseconds = kint64max; |
| -}; |
| +namespace limits { |
| + |
| +// Maximum possible dimension (width or height) for any video. |
| +static const int kMaxDimension = (1 << 15) - 1; // 32767 |
|
Ami GONE FROM CHROMIUM
2011/12/03 02:11:38
Drop the statics everywhere in this file.
Right no
scherkus (not reviewing)
2011/12/06 02:05:57
Done.
|
| + |
| +// Maximum possible canvas size (width multiplied by height) for any video. |
| +static const int kMaxCanvas = (1 << (14 * 2)); // 16384 x 16384 |
| + |
| +// Total number of video frames which are populating in the pipeline. |
| +static const size_t kMaxVideoFrames = 4; |
| + |
| +// Following limits are used by AudioParameters::IsValid(). |
|
Ami GONE FROM CHROMIUM
2011/12/03 02:11:38
s/Following/The following/
scherkus (not reviewing)
2011/12/06 02:05:57
Done.
Ami GONE FROM CHROMIUM
2011/12/07 01:04:48
Nope.
|
| +// |
| +// A few notes on samples rates of common formats: |
|
Ami GONE FROM CHROMIUM
2011/12/03 02:11:38
s/samples/sample/
|
| +// - AAC files are limited to 96 Khz. |
|
Ami GONE FROM CHROMIUM
2011/12/03 02:11:38
s/Khz/kHz/ here and below.
scherkus (not reviewing)
2011/12/06 02:05:57
Done.
|
| +// - MP3 files are limited to 48 Khz. |
| +// - Vorbis used to be limited to 96 KHz, but no longer has that restriction. |
| +// - Most PC audio hardware is limited to 192 KHz. |
| +static const int kMaxSampleRate = 192000; |
| +static const int kMinSampleRate = 8000; |
| +static const int kMaxChannels = 32; |
| +static const int kMaxBitsPerSample = 64; |
| +static const int kMaxSamplesPerPacket = kMaxSampleRate; |
| + |
| +// Maximum possible time. |
| +static const int64 kMaxTimeInMicroseconds = kint64max; |
|
Ami GONE FROM CHROMIUM
2011/12/03 02:11:38
This should die. See my specific comments at call
scherkus (not reviewing)
2011/12/06 02:05:57
Done.
|
| + |
| +} // namespace limits |
| } // namespace media |