Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(388)

Side by Side Diff: media/formats/mpeg/mpeg1_audio_stream_parser.cc

Issue 1861963008: Use StreamParser::TrackId instead of string for MediaTrack::byteStreamTrackId (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Include <algorithm> into stream_parser_buffer.cc Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW
« no previous file with comments | « media/formats/mpeg/adts_stream_parser.cc ('k') | media/formats/mpeg/mpeg_audio_stream_parser_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698