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

Side by Side Diff: media/base/time_source.h

Issue 534073002: Switch to using media::TimeSource inside media::RendererImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix bad rebase Created 6 years, 3 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
« no previous file with comments | « media/base/renderer.h ('k') | media/base/video_renderer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef MEDIA_BASE_TIME_SOURCE_H_ 5 #ifndef MEDIA_BASE_TIME_SOURCE_H_
6 #define MEDIA_BASE_TIME_SOURCE_H_ 6 #define MEDIA_BASE_TIME_SOURCE_H_
7 7
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 #include "media/base/media_export.h" 9 #include "media/base/media_export.h"
10 10
(...skipping 16 matching lines...) Expand all
27 // Updates the current playback rate. It is expected that values from 27 // Updates the current playback rate. It is expected that values from
28 // CurrentMediaTime() will eventually reflect the new playback rate (e.g., the 28 // CurrentMediaTime() will eventually reflect the new playback rate (e.g., the
29 // media time will advance at half speed if the rate was set to 0.5f). 29 // media time will advance at half speed if the rate was set to 0.5f).
30 virtual void SetPlaybackRate(float playback_rate) = 0; 30 virtual void SetPlaybackRate(float playback_rate) = 0;
31 31
32 // Sets the media time to start ticking from. Only valid to call while the 32 // Sets the media time to start ticking from. Only valid to call while the
33 // time source is not ticking. 33 // time source is not ticking.
34 virtual void SetMediaTime(base::TimeDelta time) = 0; 34 virtual void SetMediaTime(base::TimeDelta time) = 0;
35 35
36 // Returns the current media time. 36 // Returns the current media time.
37 //
38 // Values returned are intended for informational purposes, such as displaying
39 // UI with the current minute and second count. While it is guaranteed values
40 // will never go backwards, the frequency at which they update may be low.
37 virtual base::TimeDelta CurrentMediaTime() = 0; 41 virtual base::TimeDelta CurrentMediaTime() = 0;
42
43 // Returns the current media time for use with synchronizing video.
44 //
45 // Differences from CurrentMediaTime():
46 // - Values returned update at a much higher frequency (e.g., suitable for
47 // playback of 60 FPS content).
48 // - As a result, values may go slightly backwards depending on the
49 // implementation (e.g., uses interpolation).
50 //
51 // TODO(scherkus): Replace with a method that returns wall clock time for a
52 // given media time for use with VideoFrameScheduler http://crbug.com/110814
53 virtual base::TimeDelta CurrentMediaTimeForSyncingVideo() = 0;
38 }; 54 };
39 55
40 } // namespace media 56 } // namespace media
41 57
42 #endif // MEDIA_BASE_TIME_SOURCE_H_ 58 #endif // MEDIA_BASE_TIME_SOURCE_H_
OLDNEW
« no previous file with comments | « media/base/renderer.h ('k') | media/base/video_renderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698