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

Unified Diff: webkit/glue/media/web_video_renderer.h

Issue 3058055: Implemented way to share video frames between WebKit and Chromium (Closed)
Patch Set: Adding WebKit side for easy reading (will delete in final patch) Created 10 years, 4 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
« no previous file with comments | « webkit/glue/media/video_renderer_impl.cc ('k') | webkit/glue/webkit_glue.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/media/web_video_renderer.h
diff --git a/webkit/glue/media/web_video_renderer.h b/webkit/glue/media/web_video_renderer.h
index 8bafb1a7cf10a5f1a51366a6adf2163f521a45d5..c75043d8331cac9e691c6dc6ea57602cc3b11f59 100644
--- a/webkit/glue/media/web_video_renderer.h
+++ b/webkit/glue/media/web_video_renderer.h
@@ -5,6 +5,7 @@
#ifndef WEBKIT_GLUE_MEDIA_WEB_VIDEO_RENDERER_H_
#define WEBKIT_GLUE_MEDIA_WEB_VIDEO_RENDERER_H_
+#include "media/base/video_frame.h"
#include "media/filters/video_renderer_base.h"
namespace webkit_glue {
@@ -30,6 +31,15 @@ class WebVideoRenderer : public media::VideoRendererBase {
virtual void Paint(skia::PlatformCanvas* canvas,
const gfx::Rect& dest_rect) = 0;
+ // Clients of this class (painter/compositor) should use GetCurrentFrame()
+ // obtain ownership of VideoFrame, it should always relinquish the ownership
+ // by use PutCurrentFrame(). Current frame is not guaranteed to be non-NULL.
+ // It expects clients to use color-fill the background if current frame
+ // is NULL. This could happen when before pipeline is pre-rolled or during
+ // pause/flush/seek.
+ virtual void GetCurrentFrame(scoped_refptr<media::VideoFrame>* frame_out) {}
+ virtual void PutCurrentFrame(scoped_refptr<media::VideoFrame> frame) {}
+
private:
DISALLOW_COPY_AND_ASSIGN(WebVideoRenderer);
};
« no previous file with comments | « webkit/glue/media/video_renderer_impl.cc ('k') | webkit/glue/webkit_glue.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698