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

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

Issue 1091293005: MSE: Relax the 'media segment must begin with keyframe' requirement (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased(noop) + addressed comments from PS12 Created 4 years, 11 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
« no previous file with comments | « media/filters/chunk_demuxer.h ('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 #include <utility> 10 #include <utility>
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « media/filters/chunk_demuxer.h ('k') | media/filters/chunk_demuxer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698