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

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

Issue 447963003: Introduce DecodeTimestamp class to make it easier to distiguish presentation and decode timestamps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address CR comments Created 6 years, 4 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
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 836 matching lines...) Expand 10 before | Expand all | Expand 10 after
847 // range. 847 // range.
848 Ranges<TimeDelta> valid_time_range; 848 Ranges<TimeDelta> valid_time_range;
849 valid_time_range.Add(range.start(0), duration); 849 valid_time_range.Add(range.start(0), duration);
850 return range.IntersectionWith(valid_time_range); 850 return range.IntersectionWith(valid_time_range);
851 } 851 }
852 852
853 TimeDelta ChunkDemuxerStream::GetBufferedDuration() const { 853 TimeDelta ChunkDemuxerStream::GetBufferedDuration() const {
854 return stream_->GetBufferedDuration(); 854 return stream_->GetBufferedDuration();
855 } 855 }
856 856
857 void ChunkDemuxerStream::OnNewMediaSegment(TimeDelta start_timestamp) { 857 void ChunkDemuxerStream::OnNewMediaSegment(DecodeTimestamp start_timestamp) {
858 DVLOG(2) << "ChunkDemuxerStream::OnNewMediaSegment(" 858 DVLOG(2) << "ChunkDemuxerStream::OnNewMediaSegment("
859 << start_timestamp.InSecondsF() << ")"; 859 << start_timestamp.InSecondsF() << ")";
860 base::AutoLock auto_lock(lock_); 860 base::AutoLock auto_lock(lock_);
861 stream_->OnNewMediaSegment(start_timestamp); 861 stream_->OnNewMediaSegment(start_timestamp);
862 } 862 }
863 863
864 bool ChunkDemuxerStream::UpdateAudioConfig(const AudioDecoderConfig& config, 864 bool ChunkDemuxerStream::UpdateAudioConfig(const AudioDecoderConfig& config,
865 const LogCB& log_cb) { 865 const LogCB& log_cb) {
866 DCHECK(config.IsValidConfig()); 866 DCHECK(config.IsValidConfig());
867 DCHECK_EQ(type_, AUDIO); 867 DCHECK_EQ(type_, AUDIO);
(...skipping 885 matching lines...) Expand 10 before | Expand all | Expand 10 after
1753 } 1753 }
1754 1754
1755 void ChunkDemuxer::ShutdownAllStreams() { 1755 void ChunkDemuxer::ShutdownAllStreams() {
1756 for (SourceStateMap::iterator itr = source_state_map_.begin(); 1756 for (SourceStateMap::iterator itr = source_state_map_.begin();
1757 itr != source_state_map_.end(); ++itr) { 1757 itr != source_state_map_.end(); ++itr) {
1758 itr->second->Shutdown(); 1758 itr->second->Shutdown();
1759 } 1759 }
1760 } 1760 }
1761 1761
1762 } // namespace media 1762 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698