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 #include <utility> | 10 #include <utility> |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 } | 153 } |
154 | 154 |
155 TimeDelta ChunkDemuxerStream::GetBufferedDuration() const { | 155 TimeDelta ChunkDemuxerStream::GetBufferedDuration() const { |
156 return stream_->GetBufferedDuration(); | 156 return stream_->GetBufferedDuration(); |
157 } | 157 } |
158 | 158 |
159 size_t ChunkDemuxerStream::GetBufferedSize() const { | 159 size_t ChunkDemuxerStream::GetBufferedSize() const { |
160 return stream_->GetBufferedSize(); | 160 return stream_->GetBufferedSize(); |
161 } | 161 } |
162 | 162 |
163 void ChunkDemuxerStream::OnStartOfCodedFrameGroup( | 163 void ChunkDemuxerStream::OnNewMediaSegment(DecodeTimestamp start_timestamp) { |
164 DecodeTimestamp start_timestamp) { | 164 DVLOG(2) << "ChunkDemuxerStream::OnNewMediaSegment(" |
165 DVLOG(2) << "ChunkDemuxerStream::OnStartOfCodedFrameGroup(" | |
166 << start_timestamp.InSecondsF() << ")"; | 165 << start_timestamp.InSecondsF() << ")"; |
167 base::AutoLock auto_lock(lock_); | 166 base::AutoLock auto_lock(lock_); |
168 stream_->OnStartOfCodedFrameGroup(start_timestamp); | 167 stream_->OnNewMediaSegment(start_timestamp); |
169 } | 168 } |
170 | 169 |
171 bool ChunkDemuxerStream::UpdateAudioConfig( | 170 bool ChunkDemuxerStream::UpdateAudioConfig( |
172 const AudioDecoderConfig& config, | 171 const AudioDecoderConfig& config, |
173 const scoped_refptr<MediaLog>& media_log) { | 172 const scoped_refptr<MediaLog>& media_log) { |
174 DCHECK(config.IsValidConfig()); | 173 DCHECK(config.IsValidConfig()); |
175 DCHECK_EQ(type_, AUDIO); | 174 DCHECK_EQ(type_, AUDIO); |
176 base::AutoLock auto_lock(lock_); | 175 base::AutoLock auto_lock(lock_); |
177 if (!stream_) { | 176 if (!stream_) { |
178 DCHECK_EQ(state_, UNINITIALIZED); | 177 DCHECK_EQ(state_, UNINITIALIZED); |
(...skipping 931 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1110 } | 1109 } |
1111 | 1110 |
1112 void ChunkDemuxer::ShutdownAllStreams() { | 1111 void ChunkDemuxer::ShutdownAllStreams() { |
1113 for (MediaSourceStateMap::iterator itr = source_state_map_.begin(); | 1112 for (MediaSourceStateMap::iterator itr = source_state_map_.begin(); |
1114 itr != source_state_map_.end(); ++itr) { | 1113 itr != source_state_map_.end(); ++itr) { |
1115 itr->second->Shutdown(); | 1114 itr->second->Shutdown(); |
1116 } | 1115 } |
1117 } | 1116 } |
1118 | 1117 |
1119 } // namespace media | 1118 } // namespace media |
OLD | NEW |