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

Side by Side Diff: media/filters/chunk_demuxer.cc

Issue 276573002: Add gapless playback support for AAC playback. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix msvc error. Created 6 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/base/stream_parser_buffer.cc ('k') | media/filters/chunk_demuxer_unittest.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/filters/chunk_demuxer.h" 5 #include "media/filters/chunk_demuxer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <list> 9 #include <list>
10 10
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 if (!audio_) { 560 if (!audio_) {
561 DVLOG(1) << "Failed to create an audio stream."; 561 DVLOG(1) << "Failed to create an audio stream.";
562 return false; 562 return false;
563 } 563 }
564 564
565 if (!frame_processor_->AddTrack(FrameProcessorBase::kAudioTrackId, 565 if (!frame_processor_->AddTrack(FrameProcessorBase::kAudioTrackId,
566 audio_)) { 566 audio_)) {
567 DVLOG(1) << "Failed to add audio track to frame processor."; 567 DVLOG(1) << "Failed to add audio track to frame processor.";
568 return false; 568 return false;
569 } 569 }
570 } else {
571 frame_processor_->clear_audio_preroll_buffer();
570 } 572 }
571 573
572 success &= audio_->UpdateAudioConfig(audio_config, log_cb_); 574 success &= audio_->UpdateAudioConfig(audio_config, log_cb_);
573 } 575 }
574 576
575 if (video_config.IsValidConfig()) { 577 if (video_config.IsValidConfig()) {
576 if (!video_) { 578 if (!video_) {
577 video_ = create_demuxer_stream_cb_.Run(DemuxerStream::VIDEO); 579 video_ = create_demuxer_stream_cb_.Run(DemuxerStream::VIDEO);
578 580
579 if (!video_) { 581 if (!video_) {
(...skipping 1155 matching lines...) Expand 10 before | Expand all | Expand 10 after
1735 } 1737 }
1736 1738
1737 void ChunkDemuxer::ShutdownAllStreams() { 1739 void ChunkDemuxer::ShutdownAllStreams() {
1738 for (SourceStateMap::iterator itr = source_state_map_.begin(); 1740 for (SourceStateMap::iterator itr = source_state_map_.begin();
1739 itr != source_state_map_.end(); ++itr) { 1741 itr != source_state_map_.end(); ++itr) {
1740 itr->second->Shutdown(); 1742 itr->second->Shutdown();
1741 } 1743 }
1742 } 1744 }
1743 1745
1744 } // namespace media 1746 } // namespace media
OLDNEW
« no previous file with comments | « media/base/stream_parser_buffer.cc ('k') | media/filters/chunk_demuxer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698