2014-04-07 17:27:07 +00:00
|
|
|
// Copyright 2014 The Chromium Authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
2014-10-01 22:10:21 +00:00
|
|
|
#include "packager/media/formats/mpeg/adts_constants.h"
|
2014-04-07 17:27:07 +00:00
|
|
|
|
2014-10-01 22:10:21 +00:00
|
|
|
#include "packager/base/macros.h"
|
2014-04-07 17:27:07 +00:00
|
|
|
|
2016-05-20 21:19:33 +00:00
|
|
|
namespace shaka {
|
2014-04-07 17:27:07 +00:00
|
|
|
namespace media {
|
|
|
|
|
|
|
|
// The following conversion table is extracted from ISO 14496 Part 3 -
|
|
|
|
// Table 1.16 - Sampling Frequency Index.
|
2014-04-10 19:57:10 +00:00
|
|
|
const int kAdtsFrequencyTable[] = {96000, 88200, 64000, 48000, 44100,
|
2014-04-07 17:27:07 +00:00
|
|
|
32000, 24000, 22050, 16000, 12000,
|
|
|
|
11025, 8000, 7350};
|
2014-04-10 19:57:10 +00:00
|
|
|
const size_t kAdtsFrequencyTableSize = arraysize(kAdtsFrequencyTable);
|
2014-04-07 17:27:07 +00:00
|
|
|
|
|
|
|
// The following conversion table is extracted from ISO 14496 Part 3 -
|
|
|
|
// Table 1.17 - Channel Configuration.
|
2014-04-10 19:57:10 +00:00
|
|
|
const int kAdtsNumChannelsTable[] = {
|
2014-04-07 17:48:25 +00:00
|
|
|
0, 1, 2, 2, 4, 5, 6, 8 };
|
2014-04-10 19:57:10 +00:00
|
|
|
const size_t kAdtsNumChannelsTableSize = arraysize(kAdtsNumChannelsTable);
|
2014-04-07 17:27:07 +00:00
|
|
|
|
|
|
|
} // namespace media
|
2016-05-20 21:19:33 +00:00
|
|
|
} // namespace shaka
|