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

Side by Side Diff: media/base/pipeline.cc

Issue 1415683009: Support earliest seekable time in WMPI. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more androidfixes. Created 5 years, 1 month 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/base/pipeline.h ('k') | media/blink/webmediaplayer_impl.h » ('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/base/pipeline.h" 5 #include "media/base/pipeline.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 base::AutoLock auto_lock(lock_); 158 base::AutoLock auto_lock(lock_);
159 return renderer_ ? std::min(renderer_->GetMediaTime(), duration_) 159 return renderer_ ? std::min(renderer_->GetMediaTime(), duration_)
160 : TimeDelta(); 160 : TimeDelta();
161 } 161 }
162 162
163 Ranges<TimeDelta> Pipeline::GetBufferedTimeRanges() const { 163 Ranges<TimeDelta> Pipeline::GetBufferedTimeRanges() const {
164 base::AutoLock auto_lock(lock_); 164 base::AutoLock auto_lock(lock_);
165 return buffered_time_ranges_; 165 return buffered_time_ranges_;
166 } 166 }
167 167
168 base::TimeDelta Pipeline::GetMediaStartTime() const {
169 DCHECK(task_runner_->BelongsToCurrentThread());
170 return demuxer_->GetStartTime();
171 }
172
168 TimeDelta Pipeline::GetMediaDuration() const { 173 TimeDelta Pipeline::GetMediaDuration() const {
169 base::AutoLock auto_lock(lock_); 174 base::AutoLock auto_lock(lock_);
170 return duration_; 175 return duration_;
171 } 176 }
172 177
173 bool Pipeline::DidLoadingProgress() { 178 bool Pipeline::DidLoadingProgress() {
174 base::AutoLock auto_lock(lock_); 179 base::AutoLock auto_lock(lock_);
175 bool ret = did_loading_progress_; 180 bool ret = did_loading_progress_;
176 did_loading_progress_ = false; 181 did_loading_progress_ = false;
177 return ret; 182 return ret;
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
729 metadata_cb_.Run(metadata); 734 metadata_cb_.Run(metadata);
730 } 735 }
731 736
732 void Pipeline::BufferingStateChanged(BufferingState new_buffering_state) { 737 void Pipeline::BufferingStateChanged(BufferingState new_buffering_state) {
733 DVLOG(1) << __FUNCTION__ << "(" << new_buffering_state << ") "; 738 DVLOG(1) << __FUNCTION__ << "(" << new_buffering_state << ") ";
734 DCHECK(task_runner_->BelongsToCurrentThread()); 739 DCHECK(task_runner_->BelongsToCurrentThread());
735 buffering_state_cb_.Run(new_buffering_state); 740 buffering_state_cb_.Run(new_buffering_state);
736 } 741 }
737 742
738 } // namespace media 743 } // namespace media
OLDNEW
« no previous file with comments | « media/base/pipeline.h ('k') | media/blink/webmediaplayer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698