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

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

Issue 6969026: Convert Filter::Seek() to use new callback system. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add files in content/renderer/media Created 9 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // VideoRendererBase creates its own thread for the sole purpose of timing frame 5 // VideoRendererBase creates its own thread for the sole purpose of timing frame
6 // presentation. It handles reading from the decoder and stores the results in 6 // presentation. It handles reading from the decoder and stores the results in
7 // a queue of decoded frames, calling OnFrameAvailable() on subclasses to notify 7 // a queue of decoded frames, calling OnFrameAvailable() on subclasses to notify
8 // when a frame is ready to display. 8 // when a frame is ready to display.
9 // 9 //
10 // The media filter methods Initialize(), Stop(), SetPlaybackRate() and Seek() 10 // The media filter methods Initialize(), Stop(), SetPlaybackRate() and Seek()
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 VideoFrame::SurfaceType* surface_type_out, 44 VideoFrame::SurfaceType* surface_type_out,
45 VideoFrame::Format* surface_format_out, 45 VideoFrame::Format* surface_format_out,
46 int* width_out, int* height_out); 46 int* width_out, int* height_out);
47 47
48 // Filter implementation. 48 // Filter implementation.
49 virtual void Play(FilterCallback* callback); 49 virtual void Play(FilterCallback* callback);
50 virtual void Pause(FilterCallback* callback); 50 virtual void Pause(FilterCallback* callback);
51 virtual void Flush(FilterCallback* callback); 51 virtual void Flush(FilterCallback* callback);
52 virtual void Stop(FilterCallback* callback); 52 virtual void Stop(FilterCallback* callback);
53 virtual void SetPlaybackRate(float playback_rate); 53 virtual void SetPlaybackRate(float playback_rate);
54 virtual void Seek(base::TimeDelta time, FilterCallback* callback); 54 virtual void Seek(base::TimeDelta time, const FilterStatusCB& cb);
55 55
56 // VideoRenderer implementation. 56 // VideoRenderer implementation.
57 virtual void Initialize(VideoDecoder* decoder, 57 virtual void Initialize(VideoDecoder* decoder,
58 FilterCallback* callback, 58 FilterCallback* callback,
59 StatisticsCallback* stats_callback); 59 StatisticsCallback* stats_callback);
60 virtual bool HasEnded(); 60 virtual bool HasEnded();
61 61
62 // PlatformThread::Delegate implementation. 62 // PlatformThread::Delegate implementation.
63 virtual void ThreadMain(); 63 virtual void ThreadMain();
64 64
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 // decoder provides buffer, |pending_reads_| is always non-positive and if 206 // decoder provides buffer, |pending_reads_| is always non-positive and if
207 // renderer provides buffer, |pending_reads_| is always non-negative. 207 // renderer provides buffer, |pending_reads_| is always non-negative.
208 int pending_reads_; 208 int pending_reads_;
209 bool pending_paint_; 209 bool pending_paint_;
210 bool pending_paint_with_last_available_; 210 bool pending_paint_with_last_available_;
211 211
212 float playback_rate_; 212 float playback_rate_;
213 213
214 // Filter callbacks. 214 // Filter callbacks.
215 scoped_ptr<FilterCallback> flush_callback_; 215 scoped_ptr<FilterCallback> flush_callback_;
216 scoped_ptr<FilterCallback> seek_callback_; 216 FilterStatusCB seek_cb_;
217 scoped_ptr<StatisticsCallback> statistics_callback_; 217 scoped_ptr<StatisticsCallback> statistics_callback_;
218 218
219 base::TimeDelta seek_timestamp_; 219 base::TimeDelta seek_timestamp_;
220 220
221 DISALLOW_COPY_AND_ASSIGN(VideoRendererBase); 221 DISALLOW_COPY_AND_ASSIGN(VideoRendererBase);
222 }; 222 };
223 223
224 } // namespace media 224 } // namespace media
225 225
226 #endif // MEDIA_FILTERS_VIDEO_RENDERER_BASE_H_ 226 #endif // MEDIA_FILTERS_VIDEO_RENDERER_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698