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

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

Issue 13648007: Fix channel layout reporting for implicit signalling of AAC parametric stereo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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_unittest.cc ('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) 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/mp4_stream_parser.h" 5 #include "media/mp4/mp4_stream_parser.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/time.h" 10 #include "base/time.h"
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 } else if (entry.samplesize == 32) { 230 } else if (entry.samplesize == 32) {
231 sample_format = kSampleFormatS32; 231 sample_format = kSampleFormatS32;
232 } else { 232 } else {
233 LOG(ERROR) << "Unsupported sample size."; 233 LOG(ERROR) << "Unsupported sample size.";
234 return false; 234 return false;
235 } 235 }
236 236
237 is_audio_track_encrypted_ = entry.sinf.info.track_encryption.is_encrypted; 237 is_audio_track_encrypted_ = entry.sinf.info.track_encryption.is_encrypted;
238 DVLOG(1) << "is_audio_track_encrypted_: " << is_audio_track_encrypted_; 238 DVLOG(1) << "is_audio_track_encrypted_: " << is_audio_track_encrypted_;
239 audio_config.Initialize(kCodecAAC, sample_format, 239 audio_config.Initialize(kCodecAAC, sample_format,
240 aac.channel_layout(), 240 aac.GetChannelLayout(has_sbr_),
241 aac.GetOutputSamplesPerSecond(has_sbr_), 241 aac.GetOutputSamplesPerSecond(has_sbr_),
242 NULL, 0, is_audio_track_encrypted_, false); 242 NULL, 0, is_audio_track_encrypted_, false);
243 has_audio_ = true; 243 has_audio_ = true;
244 audio_track_id_ = track->header.track_id; 244 audio_track_id_ = track->header.track_id;
245 } 245 }
246 if (track->media.handler.type == kVideo && !video_config.IsValidConfig()) { 246 if (track->media.handler.type == kVideo && !video_config.IsValidConfig()) {
247 RCHECK(!samp_descr.video_entries.empty()); 247 RCHECK(!samp_descr.video_entries.empty());
248 if (desc_idx >= samp_descr.video_entries.size()) 248 if (desc_idx >= samp_descr.video_entries.size())
249 desc_idx = 0; 249 desc_idx = 0;
250 const VideoSampleEntry& entry = samp_descr.video_entries[desc_idx]; 250 const VideoSampleEntry& entry = samp_descr.video_entries[desc_idx];
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 return !err; 546 return !err;
547 } 547 }
548 548
549 void MP4StreamParser::ChangeState(State new_state) { 549 void MP4StreamParser::ChangeState(State new_state) {
550 DVLOG(2) << "Changing state: " << new_state; 550 DVLOG(2) << "Changing state: " << new_state;
551 state_ = new_state; 551 state_ = new_state;
552 } 552 }
553 553
554 } // namespace mp4 554 } // namespace mp4
555 } // namespace media 555 } // namespace media
OLDNEW
« no previous file with comments | « media/mp4/aac_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698