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

Side by Side Diff: webkit/glue/webmediaplayer_impl.h

Issue 5878007: Fix black video frames when seeking (which also fixes flashing poster issue). (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Cache the last available video frame in VideoRendererBase instead of copying a bitmap. Created 10 years 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 // Delegate calls from WebCore::MediaPlayerPrivate to Chrome's video player. 5 // Delegate calls from WebCore::MediaPlayerPrivate to Chrome's video player.
6 // It contains PipelineImpl which is the actual media player pipeline, it glues 6 // It contains PipelineImpl which is the actual media player pipeline, it glues
7 // the media player pipeline, data source, audio renderer and renderer. 7 // the media player pipeline, data source, audio renderer and renderer.
8 // PipelineImpl would creates multiple threads and access some public methods 8 // PipelineImpl would creates multiple threads and access some public methods
9 // of this class, so we need to be extra careful about concurrent access of 9 // of this class, so we need to be extra careful about concurrent access of
10 // methods and members. 10 // methods and members.
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 // single "playback rate" over worrying about paused/stopped etc... It forces 296 // single "playback rate" over worrying about paused/stopped etc... It forces
297 // all clients to manage the pause+playback rate externally, but is that 297 // all clients to manage the pause+playback rate externally, but is that
298 // really a bad thing? 298 // really a bad thing?
299 // 299 //
300 // TODO(scherkus): since SetPlaybackRate(0) is asynchronous and we don't want 300 // TODO(scherkus): since SetPlaybackRate(0) is asynchronous and we don't want
301 // to hang the render thread during pause(), we record the time at the same 301 // to hang the render thread during pause(), we record the time at the same
302 // time we pause and then return that value in currentTime(). Otherwise our 302 // time we pause and then return that value in currentTime(). Otherwise our
303 // clock can creep forward a little bit while the asynchronous 303 // clock can creep forward a little bit while the asynchronous
304 // SetPlaybackRate(0) is being executed. 304 // SetPlaybackRate(0) is being executed.
305 bool paused_; 305 bool paused_;
306 bool seeking_;
306 float playback_rate_; 307 float playback_rate_;
307 base::TimeDelta paused_time_; 308 base::TimeDelta paused_time_;
308 309
309 WebKit::WebMediaPlayerClient* client_; 310 WebKit::WebMediaPlayerClient* client_;
310 311
311 scoped_refptr<Proxy> proxy_; 312 scoped_refptr<Proxy> proxy_;
312 313
313 // Used to block Destroy() until Pipeline::Stop() is completed. 314 // Used to block Destroy() until Pipeline::Stop() is completed.
314 base::WaitableEvent pipeline_stopped_; 315 base::WaitableEvent pipeline_stopped_;
315 316
316 #if WEBKIT_USING_CG 317 #if WEBKIT_USING_CG
317 scoped_ptr<skia::PlatformCanvas> skia_canvas_; 318 scoped_ptr<skia::PlatformCanvas> skia_canvas_;
318 #endif 319 #endif
319 320
320 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); 321 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl);
321 }; 322 };
322 323
323 } // namespace webkit_glue 324 } // namespace webkit_glue
324 325
325 #endif // WEBKIT_GLUE_WEBMEDIAPLAYER_IMPL_H_ 326 #endif // WEBKIT_GLUE_WEBMEDIAPLAYER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698