| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 MEDIA_LOG(ERROR, media_log) | 142 MEDIA_LOG(ERROR, media_log) |
| 143 << "Channel Configuration(" << static_cast<int>(channel_config_) | 143 << "Channel Configuration(" << static_cast<int>(channel_config_) |
| 144 << ") is not supported. Please see ISO 14496-3:2009 Table 1.19 " | 144 << ") is not supported. Please see ISO 14496-3:2009 Table 1.19 " |
| 145 << "for supported Channel Configurations."; | 145 << "for supported Channel Configurations."; |
| 146 return false; | 146 return false; |
| 147 } | 147 } |
| 148 channel_layout_ = kADTSChannelLayoutTable[channel_config_]; | 148 channel_layout_ = kADTSChannelLayoutTable[channel_config_]; |
| 149 } | 149 } |
| 150 DCHECK(channel_layout_ != CHANNEL_LAYOUT_NONE); | 150 DCHECK(channel_layout_ != CHANNEL_LAYOUT_NONE); |
| 151 | 151 |
| 152 MEDIA_LOG(INFO, media_log) | |
| 153 << "Audio codec: mp4a.40." << static_cast<int>(profile_) | |
| 154 << ". Sampling frequency: " << frequency_ << "Hz" | |
| 155 << ". Sampling frequency(Extension): " << extension_frequency_ << "Hz" | |
| 156 << ". Channel layout: " << channel_layout_ << "."; | |
| 157 | |
| 158 return true; | 152 return true; |
| 159 } | 153 } |
| 160 | 154 |
| 161 int AAC::GetOutputSamplesPerSecond(bool sbr_in_mimetype) const { | 155 int AAC::GetOutputSamplesPerSecond(bool sbr_in_mimetype) const { |
| 162 if (extension_frequency_ > 0) | 156 if (extension_frequency_ > 0) |
| 163 return extension_frequency_; | 157 return extension_frequency_; |
| 164 | 158 |
| 165 if (!sbr_in_mimetype) | 159 if (!sbr_in_mimetype) |
| 166 return frequency_; | 160 return frequency_; |
| 167 | 161 |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 | 256 |
| 263 RCHECK(bit_reader->ReadBits(1, &dummy)); // extensionFlag3 | 257 RCHECK(bit_reader->ReadBits(1, &dummy)); // extensionFlag3 |
| 264 } | 258 } |
| 265 | 259 |
| 266 return true; | 260 return true; |
| 267 } | 261 } |
| 268 | 262 |
| 269 } // namespace mp4 | 263 } // namespace mp4 |
| 270 | 264 |
| 271 } // namespace media | 265 } // namespace media |
| OLD | NEW |