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

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

Issue 1094783002: Switch to double for time calculations using playback rate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Making changes at chromecast side to fix trybots Created 5 years, 8 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/pipeline_unittest.cc ('k') | media/base/time_delta_interpolator.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_RENDERER_H_ 5 #ifndef MEDIA_BASE_RENDERER_H_
6 #define MEDIA_BASE_RENDERER_H_ 6 #define MEDIA_BASE_RENDERER_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 62
63 // The following functions must be called after Initialize(). 63 // The following functions must be called after Initialize().
64 64
65 // Discards any buffered data, executing |flush_cb| when completed. 65 // Discards any buffered data, executing |flush_cb| when completed.
66 virtual void Flush(const base::Closure& flush_cb) = 0; 66 virtual void Flush(const base::Closure& flush_cb) = 0;
67 67
68 // Starts rendering from |time|. 68 // Starts rendering from |time|.
69 virtual void StartPlayingFrom(base::TimeDelta time) = 0; 69 virtual void StartPlayingFrom(base::TimeDelta time) = 0;
70 70
71 // Updates the current playback rate. The default playback rate should be 1. 71 // Updates the current playback rate. The default playback rate should be 1.
72 virtual void SetPlaybackRate(float playback_rate) = 0; 72 virtual void SetPlaybackRate(double playback_rate) = 0;
73 73
74 // Sets the output volume. The default volume should be 1. 74 // Sets the output volume. The default volume should be 1.
75 virtual void SetVolume(float volume) = 0; 75 virtual void SetVolume(float volume) = 0;
76 76
77 // Returns the current media time. 77 // Returns the current media time.
78 virtual base::TimeDelta GetMediaTime() = 0; 78 virtual base::TimeDelta GetMediaTime() = 0;
79 79
80 // Returns whether |this| renders audio. 80 // Returns whether |this| renders audio.
81 virtual bool HasAudio() = 0; 81 virtual bool HasAudio() = 0;
82 82
83 // Returns whether |this| renders video. 83 // Returns whether |this| renders video.
84 virtual bool HasVideo() = 0; 84 virtual bool HasVideo() = 0;
85 85
86 private: 86 private:
87 DISALLOW_COPY_AND_ASSIGN(Renderer); 87 DISALLOW_COPY_AND_ASSIGN(Renderer);
88 }; 88 };
89 89
90 } // namespace media 90 } // namespace media
91 91
92 #endif // MEDIA_BASE_RENDERER_H_ 92 #endif // MEDIA_BASE_RENDERER_H_
OLDNEW
« no previous file with comments | « media/base/pipeline_unittest.cc ('k') | media/base/time_delta_interpolator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698