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

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

Issue 276503002: Log codec IDs for MediaSource content. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_FORMATS_MP4_AAC_H_ 5 #ifndef MEDIA_FORMATS_MP4_AAC_H_
6 #define MEDIA_FORMATS_MP4_AAC_H_ 6 #define MEDIA_FORMATS_MP4_AAC_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "media/base/channel_layout.h" 11 #include "media/base/channel_layout.h"
12 #include "media/base/media_export.h" 12 #include "media/base/media_export.h"
13 #include "media/base/media_log.h"
13 14
14 namespace media { 15 namespace media {
15 16
16 class BitReader; 17 class BitReader;
17 18
18 namespace mp4 { 19 namespace mp4 {
19 20
20 // This class parses the AAC information from decoder specific information 21 // This class parses the AAC information from decoder specific information
21 // embedded in the esds box in an ISO BMFF file. 22 // embedded in the esds box in an ISO BMFF file.
22 // Please refer to ISO 14496 Part 3 Table 1.13 - Syntax of AudioSpecificConfig 23 // Please refer to ISO 14496 Part 3 Table 1.13 - Syntax of AudioSpecificConfig
23 // for more details. 24 // for more details.
24 class MEDIA_EXPORT AAC { 25 class MEDIA_EXPORT AAC {
25 public: 26 public:
26 AAC(); 27 AAC();
27 ~AAC(); 28 ~AAC();
28 29
29 // Parse the AAC config from the raw binary data embedded in esds box. 30 // Parse the AAC config from the raw binary data embedded in esds box.
30 // The function will parse the data and get the ElementaryStreamDescriptor, 31 // The function will parse the data and get the ElementaryStreamDescriptor,
31 // then it will parse the ElementaryStreamDescriptor to get audio stream 32 // then it will parse the ElementaryStreamDescriptor to get audio stream
32 // configurations. 33 // configurations.
33 bool Parse(const std::vector<uint8>& data); 34 bool Parse(const std::vector<uint8>& data, const LogCB& log_cb);
34 35
35 // Gets the output sample rate for the AAC stream. 36 // Gets the output sample rate for the AAC stream.
36 // |sbr_in_mimetype| should be set to true if the SBR mode is 37 // |sbr_in_mimetype| should be set to true if the SBR mode is
37 // signalled in the mimetype. (ie mp4a.40.5 in the codecs parameter). 38 // signalled in the mimetype. (ie mp4a.40.5 in the codecs parameter).
38 // Returns the samples_per_second value that should used in an 39 // Returns the samples_per_second value that should used in an
39 // AudioDecoderConfig. 40 // AudioDecoderConfig.
40 int GetOutputSamplesPerSecond(bool sbr_in_mimetype) const; 41 int GetOutputSamplesPerSecond(bool sbr_in_mimetype) const;
41 42
42 // Gets the channel layout for the AAC stream. 43 // Gets the channel layout for the AAC stream.
43 // |sbr_in_mimetype| should be set to true if the SBR mode is 44 // |sbr_in_mimetype| should be set to true if the SBR mode is
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 int frequency_; 83 int frequency_;
83 int extension_frequency_; 84 int extension_frequency_;
84 ChannelLayout channel_layout_; 85 ChannelLayout channel_layout_;
85 }; 86 };
86 87
87 } // namespace mp4 88 } // namespace mp4
88 89
89 } // namespace media 90 } // namespace media
90 91
91 #endif // MEDIA_FORMATS_MP4_AAC_H_ 92 #endif // MEDIA_FORMATS_MP4_AAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698