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

Side by Side Diff: media/renderers/audio_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 unified diff | Download patch
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 // Audio rendering unit utilizing an AudioRendererSink to output data. 5 // Audio rendering unit utilizing an AudioRendererSink to output data.
6 // 6 //
7 // This class lives inside three threads during it's lifetime, namely: 7 // This class lives inside three threads during it's lifetime, namely:
8 // 1. Render thread 8 // 1. Render thread
9 // Where the object is created. 9 // Where the object is created.
10 // 2. Media thread (provided via constructor) 10 // 2. Media thread (provided via constructor)
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 base::TimeTicks stop_rendering_time_; 287 base::TimeTicks stop_rendering_time_;
288 288
289 // Set upon receipt of the first decoded buffer after a StartPlayingFrom(). 289 // Set upon receipt of the first decoded buffer after a StartPlayingFrom().
290 // Used to determine how long to delay playback. 290 // Used to determine how long to delay playback.
291 base::TimeDelta first_packet_timestamp_; 291 base::TimeDelta first_packet_timestamp_;
292 292
293 // Set by OnSuspend() and OnResume() to indicate when the system is about to 293 // Set by OnSuspend() and OnResume() to indicate when the system is about to
294 // suspend/is suspended and when it resumes. 294 // suspend/is suspended and when it resumes.
295 bool is_suspending_; 295 bool is_suspending_;
296 296
297 // Indicates if we've rendered the first valid frame after SetMediaTime().
298 bool rendered_first_frame_;
299
297 // End variables which must be accessed under |lock_|. ---------------------- 300 // End variables which must be accessed under |lock_|. ----------------------
298 301
299 // NOTE: Weak pointers must be invalidated before all other member variables. 302 // NOTE: Weak pointers must be invalidated before all other member variables.
300 base::WeakPtrFactory<AudioRendererImpl> weak_factory_; 303 base::WeakPtrFactory<AudioRendererImpl> weak_factory_;
301 304
302 DISALLOW_COPY_AND_ASSIGN(AudioRendererImpl); 305 DISALLOW_COPY_AND_ASSIGN(AudioRendererImpl);
303 }; 306 };
304 307
305 } // namespace media 308 } // namespace media
306 309
307 #endif // MEDIA_RENDERERS_AUDIO_RENDERER_IMPL_H_ 310 #endif // MEDIA_RENDERERS_AUDIO_RENDERER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698