OLD | NEW |
---|---|
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/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
42 const CdmAttachedCB& cdm_attached_cb) = 0; | 42 const CdmAttachedCB& cdm_attached_cb) = 0; |
43 | 43 |
44 // The following functions must be called after Initialize(). | 44 // The following functions must be called after Initialize(). |
45 | 45 |
46 // Discards any buffered data, executing |flush_cb| when completed. | 46 // Discards any buffered data, executing |flush_cb| when completed. |
47 virtual void Flush(const base::Closure& flush_cb) = 0; | 47 virtual void Flush(const base::Closure& flush_cb) = 0; |
48 | 48 |
49 // Starts rendering from |time|. | 49 // Starts rendering from |time|. |
50 virtual void StartPlayingFrom(base::TimeDelta time) = 0; | 50 virtual void StartPlayingFrom(base::TimeDelta time) = 0; |
51 | 51 |
52 // Updates the current playback rate. The default playback rate should be 1. | 52 // Updates the current playback rate. The default playback rate should be 0. |
alokp
2016/09/02 21:52:38
This comment is inconsistent with that used in Pip
DaleCurtis
2016/09/06 19:15:36
Not sure, whichever one works? :) Defaulting to ze
alokp
2016/09/06 19:26:34
Acknowledged.
| |
53 virtual void SetPlaybackRate(double playback_rate) = 0; | 53 virtual void SetPlaybackRate(double playback_rate) = 0; |
54 | 54 |
55 // Sets the output volume. The default volume should be 1. | 55 // Sets the output volume. The default volume should be 1. |
56 virtual void SetVolume(float volume) = 0; | 56 virtual void SetVolume(float volume) = 0; |
57 | 57 |
58 // Returns the current media time. | 58 // Returns the current media time. |
59 virtual base::TimeDelta GetMediaTime() = 0; | 59 virtual base::TimeDelta GetMediaTime() = 0; |
60 | 60 |
61 // Returns whether |this| renders audio. | 61 // Returns whether |this| renders audio. |
62 virtual bool HasAudio() = 0; | 62 virtual bool HasAudio() = 0; |
63 | 63 |
64 // Returns whether |this| renders video. | 64 // Returns whether |this| renders video. |
65 virtual bool HasVideo() = 0; | 65 virtual bool HasVideo() = 0; |
66 | 66 |
67 private: | 67 private: |
68 DISALLOW_COPY_AND_ASSIGN(Renderer); | 68 DISALLOW_COPY_AND_ASSIGN(Renderer); |
69 }; | 69 }; |
70 | 70 |
71 } // namespace media | 71 } // namespace media |
72 | 72 |
73 #endif // MEDIA_BASE_RENDERER_H_ | 73 #endif // MEDIA_BASE_RENDERER_H_ |
OLD | NEW |