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

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

Issue 2237243002: CL for perf tryjob on linux (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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_client.h ('k') | media/base/wall_clock_time_source.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 <vector> 8 #include <vector>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 29 matching lines...) Expand all
40 // Sets the media time to start ticking from. Only valid to call while the 40 // Sets the media time to start ticking from. Only valid to call while the
41 // time source is not ticking. 41 // time source is not ticking.
42 virtual void SetMediaTime(base::TimeDelta time) = 0; 42 virtual void SetMediaTime(base::TimeDelta time) = 0;
43 43
44 // Returns the current media timestamp relative to the timestamp set by 44 // Returns the current media timestamp relative to the timestamp set by
45 // SetMediaTime(). 45 // SetMediaTime().
46 // 46 //
47 // Values returned are intended for informational purposes, such as displaying 47 // Values returned are intended for informational purposes, such as displaying
48 // UI with the current minute and second count. While it is guaranteed values 48 // UI with the current minute and second count. While it is guaranteed values
49 // will never go backwards, the frequency at which they update may be low. 49 // will never go backwards, the frequency at which they update may be low.
50 virtual base::TimeDelta CurrentMediaTime() = 0; 50 virtual base::TimeDelta CurrentMediaTime(base::TimeTicks* reference) = 0;
51 51
52 // Converts a vector of media timestamps into a vector of wall clock times; if 52 // Converts a vector of media timestamps into a vector of wall clock times; if
53 // the media time is stopped, returns false, otherwise returns true. Even if 53 // the media time is stopped, returns false, otherwise returns true. Even if
54 // time is stopped, timestamps will be converted. 54 // time is stopped, timestamps will be converted.
55 // 55 //
56 // Passing an empty |media_timestamps| vector will return the last known media 56 // Passing an empty |media_timestamps| vector will return the last known media
57 // time as a wall clock time. 57 // time as a wall clock time.
58 // 58 //
59 // Within a single call to GetWallClockTimes() the returned wall clock times 59 // Within a single call to GetWallClockTimes() the returned wall clock times
60 // are a strictly increasing function of the given media times. There is no 60 // are a strictly increasing function of the given media times. There is no
(...skipping 13 matching lines...) Expand all
74 // guarantee is that the returned time will be less than the current wall 74 // guarantee is that the returned time will be less than the current wall
75 // clock time. 75 // clock time.
76 virtual bool GetWallClockTimes( 76 virtual bool GetWallClockTimes(
77 const std::vector<base::TimeDelta>& media_timestamps, 77 const std::vector<base::TimeDelta>& media_timestamps,
78 std::vector<base::TimeTicks>* wall_clock_times) = 0; 78 std::vector<base::TimeTicks>* wall_clock_times) = 0;
79 }; 79 };
80 80
81 } // namespace media 81 } // namespace media
82 82
83 #endif // MEDIA_BASE_TIME_SOURCE_H_ 83 #endif // MEDIA_BASE_TIME_SOURCE_H_
OLDNEW
« no previous file with comments | « media/base/renderer_client.h ('k') | media/base/wall_clock_time_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698