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 #include "media/formats/mp4/aac.h" | 5 #include "media/formats/mp4/aac.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "media/base/bit_reader.h" | 10 #include "media/base/bit_reader.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 // Read extension configuration. | 51 // Read extension configuration. |
52 if (profile_ == 5 || profile_ == 29) { | 52 if (profile_ == 5 || profile_ == 29) { |
53 ps_present = (profile_ == 29); | 53 ps_present = (profile_ == 29); |
54 extension_type = 5; | 54 extension_type = 5; |
55 RCHECK(reader.ReadBits(4, &extension_frequency_index)); | 55 RCHECK(reader.ReadBits(4, &extension_frequency_index)); |
56 if (extension_frequency_index == 0xf) | 56 if (extension_frequency_index == 0xf) |
57 RCHECK(reader.ReadBits(24, &extension_frequency_)); | 57 RCHECK(reader.ReadBits(24, &extension_frequency_)); |
58 RCHECK(reader.ReadBits(5, &profile_)); | 58 RCHECK(reader.ReadBits(5, &profile_)); |
59 } | 59 } |
60 | 60 |
61 MEDIA_LOG(log_cb) << "Audio codec: mp4a.40." | 61 MEDIA_LOG(INFO, log_cb) << "Audio codec: mp4a.40." << std::hex |
62 << std::hex << static_cast<int>(profile_); | 62 << static_cast<int>(profile_); |
63 | 63 |
64 RCHECK(SkipDecoderGASpecificConfig(&reader)); | 64 RCHECK(SkipDecoderGASpecificConfig(&reader)); |
65 RCHECK(SkipErrorSpecificConfig()); | 65 RCHECK(SkipErrorSpecificConfig()); |
66 | 66 |
67 // Read extension configuration again | 67 // Read extension configuration again |
68 // Note: The check for 16 available bits comes from the AAC spec. | 68 // Note: The check for 16 available bits comes from the AAC spec. |
69 if (extension_type != 5 && reader.bits_available() >= 16) { | 69 if (extension_type != 5 && reader.bits_available() >= 16) { |
70 uint16 sync_extension_type; | 70 uint16 sync_extension_type; |
71 uint8 sbr_present_flag; | 71 uint8 sbr_present_flag; |
72 uint8 ps_present_flag; | 72 uint8 ps_present_flag; |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 | 241 |
242 RCHECK(bit_reader->ReadBits(1, &dummy)); // extensionFlag3 | 242 RCHECK(bit_reader->ReadBits(1, &dummy)); // extensionFlag3 |
243 } | 243 } |
244 | 244 |
245 return true; | 245 return true; |
246 } | 246 } |
247 | 247 |
248 } // namespace mp4 | 248 } // namespace mp4 |
249 | 249 |
250 } // namespace media | 250 } // namespace media |
OLD | NEW |