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

Unified Diff: webkit/media/android/webmediaplayer_android.h

Issue 12902002: Remove WebVideoFrame, WebVideoFrameProvider, and WebVideoLayer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase and without cc changes Created 7 years, 9 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/android/webmediaplayer_android.h
diff --git a/webkit/media/android/webmediaplayer_android.h b/webkit/media/android/webmediaplayer_android.h
index ef535204edb9e3584e65e44b6bd42cc459e23d1f..fb413e54fea64685239770de1772007134556983 100644
--- a/webkit/media/android/webmediaplayer_android.h
+++ b/webkit/media/android/webmediaplayer_android.h
@@ -8,15 +8,17 @@
#include <jni.h>
#include "base/basictypes.h"
-#include "base/message_loop.h"
+#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
+#include "base/message_loop.h"
#include "base/time.h"
+#include "cc/layers/video_frame_provider.h"
#include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h"
#include "third_party/WebKit/Source/Platform/chromium/public/WebURL.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayer.h"
-namespace WebKit {
-class WebVideoFrame;
+namespace webkit {
+class WebLayerImpl;
}
namespace webkit_media {
@@ -24,12 +26,12 @@ namespace webkit_media {
class StreamTextureFactory;
class StreamTextureProxy;
class WebMediaPlayerManagerAndroid;
-class WebVideoFrameImpl;
// An abstract class that serves as the common base class for implementing
// WebKit::WebMediaPlayer on Android.
class WebMediaPlayerAndroid
: public WebKit::WebMediaPlayer,
+ public cc::VideoFrameProvider,
public MessageLoop::DestructionObserver {
public:
// Resource loading.
@@ -94,14 +96,12 @@ class WebMediaPlayerAndroid
virtual unsigned audioDecodedByteCount() const;
virtual unsigned videoDecodedByteCount() const;
- // Methods called from VideoLayerChromium. These methods are running on the
- // compositor thread.
- virtual WebKit::WebVideoFrame* getCurrentFrame();
- virtual void putCurrentFrame(WebKit::WebVideoFrame*);
-
- // This gets called both on compositor and main thread to set the callback
- // target when a frame is produced.
- virtual void setStreamTextureClient(WebKit::WebStreamTextureClient* client);
+ // cc::VideoFrameProvider implementation.
+ virtual void SetVideoFrameProviderClient(
+ cc::VideoFrameProvider::Client* client) OVERRIDE;
+ virtual scoped_refptr<media::VideoFrame> GetCurrentFrame() OVERRIDE;
+ virtual void PutCurrentFrame(const scoped_refptr<media::VideoFrame>& frame)
+ OVERRIDE;
// Media player callback handlers.
virtual void OnMediaPrepared(base::TimeDelta duration);
@@ -195,8 +195,8 @@ class WebMediaPlayerAndroid
// Size of the video.
WebKit::WebSize natural_size_;
- // The video frame object used for renderering by WebKit.
- scoped_ptr<WebVideoFrameImpl> web_video_frame_;
+ // The video frame object used for rendering by the compositor.
+ scoped_refptr<media::VideoFrame> current_frame_;
// Message loop for main renderer thread.
MessageLoop* main_loop_;
@@ -251,6 +251,12 @@ class WebMediaPlayerAndroid
// Whether media player needs external surface.
bool needs_external_surface_;
+ // A pointer back to the compositor to inform it about state changes. This is
+ // not NULL while the compositor is actively using this webmediaplayer.
+ cc::VideoFrameProvider::Client* video_frame_provider_client_;
+
+ scoped_ptr<webkit::WebLayerImpl> video_weblayer_;
+
DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid);
};

Powered by Google App Engine
This is Rietveld 408576698