OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |