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

Side by Side Diff: media/filters/video_renderer_impl.h

Issue 534073002: Switch to using media::TimeSource inside media::RendererImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_FILTERS_VIDEO_RENDERER_IMPL_H_ 5 #ifndef MEDIA_FILTERS_VIDEO_RENDERER_IMPL_H_
6 #define MEDIA_FILTERS_VIDEO_RENDERER_IMPL_H_ 6 #define MEDIA_FILTERS_VIDEO_RENDERER_IMPL_H_
7 7
8 #include <deque> 8 #include <deque>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 const SetDecryptorReadyCB& set_decryptor_ready_cb, 54 const SetDecryptorReadyCB& set_decryptor_ready_cb,
55 const PaintCB& paint_cb, 55 const PaintCB& paint_cb,
56 bool drop_frames); 56 bool drop_frames);
57 virtual ~VideoRendererImpl(); 57 virtual ~VideoRendererImpl();
58 58
59 // VideoRenderer implementation. 59 // VideoRenderer implementation.
60 virtual void Initialize(DemuxerStream* stream, 60 virtual void Initialize(DemuxerStream* stream,
61 bool low_delay, 61 bool low_delay,
62 const PipelineStatusCB& init_cb, 62 const PipelineStatusCB& init_cb,
63 const StatisticsCB& statistics_cb, 63 const StatisticsCB& statistics_cb,
64 const TimeCB& max_time_cb,
65 const BufferingStateCB& buffering_state_cb, 64 const BufferingStateCB& buffering_state_cb,
66 const base::Closure& ended_cb, 65 const base::Closure& ended_cb,
67 const PipelineStatusCB& error_cb, 66 const PipelineStatusCB& error_cb,
68 const TimeDeltaCB& get_time_cb, 67 const TimeDeltaCB& get_time_cb) OVERRIDE;
69 const TimeDeltaCB& get_duration_cb) OVERRIDE;
70 virtual void Flush(const base::Closure& callback) OVERRIDE; 68 virtual void Flush(const base::Closure& callback) OVERRIDE;
71 virtual void StartPlaying() OVERRIDE; 69 virtual void StartPlaying() OVERRIDE;
72 70
73 // PlatformThread::Delegate implementation. 71 // PlatformThread::Delegate implementation.
74 virtual void ThreadMain() OVERRIDE; 72 virtual void ThreadMain() OVERRIDE;
75 73
76 private: 74 private:
77 // Callback for |video_frame_stream_| initialization. 75 // Callback for |video_frame_stream_| initialization.
78 void OnVideoFrameStreamInitialized(bool success); 76 void OnVideoFrameStreamInitialized(bool success);
79 77
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 bool drop_frames_; 172 bool drop_frames_;
175 173
176 BufferingState buffering_state_; 174 BufferingState buffering_state_;
177 175
178 // Playback operation callbacks. 176 // Playback operation callbacks.
179 base::Closure flush_cb_; 177 base::Closure flush_cb_;
180 178
181 // Event callbacks. 179 // Event callbacks.
182 PipelineStatusCB init_cb_; 180 PipelineStatusCB init_cb_;
183 StatisticsCB statistics_cb_; 181 StatisticsCB statistics_cb_;
184 TimeCB max_time_cb_;
185 BufferingStateCB buffering_state_cb_; 182 BufferingStateCB buffering_state_cb_;
186 base::Closure ended_cb_; 183 base::Closure ended_cb_;
187 PipelineStatusCB error_cb_; 184 PipelineStatusCB error_cb_;
188 TimeDeltaCB get_time_cb_; 185 TimeDeltaCB get_time_cb_;
189 TimeDeltaCB get_duration_cb_;
190 186
191 base::TimeDelta start_timestamp_; 187 base::TimeDelta start_timestamp_;
192 188
193 // Embedder callback for notifying a new frame is available for painting. 189 // Embedder callback for notifying a new frame is available for painting.
194 PaintCB paint_cb_; 190 PaintCB paint_cb_;
195 191
196 // The timestamp of the last frame removed from the |ready_frames_| queue, 192 // The timestamp of the last frame removed from the |ready_frames_| queue,
197 // either for calling |paint_cb_| or for dropping. Set to kNoTimestamp() 193 // either for calling |paint_cb_| or for dropping. Set to kNoTimestamp()
198 // during flushing. 194 // during flushing.
199 base::TimeDelta last_timestamp_; 195 base::TimeDelta last_timestamp_;
(...skipping 11 matching lines...) Expand all
211 207
212 // NOTE: Weak pointers must be invalidated before all other member variables. 208 // NOTE: Weak pointers must be invalidated before all other member variables.
213 base::WeakPtrFactory<VideoRendererImpl> weak_factory_; 209 base::WeakPtrFactory<VideoRendererImpl> weak_factory_;
214 210
215 DISALLOW_COPY_AND_ASSIGN(VideoRendererImpl); 211 DISALLOW_COPY_AND_ASSIGN(VideoRendererImpl);
216 }; 212 };
217 213
218 } // namespace media 214 } // namespace media
219 215
220 #endif // MEDIA_FILTERS_VIDEO_RENDERER_IMPL_H_ 216 #endif // MEDIA_FILTERS_VIDEO_RENDERER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698