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

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: No provider client lock 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 c325ce43529dadbee966b685f6d971bd5a2f42e3..fd3ace4380c34e2579c0ce6d801ec1034d2fb1a1 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);
@@ -192,8 +192,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_;
@@ -245,6 +245,10 @@ class WebMediaPlayerAndroid
// frame available. It should be initialized on the compositor thread.
scoped_ptr<StreamTextureProxy> stream_texture_proxy_;
+ cc::VideoFrameProvider::Client* video_frame_provider_client_;
jamesr 2013/03/21 00:59:11 Most of the other members in this class seem to ha
danakj 2013/03/21 03:05:26 Done, also in the other implementations.
+
+ scoped_ptr<webkit::WebLayerImpl> video_weblayer_;
+
DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid);
};

Powered by Google App Engine
This is Rietveld 408576698