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 importScripts('function_sequence.js'); | 5 importScripts('function_sequence.js'); |
6 importScripts('function_parallel.js'); | 6 importScripts('function_parallel.js'); |
7 | 7 |
8 function Id3Parser(parent) { | 8 function Id3Parser(parent) { |
9 MetadataParser.call(this, parent, 'id3', /\.(mp3)$/i); | 9 MetadataParser.call(this, parent, 'id3', /\.(mp3)$/i); |
10 } | 10 } |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 } else { | 169 } else { |
170 frame.imageUrl = reader.readImage(end - reader.tell()); | 170 frame.imageUrl = reader.readImage(end - reader.tell()); |
171 } | 171 } |
172 }; | 172 }; |
173 | 173 |
174 /** | 174 /** |
175 * Reads string from reader with specified encoding | 175 * Reads string from reader with specified encoding |
176 * | 176 * |
177 * @private | 177 * @private |
178 * @param {ByteReader} reader reader to use. | 178 * @param {ByteReader} reader reader to use. |
179 * @param {number} majorVersion //TODO(JSDOC). | |
180 * @return {Object} frame read. | 179 * @return {Object} frame read. |
181 */ | 180 */ |
182 Id3Parser.prototype.readFrame_ = function(reader, majorVersion) { | 181 Id3Parser.prototype.readFrame_ = function(reader, majorVersion) { |
183 if (reader.eof()) | 182 if (reader.eof()) |
184 return null; | 183 return null; |
185 | 184 |
186 var frame = {}; | 185 var frame = {}; |
187 | 186 |
188 reader.pushSeek(reader.tell(), ByteReader.SEEK_BEG); | 187 reader.pushSeek(reader.tell(), ByteReader.SEEK_BEG); |
189 | 188 |
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
697 TYER: 'ID3_YEAR', | 696 TYER: 'ID3_YEAR', |
698 WCOP: 'ID3_COPYRIGHT', | 697 WCOP: 'ID3_COPYRIGHT', |
699 WOAF: 'ID3_OFFICIAL_AUDIO_FILE_WEBPAGE', | 698 WOAF: 'ID3_OFFICIAL_AUDIO_FILE_WEBPAGE', |
700 WOAR: 'ID3_OFFICIAL_ARTIST', | 699 WOAR: 'ID3_OFFICIAL_ARTIST', |
701 WOAS: 'ID3_OFFICIAL_AUDIO_SOURCE_WEBPAGE', | 700 WOAS: 'ID3_OFFICIAL_AUDIO_SOURCE_WEBPAGE', |
702 WPUB: 'ID3_PUBLISHERS_OFFICIAL_WEBPAGE' | 701 WPUB: 'ID3_PUBLISHERS_OFFICIAL_WEBPAGE' |
703 } | 702 } |
704 }; | 703 }; |
705 | 704 |
706 MetadataDispatcher.registerParserClass(Id3Parser); | 705 MetadataDispatcher.registerParserClass(Id3Parser); |
OLD | NEW |