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