Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Side by Side Diff: media/mp4/aac.h

Issue 10886022: Fix encrypted AAC in BMFF by adding subsample info. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use constant in ConvertEsdsToADTS Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | media/mp4/aac.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef MEDIA_MP4_AAC_H_ 5 #ifndef MEDIA_MP4_AAC_H_
6 #define MEDIA_MP4_AAC_H_ 6 #define MEDIA_MP4_AAC_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 28 matching lines...) Expand all
39 // AudioDecoderConfig. 39 // AudioDecoderConfig.
40 int GetOutputSamplesPerSecond(bool sbr_in_mimetype) const; 40 int GetOutputSamplesPerSecond(bool sbr_in_mimetype) const;
41 ChannelLayout channel_layout() const; 41 ChannelLayout channel_layout() const;
42 42
43 // This function converts a raw AAC frame into an AAC frame with an ADTS 43 // This function converts a raw AAC frame into an AAC frame with an ADTS
44 // header. On success, the function returns true and stores the converted data 44 // header. On success, the function returns true and stores the converted data
45 // in the buffer. The function returns false on failure and leaves the buffer 45 // in the buffer. The function returns false on failure and leaves the buffer
46 // unchanged. 46 // unchanged.
47 bool ConvertEsdsToADTS(std::vector<uint8>* buffer) const; 47 bool ConvertEsdsToADTS(std::vector<uint8>* buffer) const;
48 48
49 // Size in bytes of the ADTS header added by ConvertEsdsToADTS().
50 static const size_t kADTSHeaderSize = 7;
51
49 private: 52 private:
50 bool SkipDecoderGASpecificConfig(BitReader* bit_reader) const; 53 bool SkipDecoderGASpecificConfig(BitReader* bit_reader) const;
51 bool SkipErrorSpecificConfig() const; 54 bool SkipErrorSpecificConfig() const;
52 bool SkipGASpecificConfig(BitReader* bit_reader) const; 55 bool SkipGASpecificConfig(BitReader* bit_reader) const;
53 56
54 // The following variables store the AAC specific configuration information 57 // The following variables store the AAC specific configuration information
55 // that are used to generate the ADTS header. 58 // that are used to generate the ADTS header.
56 uint8 profile_; 59 uint8 profile_;
57 uint8 frequency_index_; 60 uint8 frequency_index_;
58 uint8 channel_config_; 61 uint8 channel_config_;
59 62
60 // The following variables store audio configuration information that 63 // The following variables store audio configuration information that
61 // can be used by Chromium. They are based on the AAC specific 64 // can be used by Chromium. They are based on the AAC specific
62 // configuration but can be overridden by extensions in elementary 65 // configuration but can be overridden by extensions in elementary
63 // stream descriptor. 66 // stream descriptor.
64 int frequency_; 67 int frequency_;
65 int extension_frequency_; 68 int extension_frequency_;
66 ChannelLayout channel_layout_; 69 ChannelLayout channel_layout_;
67 }; 70 };
68 71
69 } // namespace mp4 72 } // namespace mp4
70 73
71 } // namespace media 74 } // namespace media
72 75
73 #endif // MEDIA_MP4_AAC_H_ 76 #endif // MEDIA_MP4_AAC_H_
OLDNEW
« no previous file with comments | « no previous file | media/mp4/aac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698