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

Side by Side Diff: media/mp4/es_descriptor.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/es_descriptor.h" 5 #include "media/mp4/es_descriptor.h"
6 6
7 #include "media/base/bit_reader.h" 7 #include "media/base/bit_reader.h"
8 #include "media/mp4/rcheck.h" 8 #include "media/mp4/rcheck.h"
9 9
10 // The elementary stream size is specific by up to 4 bytes. 10 // The elementary stream size is specific by up to 4 bytes.
(...skipping 13 matching lines...) Expand all
24 break; 24 break;
25 } 25 }
26 26
27 return true; 27 return true;
28 } 28 }
29 29
30 namespace media { 30 namespace media {
31 31
32 namespace mp4 { 32 namespace mp4 {
33 33
34 // static
35 bool ESDescriptor::IsAAC(uint8 object_type) {
36 return object_type == kISO_14496_3 || object_type == kISO_13818_7_AAC_LC;
37 }
38
34 ESDescriptor::ESDescriptor() 39 ESDescriptor::ESDescriptor()
35 : object_type_(kForbidden) { 40 : object_type_(kForbidden) {
36 } 41 }
37 42
38 ESDescriptor::~ESDescriptor() {} 43 ESDescriptor::~ESDescriptor() {}
39 44
40 bool ESDescriptor::Parse(const std::vector<uint8>& data) { 45 bool ESDescriptor::Parse(const std::vector<uint8>& data) {
41 BitReader reader(&data[0], data.size()); 46 BitReader reader(&data[0], data.size());
42 uint8 tag; 47 uint8 tag;
43 uint32 size; 48 uint32 size;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 decoder_specific_info_.resize(size); 108 decoder_specific_info_.resize(size);
104 for (uint32 i = 0; i < size; ++i) 109 for (uint32 i = 0; i < size; ++i)
105 RCHECK(reader->ReadBits(8, &decoder_specific_info_[i])); 110 RCHECK(reader->ReadBits(8, &decoder_specific_info_[i]));
106 111
107 return true; 112 return true;
108 } 113 }
109 114
110 } // namespace mp4 115 } // namespace mp4
111 116
112 } // namespace media 117 } // namespace media
OLDNEW
« no previous file with comments | « media/mp4/es_descriptor.h ('k') | media/mp4/fourccs.h » ('j') | media/mp4/mp4_stream_parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698