| OLD | NEW |
| 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 #include "media/mp4/aac.h" | 5 #include "media/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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 | 46 |
| 47 AAC::AAC() | 47 AAC::AAC() |
| 48 : profile_(0), frequency_index_(0), channel_config_(0), frequency_(0), | 48 : profile_(0), frequency_index_(0), channel_config_(0), frequency_(0), |
| 49 extension_frequency_(0), channel_layout_(CHANNEL_LAYOUT_UNSUPPORTED) { | 49 extension_frequency_(0), channel_layout_(CHANNEL_LAYOUT_UNSUPPORTED) { |
| 50 } | 50 } |
| 51 | 51 |
| 52 AAC::~AAC() { | 52 AAC::~AAC() { |
| 53 } | 53 } |
| 54 | 54 |
| 55 bool AAC::Parse(const std::vector<uint8>& data) { | 55 bool AAC::Parse(const std::vector<uint8>& data) { |
| 56 #if defined(OS_ANDROID) |
| 57 codec_specific_data_ = data; |
| 58 #endif |
| 56 if (data.empty()) | 59 if (data.empty()) |
| 57 return false; | 60 return false; |
| 58 | 61 |
| 59 BitReader reader(&data[0], data.size()); | 62 BitReader reader(&data[0], data.size()); |
| 60 uint8 extension_type = 0; | 63 uint8 extension_type = 0; |
| 61 bool ps_present = false; | 64 bool ps_present = false; |
| 62 uint8 extension_frequency_index = 0xff; | 65 uint8 extension_frequency_index = 0xff; |
| 63 | 66 |
| 64 frequency_ = 0; | 67 frequency_ = 0; |
| 65 extension_frequency_ = 0; | 68 extension_frequency_ = 0; |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 | 266 |
| 264 RCHECK(bit_reader->ReadBits(1, &dummy)); // extensionFlag3 | 267 RCHECK(bit_reader->ReadBits(1, &dummy)); // extensionFlag3 |
| 265 } | 268 } |
| 266 | 269 |
| 267 return true; | 270 return true; |
| 268 } | 271 } |
| 269 | 272 |
| 270 } // namespace mp4 | 273 } // namespace mp4 |
| 271 | 274 |
| 272 } // namespace media | 275 } // namespace media |
| OLD | NEW |