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

Unified Diff: media/filters/chunk_demuxer.cc

Issue 2102323002: MSE: Experimental support for new abort and duration behavior (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/filters/chunk_demuxer.h ('k') | media/filters/media_source_state.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/chunk_demuxer.cc
diff --git a/media/filters/chunk_demuxer.cc b/media/filters/chunk_demuxer.cc
index 49836a129e580d085c1ca956ac27d7c5ac3bea90..e7525b4191891c5b1c34d53b023cffb21eb9f611 100644
--- a/media/filters/chunk_demuxer.cc
+++ b/media/filters/chunk_demuxer.cc
@@ -157,6 +157,10 @@ Ranges<TimeDelta> ChunkDemuxerStream::GetBufferedRanges(
return range.IntersectionWith(valid_time_range);
}
+TimeDelta ChunkDemuxerStream::GetHighestPresentationTimestamp() const {
+ return stream_->GetHighestPresentationTimestamp();
+}
+
TimeDelta ChunkDemuxerStream::GetBufferedDuration() const {
return stream_->GetBufferedDuration();
}
@@ -593,6 +597,17 @@ Ranges<TimeDelta> ChunkDemuxer::GetBufferedRanges(const std::string& id) const {
return itr->second->GetBufferedRanges(duration_, state_ == ENDED);
}
+base::TimeDelta ChunkDemuxer::GetHighestPresentationTimestamp(
+ const std::string& id) const {
+ base::AutoLock auto_lock(lock_);
+ DCHECK(!id.empty());
+
+ MediaSourceStateMap::const_iterator itr = source_state_map_.find(id);
+
+ DCHECK(itr != source_state_map_.end());
+ return itr->second->GetHighestPresentationTimestamp();
+}
+
bool ChunkDemuxer::EvictCodedFrames(const std::string& id,
base::TimeDelta currentMediaTime,
size_t newDataSize) {
« no previous file with comments | « media/filters/chunk_demuxer.h ('k') | media/filters/media_source_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698