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

Side by Side Diff: media/mp4/box_definitions.cc

Issue 14641006: Support EAC3 (Dolby Digital Plus) codec (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed Aaron's comments Created 7 years, 7 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 | Annotate | Revision Log
OLDNEW
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/box_definitions.h" 5 #include "media/mp4/box_definitions.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "media/mp4/es_descriptor.h" 8 #include "media/mp4/es_descriptor.h"
9 #include "media/mp4/rcheck.h" 9 #include "media/mp4/rcheck.h"
10 10
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 RCHECK(reader->ScanChildren()); 460 RCHECK(reader->ScanChildren());
461 if (format == FOURCC_ENCA) { 461 if (format == FOURCC_ENCA) {
462 // Continue scanning until a recognized protection scheme is found, or until 462 // Continue scanning until a recognized protection scheme is found, or until
463 // we run out of protection schemes. 463 // we run out of protection schemes.
464 while (sinf.type.type != FOURCC_CENC) { 464 while (sinf.type.type != FOURCC_CENC) {
465 if (!reader->ReadChild(&sinf)) 465 if (!reader->ReadChild(&sinf))
466 return false; 466 return false;
467 } 467 }
468 } 468 }
469 469
470 RCHECK(reader->ReadChild(&esds)); 470 // ESDS is not valid in case of EAC3.
471 RCHECK(reader->MaybeReadChild(&esds));
471 return true; 472 return true;
472 } 473 }
473 474
474 MediaHeader::MediaHeader() 475 MediaHeader::MediaHeader()
475 : creation_time(0), 476 : creation_time(0),
476 modification_time(0), 477 modification_time(0),
477 timescale(0), 478 timescale(0),
478 duration(0) {} 479 duration(0) {}
479 MediaHeader::~MediaHeader() {} 480 MediaHeader::~MediaHeader() {}
480 FourCC MediaHeader::BoxType() const { return FOURCC_MDHD; } 481 FourCC MediaHeader::BoxType() const { return FOURCC_MDHD; }
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 bool MovieFragment::Parse(BoxReader* reader) { 748 bool MovieFragment::Parse(BoxReader* reader) {
748 RCHECK(reader->ScanChildren() && 749 RCHECK(reader->ScanChildren() &&
749 reader->ReadChild(&header) && 750 reader->ReadChild(&header) &&
750 reader->ReadChildren(&tracks) && 751 reader->ReadChildren(&tracks) &&
751 reader->MaybeReadChildren(&pssh)); 752 reader->MaybeReadChildren(&pssh));
752 return true; 753 return true;
753 } 754 }
754 755
755 } // namespace mp4 756 } // namespace mp4
756 } // namespace media 757 } // namespace media
OLDNEW
« no previous file with comments | « media/media.gyp ('k') | media/mp4/es_descriptor.h » ('j') | media/mp4/mp4_stream_parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698