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

Unified Diff: media/renderers/renderer_impl.h

Issue 2552493002: [Media] Record time it takes to start rendering audio and video (Closed)
Patch Set: Use RestartPlaybackStream and OnFirstFrameRender Created 4 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
Index: media/renderers/renderer_impl.h
diff --git a/media/renderers/renderer_impl.h b/media/renderers/renderer_impl.h
index 07ea2241cfb145ede0b0a233e3adc779bdcf1a23..f3eb0d622c15c626cf27629a02d5e334bfcbb198 100644
--- a/media/renderers/renderer_impl.h
+++ b/media/renderers/renderer_impl.h
@@ -145,6 +145,7 @@ class MEDIA_EXPORT RendererImpl : public Renderer {
void OnWaitingForDecryptionKey();
void OnVideoNaturalSizeChange(const gfx::Size& size);
void OnVideoOpacityChange(bool opaque);
+ void OnFirstFrameRender(DemuxerStream::Type type);
State state_;
@@ -195,6 +196,12 @@ class MEDIA_EXPORT RendererImpl : public Renderer {
// runs out of data but the audio renderer still has enough.
base::TimeDelta video_underflow_threshold_;
+ // Timestamps when the playback is initiated after play or seek that's set at
+ // StartPlayingFrom(). Used to calculate and report the preroll time from
+ // StartPlayingFrom() to HAVE_ENOUGH_DATA.
+ base::TimeTicks audio_preroll_start_time_;
+ base::TimeTicks video_preroll_start_time_;
+
bool restarting_audio_ = false;
bool restarting_video_ = false;

Powered by Google App Engine
This is Rietveld 408576698