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

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

Issue 2366373003: Not for submission. fastSeek prototype. (Closed)
Patch Set: 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
« no previous file with comments | « media/base/pipeline_impl.cc ('k') | media/base/renderer_client.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/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "base/time/time.h" 11 #include "base/time/time.h"
12 #include "media/base/buffering_state.h" 12 #include "media/base/buffering_state.h"
13 #include "media/base/cdm_context.h" 13 #include "media/base/cdm_context.h"
14 #include "media/base/media_export.h" 14 #include "media/base/media_export.h"
15 #include "media/base/pipeline_status.h" 15 #include "media/base/pipeline_status.h"
16 #include "media/base/stream_position.h"
16 17
17 namespace media { 18 namespace media {
18 19
19 class DemuxerStreamProvider; 20 class DemuxerStreamProvider;
20 class RendererClient; 21 class RendererClient;
21 class VideoFrame; 22 class VideoFrame;
22 23
23 class MEDIA_EXPORT Renderer { 24 class MEDIA_EXPORT Renderer {
24 public: 25 public:
25 Renderer(); 26 Renderer();
(...skipping 13 matching lines...) Expand all
39 // Associates the |cdm_context| with this Renderer for decryption (and 40 // Associates the |cdm_context| with this Renderer for decryption (and
40 // decoding) of media data, then fires |cdm_attached_cb| with the result. 41 // decoding) of media data, then fires |cdm_attached_cb| with the result.
41 virtual void SetCdm(CdmContext* cdm_context, 42 virtual void SetCdm(CdmContext* cdm_context,
42 const CdmAttachedCB& cdm_attached_cb) = 0; 43 const CdmAttachedCB& cdm_attached_cb) = 0;
43 44
44 // The following functions must be called after Initialize(). 45 // The following functions must be called after Initialize().
45 46
46 // Discards any buffered data, executing |flush_cb| when completed. 47 // Discards any buffered data, executing |flush_cb| when completed.
47 virtual void Flush(const base::Closure& flush_cb) = 0; 48 virtual void Flush(const base::Closure& flush_cb) = 0;
48 49
49 // Starts rendering from |time|. 50 // Starts rendering from |position|.
50 virtual void StartPlayingFrom(base::TimeDelta time) = 0; 51 virtual void StartPlayingFrom(StreamPosition position) = 0;
51 52
52 // Updates the current playback rate. The default playback rate should be 0. 53 // Updates the current playback rate. The default playback rate should be 1.
53 virtual void SetPlaybackRate(double playback_rate) = 0; 54 virtual void SetPlaybackRate(double playback_rate) = 0;
54 55
55 // Sets the output volume. The default volume should be 1. 56 // Sets the output volume. The default volume should be 1.
56 virtual void SetVolume(float volume) = 0; 57 virtual void SetVolume(float volume) = 0;
57 58
58 // Returns the current media time. 59 // Returns the current media time.
59 virtual base::TimeDelta GetMediaTime() = 0; 60 virtual base::TimeDelta GetMediaTime() = 0;
60 61
61 // Returns whether |this| renders audio. 62 // Returns whether |this| renders audio.
62 virtual bool HasAudio() = 0; 63 virtual bool HasAudio() = 0;
63 64
64 // Returns whether |this| renders video. 65 // Returns whether |this| renders video.
65 virtual bool HasVideo() = 0; 66 virtual bool HasVideo() = 0;
66 67
67 private: 68 private:
68 DISALLOW_COPY_AND_ASSIGN(Renderer); 69 DISALLOW_COPY_AND_ASSIGN(Renderer);
69 }; 70 };
70 71
71 } // namespace media 72 } // namespace media
72 73
73 #endif // MEDIA_BASE_RENDERER_H_ 74 #endif // MEDIA_BASE_RENDERER_H_
OLDNEW
« no previous file with comments | « media/base/pipeline_impl.cc ('k') | media/base/renderer_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698