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

Side by Side Diff: media/renderers/audio_renderer_impl.h

Issue 2423903003: AudioRendererImpl: Don't advance time when rendering stops. (Closed)
Patch Set: Doing fix in ARI Created 4 years, 2 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 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 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 base::TimeTicks stop_rendering_time_; 283 base::TimeTicks stop_rendering_time_;
284 284
285 // Set upon receipt of the first decoded buffer after a StartPlayingFrom(). 285 // Set upon receipt of the first decoded buffer after a StartPlayingFrom().
286 // Used to determine how long to delay playback. 286 // Used to determine how long to delay playback.
287 base::TimeDelta first_packet_timestamp_; 287 base::TimeDelta first_packet_timestamp_;
288 288
289 // Set by OnSuspend() and OnResume() to indicate when the system is about to 289 // Set by OnSuspend() and OnResume() to indicate when the system is about to
290 // suspend/is suspended and when it resumes. 290 // suspend/is suspended and when it resumes.
291 bool is_suspending_; 291 bool is_suspending_;
292 292
293 // Track the last reported media time.
294 base::TimeDelta last_media_time_;
sandersd (OOO until July 31) 2016/10/17 23:37:37 Nit: Suggest |last_reported_media_time_| instead f
chcunningham 2016/10/17 23:49:17 Done.
295
293 // End variables which must be accessed under |lock_|. ---------------------- 296 // End variables which must be accessed under |lock_|. ----------------------
294 297
295 // NOTE: Weak pointers must be invalidated before all other member variables. 298 // NOTE: Weak pointers must be invalidated before all other member variables.
296 base::WeakPtrFactory<AudioRendererImpl> weak_factory_; 299 base::WeakPtrFactory<AudioRendererImpl> weak_factory_;
297 300
298 DISALLOW_COPY_AND_ASSIGN(AudioRendererImpl); 301 DISALLOW_COPY_AND_ASSIGN(AudioRendererImpl);
299 }; 302 };
300 303
301 } // namespace media 304 } // namespace media
302 305
303 #endif // MEDIA_RENDERERS_AUDIO_RENDERER_IMPL_H_ 306 #endif // MEDIA_RENDERERS_AUDIO_RENDERER_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | media/renderers/audio_renderer_impl.cc » ('j') | media/renderers/audio_renderer_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698