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

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

Issue 16114009: Add AAC codec specific data for MSE on android (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressing comments Created 7 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 | Annotate | Revision Log
« no previous file with comments | « media/mp4/aac.h ('k') | media/mp4/mp4_stream_parser.cc » ('j') | 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) 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/aac.h" 5 #include "media/mp4/aac.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "media/base/bit_reader.h" 10 #include "media/base/bit_reader.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 46
47 AAC::AAC() 47 AAC::AAC()
48 : profile_(0), frequency_index_(0), channel_config_(0), frequency_(0), 48 : profile_(0), frequency_index_(0), channel_config_(0), frequency_(0),
49 extension_frequency_(0), channel_layout_(CHANNEL_LAYOUT_UNSUPPORTED) { 49 extension_frequency_(0), channel_layout_(CHANNEL_LAYOUT_UNSUPPORTED) {
50 } 50 }
51 51
52 AAC::~AAC() { 52 AAC::~AAC() {
53 } 53 }
54 54
55 bool AAC::Parse(const std::vector<uint8>& data) { 55 bool AAC::Parse(const std::vector<uint8>& data) {
56 #if defined(OS_ANDROID)
57 codec_specific_data_ = data;
58 #endif
56 if (data.empty()) 59 if (data.empty())
57 return false; 60 return false;
58 61
59 BitReader reader(&data[0], data.size()); 62 BitReader reader(&data[0], data.size());
60 uint8 extension_type = 0; 63 uint8 extension_type = 0;
61 bool ps_present = false; 64 bool ps_present = false;
62 uint8 extension_frequency_index = 0xff; 65 uint8 extension_frequency_index = 0xff;
63 66
64 frequency_ = 0; 67 frequency_ = 0;
65 extension_frequency_ = 0; 68 extension_frequency_ = 0;
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 266
264 RCHECK(bit_reader->ReadBits(1, &dummy)); // extensionFlag3 267 RCHECK(bit_reader->ReadBits(1, &dummy)); // extensionFlag3
265 } 268 }
266 269
267 return true; 270 return true;
268 } 271 }
269 272
270 } // namespace mp4 273 } // namespace mp4
271 274
272 } // namespace media 275 } // namespace media
OLDNEW
« no previous file with comments | « media/mp4/aac.h ('k') | media/mp4/mp4_stream_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698