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

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

Issue 271923002: Remove VideoRenderer::Pause() as it serves no real purpose. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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
« no previous file with comments | « media/base/video_renderer.h ('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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 virtual void Initialize(DemuxerStream* stream, 59 virtual void Initialize(DemuxerStream* stream,
60 bool low_delay, 60 bool low_delay,
61 const PipelineStatusCB& init_cb, 61 const PipelineStatusCB& init_cb,
62 const StatisticsCB& statistics_cb, 62 const StatisticsCB& statistics_cb,
63 const TimeCB& max_time_cb, 63 const TimeCB& max_time_cb,
64 const base::Closure& ended_cb, 64 const base::Closure& ended_cb,
65 const PipelineStatusCB& error_cb, 65 const PipelineStatusCB& error_cb,
66 const TimeDeltaCB& get_time_cb, 66 const TimeDeltaCB& get_time_cb,
67 const TimeDeltaCB& get_duration_cb) OVERRIDE; 67 const TimeDeltaCB& get_duration_cb) OVERRIDE;
68 virtual void Play(const base::Closure& callback) OVERRIDE; 68 virtual void Play(const base::Closure& callback) OVERRIDE;
69 virtual void Pause(const base::Closure& callback) OVERRIDE;
70 virtual void Flush(const base::Closure& callback) OVERRIDE; 69 virtual void Flush(const base::Closure& callback) OVERRIDE;
71 virtual void Preroll(base::TimeDelta time, 70 virtual void Preroll(base::TimeDelta time,
72 const PipelineStatusCB& cb) OVERRIDE; 71 const PipelineStatusCB& cb) OVERRIDE;
73 virtual void Stop(const base::Closure& callback) OVERRIDE; 72 virtual void Stop(const base::Closure& callback) OVERRIDE;
74 virtual void SetPlaybackRate(float playback_rate) OVERRIDE; 73 virtual void SetPlaybackRate(float playback_rate) OVERRIDE;
75 74
76 // PlatformThread::Delegate implementation. 75 // PlatformThread::Delegate implementation.
77 virtual void ThreadMain() OVERRIDE; 76 virtual void ThreadMain() OVERRIDE;
78 77
79 private: 78 private:
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 // [kUninitialized] 156 // [kUninitialized]
158 // | 157 // |
159 // | Initialize() 158 // | Initialize()
160 // [kInitializing] 159 // [kInitializing]
161 // | 160 // |
162 // V 161 // V
163 // +------[kFlushed]<---------------OnVideoFrameStreamResetDone() 162 // +------[kFlushed]<---------------OnVideoFrameStreamResetDone()
164 // | | Preroll() or upon ^ 163 // | | Preroll() or upon ^
165 // | V got first frame [kFlushing] 164 // | V got first frame [kFlushing]
166 // | [kPrerolling] ^ 165 // | [kPrerolling] ^
167 // | | | Flush() 166 // | | |
168 // | V Got enough frames | 167 // | V Got enough frames |
169 // | [kPrerolled]---------------------->[kPaused] 168 // | [kPrerolled]--------------------------|
170 // | | Pause() ^ 169 // | | Flush() ^
171 // | V Play() | 170 // | V Play() |
172 // | [kPlaying]---------------------------| 171 // | [kPlaying]---------------------------|
173 // | Pause() ^ Pause() 172 // | Flush() ^ Flush()
174 // | | 173 // | |
175 // +-----> [kStopped] [Any state other than] 174 // +-----> [kStopped] [Any state other than]
176 // [ kUninitialized ] 175 // [ kUninitialized ]
177 176
178 // Simple state tracking variable. 177 // Simple state tracking variable.
179 enum State { 178 enum State {
180 kUninitialized, 179 kUninitialized,
181 kInitializing, 180 kInitializing,
182 kPrerolled, 181 kPrerolled,
183 kPaused,
184 kFlushing, 182 kFlushing,
185 kFlushed, 183 kFlushed,
186 kPrerolling, 184 kPrerolling,
187 kPlaying, 185 kPlaying,
188 kStopped, 186 kStopped,
189 }; 187 };
190 State state_; 188 State state_;
191 189
192 // Video thread handle. 190 // Video thread handle.
193 base::PlatformThreadHandle thread_; 191 base::PlatformThreadHandle thread_;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 228
231 // NOTE: Weak pointers must be invalidated before all other member variables. 229 // NOTE: Weak pointers must be invalidated before all other member variables.
232 base::WeakPtrFactory<VideoRendererImpl> weak_factory_; 230 base::WeakPtrFactory<VideoRendererImpl> weak_factory_;
233 231
234 DISALLOW_COPY_AND_ASSIGN(VideoRendererImpl); 232 DISALLOW_COPY_AND_ASSIGN(VideoRendererImpl);
235 }; 233 };
236 234
237 } // namespace media 235 } // namespace media
238 236
239 #endif // MEDIA_FILTERS_VIDEO_RENDERER_IMPL_H_ 237 #endif // MEDIA_FILTERS_VIDEO_RENDERER_IMPL_H_
OLDNEW
« no previous file with comments | « media/base/video_renderer.h ('k') | media/filters/video_renderer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698