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

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

Issue 416393003: Make Demuxer::Stop() synchronous. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix android Created 6 years, 3 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/filters/chunk_demuxer.h ('k') | media/filters/ffmpeg_demuxer.h » ('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 1039 matching lines...) Expand 10 before | Expand all | Expand 10 after
1050 } 1050 }
1051 DCHECK_EQ(state_, WAITING_FOR_INIT); 1051 DCHECK_EQ(state_, WAITING_FOR_INIT);
1052 host_ = host; 1052 host_ = host;
1053 enable_text_ = enable_text_tracks; 1053 enable_text_ = enable_text_tracks;
1054 1054
1055 ChangeState_Locked(INITIALIZING); 1055 ChangeState_Locked(INITIALIZING);
1056 1056
1057 base::ResetAndReturn(&open_cb_).Run(); 1057 base::ResetAndReturn(&open_cb_).Run();
1058 } 1058 }
1059 1059
1060 void ChunkDemuxer::Stop(const base::Closure& callback) { 1060 void ChunkDemuxer::Stop() {
1061 DVLOG(1) << "Stop()"; 1061 DVLOG(1) << "Stop()";
1062 Shutdown(); 1062 Shutdown();
1063 callback.Run();
1064 } 1063 }
1065 1064
1066 void ChunkDemuxer::Seek(TimeDelta time, const PipelineStatusCB& cb) { 1065 void ChunkDemuxer::Seek(TimeDelta time, const PipelineStatusCB& cb) {
1067 DVLOG(1) << "Seek(" << time.InSecondsF() << ")"; 1066 DVLOG(1) << "Seek(" << time.InSecondsF() << ")";
1068 DCHECK(time >= TimeDelta()); 1067 DCHECK(time >= TimeDelta());
1069 1068
1070 base::AutoLock auto_lock(lock_); 1069 base::AutoLock auto_lock(lock_);
1071 DCHECK(seek_cb_.is_null()); 1070 DCHECK(seek_cb_.is_null());
1072 1071
1073 seek_cb_ = BindToCurrentLoop(cb); 1072 seek_cb_ = BindToCurrentLoop(cb);
(...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after
1753 } 1752 }
1754 1753
1755 void ChunkDemuxer::ShutdownAllStreams() { 1754 void ChunkDemuxer::ShutdownAllStreams() {
1756 for (SourceStateMap::iterator itr = source_state_map_.begin(); 1755 for (SourceStateMap::iterator itr = source_state_map_.begin();
1757 itr != source_state_map_.end(); ++itr) { 1756 itr != source_state_map_.end(); ++itr) {
1758 itr->second->Shutdown(); 1757 itr->second->Shutdown();
1759 } 1758 }
1760 } 1759 }
1761 1760
1762 } // namespace media 1761 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/chunk_demuxer.h ('k') | media/filters/ffmpeg_demuxer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698