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/mpeg/mpeg1_audio_stream_parser.h" | 5 #include "media/formats/mpeg/mpeg1_audio_stream_parser.h" |
6 | 6 |
| 7 #include "media/base/media_log.h" |
| 8 |
7 namespace media { | 9 namespace media { |
8 | 10 |
9 static const uint32_t kMPEG1StartCodeMask = 0xffe00000; | 11 static const uint32_t kMPEG1StartCodeMask = 0xffe00000; |
10 | 12 |
11 // Map that determines which bitrate_index & channel_mode combinations | 13 // Map that determines which bitrate_index & channel_mode combinations |
12 // are allowed. | 14 // are allowed. |
13 // Derived from: http://mpgedit.org/mpgedit/mpeg_format/MP3Format.html | 15 // Derived from: http://mpgedit.org/mpgedit/mpeg_format/MP3Format.html |
14 static const bool kIsAllowed[17][4] = { | 16 static const bool kIsAllowed[17][4] = { |
15 { true, true, true, true }, // free | 17 { true, true, true, true }, // free |
16 { true, false, false, false }, // 32 | 18 { true, false, false, false }, // 32 |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 if (metadata_frame) | 281 if (metadata_frame) |
280 *metadata_frame = true; | 282 *metadata_frame = true; |
281 return header_bytes_read + reader.bits_read() / 8; | 283 return header_bytes_read + reader.bits_read() / 8; |
282 } | 284 } |
283 | 285 |
284 // If it wasn't a XING frame, just return the number consumed bytes. | 286 // If it wasn't a XING frame, just return the number consumed bytes. |
285 return header_bytes_read; | 287 return header_bytes_read; |
286 } | 288 } |
287 | 289 |
288 } // namespace media | 290 } // namespace media |
OLD | NEW |