| OLD | NEW |
| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 class MEDIA_EXPORT AAC { | 27 class MEDIA_EXPORT AAC { |
| 28 public: | 28 public: |
| 29 AAC(); | 29 AAC(); |
| 30 AAC(const AAC& other); | 30 AAC(const AAC& other); |
| 31 ~AAC(); | 31 ~AAC(); |
| 32 | 32 |
| 33 // Parse the AAC config from the raw binary data embedded in esds box. | 33 // Parse the AAC config from the raw binary data embedded in esds box. |
| 34 // The function will parse the data and get the ElementaryStreamDescriptor, | 34 // The function will parse the data and get the ElementaryStreamDescriptor, |
| 35 // then it will parse the ElementaryStreamDescriptor to get audio stream | 35 // then it will parse the ElementaryStreamDescriptor to get audio stream |
| 36 // configurations. | 36 // configurations. |
| 37 bool Parse(const std::vector<uint8_t>& data, | 37 bool Parse(const std::vector<uint8_t>& data, MediaLog* media_log); |
| 38 const scoped_refptr<MediaLog>& media_log); | |
| 39 | 38 |
| 40 // Gets the output sample rate for the AAC stream. | 39 // Gets the output sample rate for the AAC stream. |
| 41 // |sbr_in_mimetype| should be set to true if the SBR mode is | 40 // |sbr_in_mimetype| should be set to true if the SBR mode is |
| 42 // signalled in the mimetype. (ie mp4a.40.5 in the codecs parameter). | 41 // signalled in the mimetype. (ie mp4a.40.5 in the codecs parameter). |
| 43 // Returns the samples_per_second value that should used in an | 42 // Returns the samples_per_second value that should used in an |
| 44 // AudioDecoderConfig. | 43 // AudioDecoderConfig. |
| 45 int GetOutputSamplesPerSecond(bool sbr_in_mimetype) const; | 44 int GetOutputSamplesPerSecond(bool sbr_in_mimetype) const; |
| 46 | 45 |
| 47 // Gets the channel layout for the AAC stream. | 46 // Gets the channel layout for the AAC stream. |
| 48 // |sbr_in_mimetype| should be set to true if the SBR mode is | 47 // |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 Loading... |
| 87 int frequency_; | 86 int frequency_; |
| 88 int extension_frequency_; | 87 int extension_frequency_; |
| 89 ChannelLayout channel_layout_; | 88 ChannelLayout channel_layout_; |
| 90 }; | 89 }; |
| 91 | 90 |
| 92 } // namespace mp4 | 91 } // namespace mp4 |
| 93 | 92 |
| 94 } // namespace media | 93 } // namespace media |
| 95 | 94 |
| 96 #endif // MEDIA_FORMATS_MP4_AAC_H_ | 95 #endif // MEDIA_FORMATS_MP4_AAC_H_ |
| OLD | NEW |