Shaka Packager SDK
Loading...
Searching...
No Matches
limits.h
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
3// found in the LICENSE file.
4
5// Contains limit definition constants for the media subsystem.
6
7#ifndef PACKAGER_MEDIA_BASE_LIMITS_H_
8#define PACKAGER_MEDIA_BASE_LIMITS_H_
9
10namespace shaka {
11namespace media {
12
13namespace limits {
14
15enum {
16 // Maximum possible dimension (width or height) for any video.
17 kMaxDimension = (1 << 15) - 1, // 32767
18
19 // Maximum possible canvas size (width multiplied by height) for any video.
20 kMaxCanvas = (1 << (14 * 2)), // 16384 x 16384
21
22 // Total number of video frames which are populating in the pipeline.
23 kMaxVideoFrames = 4,
24
25 // The following limits are used by AudioParameters::IsValid().
26 //
27 // A few notes on sample rates of common formats:
28 // - AAC files are limited to 96 kHz.
29 // - MP3 files are limited to 48 kHz.
30 // - Vorbis used to be limited to 96 KHz, but no longer has that
31 // restriction.
32 // - Most PC audio hardware is limited to 192 KHz.
33 kMaxSampleRate = 192000,
34 kMinSampleRate = 3000,
35 kMaxChannels = 32,
36 kMaxBytesPerSample = 4,
37 kMaxBitsPerSample = kMaxBytesPerSample * 8,
38 kMaxSamplesPerPacket = kMaxSampleRate,
39 kMaxPacketSizeInBytes =
40 kMaxBytesPerSample * kMaxChannels * kMaxSamplesPerPacket,
41
42 // This limit is used by ParamTraits<VideoCaptureParams>.
43 kMaxFramesPerSecond = 1000,
44};
45
46} // namespace limits
47
48} // namespace media
49} // namespace shaka
50
51#endif // PACKAGER_MEDIA_BASE_LIMITS_H_
All the methods that are virtual are virtual for mocking.