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

Unified Diff: media/filters/media_source_state.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/media_source_state.h ('k') | media/filters/source_buffer_stream.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/media_source_state.cc
diff --git a/media/filters/media_source_state.cc b/media/filters/media_source_state.cc
index d5132eb3e2ea381df42da6dc52cae0ef791aa90b..7fb8abc7f08a58283bfcb88499c5cbc7675ff3b8 100644
--- a/media/filters/media_source_state.cc
+++ b/media/filters/media_source_state.cc
@@ -311,6 +311,23 @@ Ranges<TimeDelta> MediaSourceState::GetBufferedRanges(TimeDelta duration,
return ComputeRangesIntersection(ranges_list, ended);
}
+TimeDelta MediaSourceState::GetHighestPresentationTimestamp() const {
+ TimeDelta max_pts;
+
+ if (audio_)
+ max_pts = std::max(max_pts, audio_->GetHighestPresentationTimestamp());
+
+ if (video_)
+ max_pts = std::max(max_pts, video_->GetHighestPresentationTimestamp());
+
+ for (TextStreamMap::const_iterator itr = text_stream_map_.begin();
+ itr != text_stream_map_.end(); ++itr) {
+ max_pts = std::max(max_pts, itr->second->GetHighestPresentationTimestamp());
+ }
+
+ return max_pts;
+}
+
TimeDelta MediaSourceState::GetMaxBufferedDuration() const {
TimeDelta max_duration;
« no previous file with comments | « media/filters/media_source_state.h ('k') | media/filters/source_buffer_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698