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

Side by Side Diff: chrome/browser/resources/file_manager/js/mpeg_parser.js

Issue 8394046: [filebrowser] More reliable file saving in Photo Editor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/resources/file_manager/js/metadata_parser.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 function MpegParser(parent) { 5 function MpegParser(parent) {
6 MetadataParser.apply(this, [parent]); 6 MetadataParser.call(this, parent, 'mpeg', /\.(mp4|m4v|m4a|mpe?g4?)$/i);
7 this.verbose = true;
8 } 7 }
9 8
10 MpegParser.parserType = 'mpeg';
11
12 MpegParser.prototype = {__proto__: MetadataParser.prototype}; 9 MpegParser.prototype = {__proto__: MetadataParser.prototype};
13 10
14 MpegParser.prototype.urlFilter = /\.(mp4|m4v|m4a|mpe?g4?)$/i;
15
16 MpegParser.HEADER_SIZE = 8; 11 MpegParser.HEADER_SIZE = 8;
17 12
18 MpegParser.readAtomSize = function(br, opt_end) { 13 MpegParser.readAtomSize = function(br, opt_end) {
19 var pos = br.tell(); 14 var pos = br.tell();
20 15
21 if (opt_end) { 16 if (opt_end) {
22 // Assert that opt_end <= buffer end. 17 // Assert that opt_end <= buffer end.
23 // When supplied, opt_end is the end of the enclosing atom and is used to 18 // When supplied, opt_end is the end of the enclosing atom and is used to
24 // check the correct nesting. 19 // check the correct nesting.
25 br.validateRead(opt_end - pos); 20 br.validateRead(opt_end - pos);
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 // The previous read did not return the next atom header, EOF reached. 250 // The previous read did not return the next atom header, EOF reached.
256 this.vlog("EOF @" + filePos); 251 this.vlog("EOF @" + filePos);
257 onSuccess(); 252 onSuccess();
258 } 253 }
259 } catch(e) { 254 } catch(e) {
260 return onError(e.toString()); 255 return onError(e.toString());
261 } 256 }
262 }; 257 };
263 258
264 MetadataDispatcher.registerParserClass(MpegParser); 259 MetadataDispatcher.registerParserClass(MpegParser);
OLDNEW
« no previous file with comments | « chrome/browser/resources/file_manager/js/metadata_parser.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698