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

Unified Diff: media/base/android/media_source_player.cc

Issue 1537583002: Trigger MSE players UMA by user events only (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase only Created 5 years 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/base/android/media_codec_player.cc ('k') | media/base/android/media_statistics.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/android/media_source_player.cc
diff --git a/media/base/android/media_source_player.cc b/media/base/android/media_source_player.cc
index a00b0280882fed5e9ef211c31c8bf1c01a49679f..610f459d70bc6c0c9e6d614511ec463310567b34 100644
--- a/media/base/android/media_source_player.cc
+++ b/media/base/android/media_source_player.cc
@@ -504,7 +504,7 @@ void MediaSourcePlayer::MediaDecoderCallback(
if (IsEventPending(SEEK_EVENT_PENDING)) {
ProcessPendingEvents();
// In case of Seek GetCurrentTime() already tells the time to seek to.
- if (is_clock_manager)
+ if (is_clock_manager && !doing_browser_seek_)
media_stat_->StopAndReport(current_presentation_timestamp);
return;
}
@@ -568,8 +568,6 @@ void MediaSourcePlayer::MediaDecoderCallback(
// in the middle of a seek or stop event and needs to wait for the IPCs to
// come.
if (status == MEDIA_CODEC_ABORT) {
- if (is_clock_manager)
- media_stat_->StopAndReport(GetCurrentTime());
return;
}
@@ -761,7 +759,8 @@ void MediaSourcePlayer::OnPrefetchDone() {
if (!interpolator_.interpolating())
interpolator_.StartInterpolating();
- media_stat_->Start(start_presentation_timestamp_);
+ if (!AudioFinished() || !VideoFinished())
+ media_stat_->Start(start_presentation_timestamp_);
if (!AudioFinished())
DecodeMoreAudio();
« no previous file with comments | « media/base/android/media_codec_player.cc ('k') | media/base/android/media_statistics.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698