diff options
author | cpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-06 23:20:04 +0000 |
---|---|---|
committer | cpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-06 23:20:04 +0000 |
commit | 81dc72e8975fc6f005b0f99707a45edf8b9eb5ce (patch) | |
tree | 17063b7bc5c85c9eed8fc638807911b73f5b6af9 /media/mp4/aac.h | |
parent | bdf9c2c9f6c66ffc202eaad8738157a16e3409ad (diff) | |
download | chromium_src-81dc72e8975fc6f005b0f99707a45edf8b9eb5ce.zip chromium_src-81dc72e8975fc6f005b0f99707a45edf8b9eb5ce.tar.gz chromium_src-81dc72e8975fc6f005b0f99707a45edf8b9eb5ce.tar.bz2 |
Revert 145617 - Add HE AAC support to ISO BMFF.
1. Parse esds box to get HE AAC config.
2. Send audio config from AAC header to decoder instead of the one embedded in SampleDescription.
3. Convert raw audio data into ADTS before sending to decoder.
4. Abstract general bit stream code from H264BitReader into media::BitReader.
BUG=134445
TEST=BitReaderTest, AACTest
Review URL: https://chromiumcodereview.appspot.com/10710002
TBR=xiaomings@google.com
Review URL: https://chromiumcodereview.appspot.com/10693115
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145621 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/mp4/aac.h')
-rw-r--r-- | media/mp4/aac.h | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/media/mp4/aac.h b/media/mp4/aac.h deleted file mode 100644 index 7a2a3f8..0000000 --- a/media/mp4/aac.h +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) 2012 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. - -#ifndef MEDIA_MP4_AAC_H_ -#define MEDIA_MP4_AAC_H_ - -#include <vector> - -#include "base/basictypes.h" -#include "media/base/channel_layout.h" -#include "media/base/media_export.h" - -namespace media { - -class BitReader; - -namespace mp4 { - -// This class parses the AAC information from decoder specific information -// embedded in the esds box in an ISO BMFF file. -// Please refer to ISO 14496 Part 3 Table 1.13 - Syntax of AudioSpecificConfig -// for more details. -class MEDIA_EXPORT AAC { - public: - AAC(); - ~AAC(); - - // Parse the AAC config from the raw binary data embedded in esds box. - // The function will parse the data and get the ElementaryStreamDescriptor, - // then it will parse the ElementaryStreamDescriptor to get audio stream - // configurations. - bool Parse(const std::vector<uint8>& data); - - uint32 frequency() const; - ChannelLayout channel_layout() const; - - // This function converts a raw AAC frame into an AAC frame with an ADTS - // header. On success, the function returns true and stores the converted data - // in the buffer. The function returns false on failure and leaves the buffer - // unchanged. - bool ConvertEsdsToADTS(std::vector<uint8>* buffer) const; - - private: - bool SkipDecoderGASpecificConfig(BitReader* bit_reader) const; - bool SkipErrorSpecificConfig() const; - bool SkipGASpecificConfig(BitReader* bit_reader) const; - - // The following variables store the AAC specific configuration information - // that are used to generate the ADTS header. - uint8 profile_; - uint8 frequency_index_; - uint8 channel_config_; - - // The following variables store audio configuration information that - // can be used by Chromium. They are based on the AAC specific - // configuration but can be overridden by extensions in elementary - // stream descriptor. - uint32 frequency_; - ChannelLayout channel_layout_; -}; - -} // namespace mp4 - -} // namespace media - -#endif // MEDIA_MP4_AAC_H_ |