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

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

Issue 557333002: Revert of 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
« no previous file with comments | « media/filters/renderer_impl_unittest.cc ('k') | media/filters/video_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 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 const PaintCB& paint_cb, 56 const PaintCB& paint_cb,
57 bool drop_frames, 57 bool drop_frames,
58 const scoped_refptr<MediaLog>& media_log); 58 const scoped_refptr<MediaLog>& media_log);
59 virtual ~VideoRendererImpl(); 59 virtual ~VideoRendererImpl();
60 60
61 // VideoRenderer implementation. 61 // VideoRenderer implementation.
62 virtual void Initialize(DemuxerStream* stream, 62 virtual void Initialize(DemuxerStream* stream,
63 bool low_delay, 63 bool low_delay,
64 const PipelineStatusCB& init_cb, 64 const PipelineStatusCB& init_cb,
65 const StatisticsCB& statistics_cb, 65 const StatisticsCB& statistics_cb,
66 const TimeCB& max_time_cb,
66 const BufferingStateCB& buffering_state_cb, 67 const BufferingStateCB& buffering_state_cb,
67 const base::Closure& ended_cb, 68 const base::Closure& ended_cb,
68 const PipelineStatusCB& error_cb, 69 const PipelineStatusCB& error_cb,
69 const TimeDeltaCB& get_time_cb) OVERRIDE; 70 const TimeDeltaCB& get_time_cb,
71 const TimeDeltaCB& get_duration_cb) OVERRIDE;
70 virtual void Flush(const base::Closure& callback) OVERRIDE; 72 virtual void Flush(const base::Closure& callback) OVERRIDE;
71 virtual void StartPlaying() OVERRIDE; 73 virtual void StartPlaying() OVERRIDE;
72 74
73 // PlatformThread::Delegate implementation. 75 // PlatformThread::Delegate implementation.
74 virtual void ThreadMain() OVERRIDE; 76 virtual void ThreadMain() OVERRIDE;
75 77
76 private: 78 private:
77 // Callback for |video_frame_stream_| initialization. 79 // Callback for |video_frame_stream_| initialization.
78 void OnVideoFrameStreamInitialized(bool success); 80 void OnVideoFrameStreamInitialized(bool success);
79 81
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 bool drop_frames_; 176 bool drop_frames_;
175 177
176 BufferingState buffering_state_; 178 BufferingState buffering_state_;
177 179
178 // Playback operation callbacks. 180 // Playback operation callbacks.
179 base::Closure flush_cb_; 181 base::Closure flush_cb_;
180 182
181 // Event callbacks. 183 // Event callbacks.
182 PipelineStatusCB init_cb_; 184 PipelineStatusCB init_cb_;
183 StatisticsCB statistics_cb_; 185 StatisticsCB statistics_cb_;
186 TimeCB max_time_cb_;
184 BufferingStateCB buffering_state_cb_; 187 BufferingStateCB buffering_state_cb_;
185 base::Closure ended_cb_; 188 base::Closure ended_cb_;
186 PipelineStatusCB error_cb_; 189 PipelineStatusCB error_cb_;
187 TimeDeltaCB get_time_cb_; 190 TimeDeltaCB get_time_cb_;
191 TimeDeltaCB get_duration_cb_;
188 192
189 base::TimeDelta start_timestamp_; 193 base::TimeDelta start_timestamp_;
190 194
191 // Embedder callback for notifying a new frame is available for painting. 195 // Embedder callback for notifying a new frame is available for painting.
192 PaintCB paint_cb_; 196 PaintCB paint_cb_;
193 197
194 // The timestamp of the last frame removed from the |ready_frames_| queue, 198 // The timestamp of the last frame removed from the |ready_frames_| queue,
195 // either for calling |paint_cb_| or for dropping. Set to kNoTimestamp() 199 // either for calling |paint_cb_| or for dropping. Set to kNoTimestamp()
196 // during flushing. 200 // during flushing.
197 base::TimeDelta last_timestamp_; 201 base::TimeDelta last_timestamp_;
(...skipping 11 matching lines...) Expand all
209 213
210 // NOTE: Weak pointers must be invalidated before all other member variables. 214 // NOTE: Weak pointers must be invalidated before all other member variables.
211 base::WeakPtrFactory<VideoRendererImpl> weak_factory_; 215 base::WeakPtrFactory<VideoRendererImpl> weak_factory_;
212 216
213 DISALLOW_COPY_AND_ASSIGN(VideoRendererImpl); 217 DISALLOW_COPY_AND_ASSIGN(VideoRendererImpl);
214 }; 218 };
215 219
216 } // namespace media 220 } // namespace media
217 221
218 #endif // MEDIA_FILTERS_VIDEO_RENDERER_IMPL_H_ 222 #endif // MEDIA_FILTERS_VIDEO_RENDERER_IMPL_H_
OLDNEW
« no previous file with comments | « media/filters/renderer_impl_unittest.cc ('k') | media/filters/video_renderer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698