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

Side by Side Diff: media/renderers/renderer_impl.h

Issue 2684103005: Allow media track switching. (Closed)
Patch Set: Restore CreateRenderer in pipeline_integration_test.cc Created 3 years, 9 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
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 <list> 8 #include <list>
9 #include <memory> 9 #include <memory>
10 #include <vector> 10 #include <vector>
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 void OnAudioRendererInitializeDone(PipelineStatus status); 99 void OnAudioRendererInitializeDone(PipelineStatus status);
100 void InitializeVideoRenderer(); 100 void InitializeVideoRenderer();
101 void OnVideoRendererInitializeDone(PipelineStatus status); 101 void OnVideoRendererInitializeDone(PipelineStatus status);
102 102
103 // Helper functions and callbacks for Flush(). 103 // Helper functions and callbacks for Flush().
104 void FlushAudioRenderer(); 104 void FlushAudioRenderer();
105 void OnAudioRendererFlushDone(); 105 void OnAudioRendererFlushDone();
106 void FlushVideoRenderer(); 106 void FlushVideoRenderer();
107 void OnVideoRendererFlushDone(); 107 void OnVideoRendererFlushDone();
108 108
109 void RestartAudioRenderer(base::TimeDelta time); 109 void RestartAudioRenderer(DemuxerStream* stream, base::TimeDelta time);
xhwang 2017/03/22 22:31:12 Please add a comment about what the |stream| is, a
servolk 2017/03/23 17:08:10 Done.
110 void RestartVideoRenderer(base::TimeDelta time); 110 void OnAudioRendererReinitCompleted(DemuxerStream* stream,
111 base::TimeDelta time,
112 PipelineStatus status);
xhwang 2017/03/22 22:31:12 naming nit: Are "Restart" and "Reinit" the same th
servolk 2017/03/23 17:08:10 No restart and reinit are different things. Reinit
113 void RestartVideoRenderer(DemuxerStream* stream, base::TimeDelta time);
114 void OnVideoRendererReinitCompleted(DemuxerStream* stream,
115 base::TimeDelta time,
116 PipelineStatus status);
111 117
112 // Callback executed by filters to update statistics. 118 // Callback executed by filters to update statistics.
113 void OnStatisticsUpdate(const PipelineStatistics& stats); 119 void OnStatisticsUpdate(const PipelineStatistics& stats);
114 120
115 // Collection of callback methods and helpers for tracking changes in 121 // Collection of callback methods and helpers for tracking changes in
116 // buffering state and transition from paused/underflow states and playing 122 // buffering state and transition from paused/underflow states and playing
117 // states. 123 // states.
118 // 124 //
119 // While in the kPlaying state: 125 // While in the kPlaying state:
120 // - A waiting to non-waiting transition indicates preroll has completed 126 // - A waiting to non-waiting transition indicates preroll has completed
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 165
160 // Temporary callback used for Initialize() and Flush(). 166 // Temporary callback used for Initialize() and Flush().
161 PipelineStatusCB init_cb_; 167 PipelineStatusCB init_cb_;
162 base::Closure flush_cb_; 168 base::Closure flush_cb_;
163 169
164 std::unique_ptr<RendererClientInternal> audio_renderer_client_; 170 std::unique_ptr<RendererClientInternal> audio_renderer_client_;
165 std::unique_ptr<RendererClientInternal> video_renderer_client_; 171 std::unique_ptr<RendererClientInternal> video_renderer_client_;
166 std::unique_ptr<AudioRenderer> audio_renderer_; 172 std::unique_ptr<AudioRenderer> audio_renderer_;
167 std::unique_ptr<VideoRenderer> video_renderer_; 173 std::unique_ptr<VideoRenderer> video_renderer_;
168 174
175 DemuxerStream* current_audio_stream_;
176 DemuxerStream* current_video_stream_;
177
169 // Renderer-provided time source used to control playback. 178 // Renderer-provided time source used to control playback.
170 TimeSource* time_source_; 179 TimeSource* time_source_;
171 std::unique_ptr<WallClockTimeSource> wall_clock_time_source_; 180 std::unique_ptr<WallClockTimeSource> wall_clock_time_source_;
172 bool time_ticking_; 181 bool time_ticking_;
173 double playback_rate_; 182 double playback_rate_;
174 183
175 // The time to start playback from after starting/seeking has completed. 184 // The time to start playback from after starting/seeking has completed.
176 base::TimeDelta start_time_; 185 base::TimeDelta start_time_;
177 186
178 BufferingState audio_buffering_state_; 187 BufferingState audio_buffering_state_;
(...skipping 25 matching lines...) Expand all
204 213
205 base::WeakPtr<RendererImpl> weak_this_; 214 base::WeakPtr<RendererImpl> weak_this_;
206 base::WeakPtrFactory<RendererImpl> weak_factory_; 215 base::WeakPtrFactory<RendererImpl> weak_factory_;
207 216
208 DISALLOW_COPY_AND_ASSIGN(RendererImpl); 217 DISALLOW_COPY_AND_ASSIGN(RendererImpl);
209 }; 218 };
210 219
211 } // namespace media 220 } // namespace media
212 221
213 #endif // MEDIA_RENDERERS_RENDERER_IMPL_H_ 222 #endif // MEDIA_RENDERERS_RENDERER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698