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

Side by Side Diff: media/renderers/renderer_impl.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/renderers/audio_renderer_impl.cc ('k') | media/renderers/renderer_impl.cc » ('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_RENDERERS_RENDERER_IMPL_H_ 5 #ifndef MEDIA_RENDERERS_RENDERER_IMPL_H_
6 #define MEDIA_RENDERERS_RENDERER_IMPL_H_ 6 #define MEDIA_RENDERERS_RENDERER_IMPL_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/cancelable_callback.h" 11 #include "base/cancelable_callback.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
15 #include "base/synchronization/lock.h" 15 #include "base/synchronization/lock.h"
16 #include "base/time/clock.h" 16 #include "base/time/clock.h"
17 #include "base/time/default_tick_clock.h" 17 #include "base/time/default_tick_clock.h"
18 #include "base/time/time.h" 18 #include "base/time/time.h"
19 #include "media/base/buffering_state.h" 19 #include "media/base/buffering_state.h"
20 #include "media/base/decryptor.h" 20 #include "media/base/decryptor.h"
21 #include "media/base/demuxer_stream.h" 21 #include "media/base/demuxer_stream.h"
22 #include "media/base/media_export.h" 22 #include "media/base/media_export.h"
23 #include "media/base/pipeline_status.h" 23 #include "media/base/pipeline_status.h"
24 #include "media/base/renderer.h" 24 #include "media/base/renderer.h"
25 #include "media/base/stream_position.h"
25 #include "ui/gfx/geometry/size.h" 26 #include "ui/gfx/geometry/size.h"
26 27
27 namespace base { 28 namespace base {
28 class SingleThreadTaskRunner; 29 class SingleThreadTaskRunner;
29 } 30 }
30 31
31 namespace media { 32 namespace media {
32 33
33 class AudioRenderer; 34 class AudioRenderer;
34 class DemuxerStreamProvider; 35 class DemuxerStreamProvider;
(...skipping 13 matching lines...) Expand all
48 49
49 ~RendererImpl() final; 50 ~RendererImpl() final;
50 51
51 // Renderer implementation. 52 // Renderer implementation.
52 void Initialize(DemuxerStreamProvider* demuxer_stream_provider, 53 void Initialize(DemuxerStreamProvider* demuxer_stream_provider,
53 RendererClient* client, 54 RendererClient* client,
54 const PipelineStatusCB& init_cb) final; 55 const PipelineStatusCB& init_cb) final;
55 void SetCdm(CdmContext* cdm_context, 56 void SetCdm(CdmContext* cdm_context,
56 const CdmAttachedCB& cdm_attached_cb) final; 57 const CdmAttachedCB& cdm_attached_cb) final;
57 void Flush(const base::Closure& flush_cb) final; 58 void Flush(const base::Closure& flush_cb) final;
58 void StartPlayingFrom(base::TimeDelta time) final; 59 void StartPlayingFrom(StreamPosition position) final;
59 void SetPlaybackRate(double playback_rate) final; 60 void SetPlaybackRate(double playback_rate) final;
60 void SetVolume(float volume) final; 61 void SetVolume(float volume) final;
61 base::TimeDelta GetMediaTime() final; 62 base::TimeDelta GetMediaTime() final;
62 bool HasAudio() final; 63 bool HasAudio() final;
63 bool HasVideo() final; 64 bool HasVideo() final;
64 65
65 void RestartStreamPlayback(DemuxerStream* stream, 66 void RestartStreamPlayback(DemuxerStream* stream,
66 bool enabled, 67 bool enabled,
67 base::TimeDelta time); 68 base::TimeDelta time);
68 69
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 void OnAudioRendererFlushDone(); 107 void OnAudioRendererFlushDone();
107 void FlushVideoRenderer(); 108 void FlushVideoRenderer();
108 void OnVideoRendererFlushDone(); 109 void OnVideoRendererFlushDone();
109 110
110 void RestartAudioRenderer(base::TimeDelta time); 111 void RestartAudioRenderer(base::TimeDelta time);
111 void RestartVideoRenderer(base::TimeDelta time); 112 void RestartVideoRenderer(base::TimeDelta time);
112 113
113 // Callback executed by filters to update statistics. 114 // Callback executed by filters to update statistics.
114 void OnStatisticsUpdate(const PipelineStatistics& stats); 115 void OnStatisticsUpdate(const PipelineStatistics& stats);
115 116
117 void OnFirstVideoFrameTimestampKnown(base::TimeDelta timestamp);
118
116 // Collection of callback methods and helpers for tracking changes in 119 // Collection of callback methods and helpers for tracking changes in
117 // buffering state and transition from paused/underflow states and playing 120 // buffering state and transition from paused/underflow states and playing
118 // states. 121 // states.
119 // 122 //
120 // While in the kPlaying state: 123 // While in the kPlaying state:
121 // - A waiting to non-waiting transition indicates preroll has completed 124 // - A waiting to non-waiting transition indicates preroll has completed
122 // and StartPlayback() should be called 125 // and StartPlayback() should be called
123 // - A non-waiting to waiting transition indicates underflow has occurred 126 // - A non-waiting to waiting transition indicates underflow has occurred
124 // and PausePlayback() should be called 127 // and PausePlayback() should be called
125 void OnBufferingStateChange(DemuxerStream::Type type, 128 void OnBufferingStateChange(DemuxerStream::Type type,
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 205
203 base::WeakPtr<RendererImpl> weak_this_; 206 base::WeakPtr<RendererImpl> weak_this_;
204 base::WeakPtrFactory<RendererImpl> weak_factory_; 207 base::WeakPtrFactory<RendererImpl> weak_factory_;
205 208
206 DISALLOW_COPY_AND_ASSIGN(RendererImpl); 209 DISALLOW_COPY_AND_ASSIGN(RendererImpl);
207 }; 210 };
208 211
209 } // namespace media 212 } // namespace media
210 213
211 #endif // MEDIA_RENDERERS_RENDERER_IMPL_H_ 214 #endif // MEDIA_RENDERERS_RENDERER_IMPL_H_
OLDNEW
« no previous file with comments | « media/renderers/audio_renderer_impl.cc ('k') | media/renderers/renderer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698