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

Unified Diff: webkit/media/webmediaplayer_proxy.h

Issue 12096081: Replace VideoRendererBase Get/PutCurrentFrame() with a VideoFrame-containing callback. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: webkit/media/webmediaplayer_proxy.h
diff --git a/webkit/media/webmediaplayer_proxy.h b/webkit/media/webmediaplayer_proxy.h
index 7d9f5a235482f736f005cebd7b10b9e723837d8e..fc5519344155196cd58d8089908f3cf4faf523fc 100644
--- a/webkit/media/webmediaplayer_proxy.h
+++ b/webkit/media/webmediaplayer_proxy.h
@@ -44,20 +44,14 @@ class WebMediaPlayerProxy
data_source_ = data_source;
}
- // TODO(scherkus): remove this once VideoRendererBase::PaintCB passes
- // ownership of the VideoFrame http://crbug.com/108435
- void set_frame_provider(media::VideoRendererBase* frame_provider) {
- frame_provider_ = frame_provider;
- }
-
- // Methods for Filter -> WebMediaPlayerImpl communication.
- void Repaint();
+ // Called by VideoRendererBase on its internal thread with the new frame to be
+ // painted.
+ void FrameReady(const scoped_refptr<media::VideoFrame>& frame);
// Methods for WebMediaPlayerImpl -> Filter communication.
void Paint(SkCanvas* canvas, const gfx::Rect& dest_rect, uint8_t alpha);
void Detach();
void GetCurrentFrame(scoped_refptr<media::VideoFrame>* frame_out);
- void PutCurrentFrame(scoped_refptr<media::VideoFrame> frame);
bool HasSingleOrigin();
bool DidPassCORSAccessCheck() const;
@@ -75,10 +69,10 @@ class WebMediaPlayerProxy
WebMediaPlayerImpl* webmediaplayer_;
scoped_refptr<BufferedDataSource> data_source_;
- scoped_refptr<media::VideoRendererBase> frame_provider_;
media::SkCanvasVideoRenderer video_renderer_;
base::Lock lock_;
+ scoped_refptr<media::VideoFrame> current_frame_;
int outstanding_repaints_;
DISALLOW_IMPLICIT_CONSTRUCTORS(WebMediaPlayerProxy);

Powered by Google App Engine
This is Rietveld 408576698