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

Unified Diff: content/renderer/media/stream_texture_factory_impl_android.cc

Issue 12676004: Move ownership of cc:VideoLayer to webkit/media (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « no previous file | webkit/media/android/stream_texture_factory_android.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/stream_texture_factory_impl_android.cc
diff --git a/content/renderer/media/stream_texture_factory_impl_android.cc b/content/renderer/media/stream_texture_factory_impl_android.cc
index ebfae209dac27d9312a76bc69f3f7e7884e7a5c1..c77700f84c64f95b4afb94fc809f6e5df5c1c2cb 100644
--- a/content/renderer/media/stream_texture_factory_impl_android.cc
+++ b/content/renderer/media/stream_texture_factory_impl_android.cc
@@ -23,7 +23,8 @@ static void DeleteStreamTextureHost(content::StreamTextureHost* host) {
}
// Implementation of the StreamTextureProxy class. This class listens to all
-// the stream texture updates and forward them to the WebStreamTextureClient.
+// the stream texture updates and forward them to the
+// cc::VideoFrameProvider::Client.
class StreamTextureProxyImpl : public webkit_media::StreamTextureProxy,
public content::StreamTextureHost::Listener {
public:
@@ -33,7 +34,11 @@ class StreamTextureProxyImpl : public webkit_media::StreamTextureProxy,
// webkit_media::StreamTextureProxy implementation:
virtual bool Initialize(int stream_id, int width, int height) OVERRIDE;
virtual bool IsInitialized() OVERRIDE { return initialized_; }
+#ifndef REMOVE_WEBVIDEOFRAME
virtual void SetClient(WebKit::WebStreamTextureClient* client) OVERRIDE;
+#else
+ virtual void SetClient(cc::VideoFrameProvider::Client* client) OVERRIDE;
+#endif
// StreamTextureHost::Listener implementation:
virtual void OnFrameAvailable() OVERRIDE;
@@ -44,7 +49,11 @@ class StreamTextureProxyImpl : public webkit_media::StreamTextureProxy,
scoped_refptr<base::MessageLoopProxy> loop_;
base::Lock client_lock_;
+#ifndef REMOVE_WEBVIDEOFRAME
WebKit::WebStreamTextureClient* client_;
+#else
+ cc::VideoFrameProvider::Client* client_;
+#endif
bool initialized_;
DISALLOW_COPY_AND_ASSIGN(StreamTextureProxyImpl);
@@ -69,7 +78,11 @@ StreamTextureProxyImpl::~StreamTextureProxyImpl() {
}
}
+#ifndef REMOVE_WEBVIDEOFRAME
void StreamTextureProxyImpl::SetClient(WebKit::WebStreamTextureClient* client) {
+#else
+void StreamTextureProxyImpl::SetClient(cc::VideoFrameProvider::Client* client) {
+#endif
base::AutoLock lock(client_lock_);
client_ = client;
}
@@ -82,14 +95,24 @@ bool StreamTextureProxyImpl::Initialize(int stream_id, int width, int height) {
void StreamTextureProxyImpl::OnFrameAvailable() {
base::AutoLock lock(client_lock_);
+#ifndef REMOVE_WEBVIDEOFRAME
if (client_)
client_->didReceiveFrame();
+#else
+ if (client_)
+ client_->DidReceiveFrame();
+#endif
}
void StreamTextureProxyImpl::OnMatrixChanged(const float matrix[16]) {
base::AutoLock lock(client_lock_);
+#ifndef REMOVE_WEBVIDEOFRAME
if (client_)
client_->didUpdateMatrix(matrix);
+#else
+ if (client_)
+ client_->DidUpdateMatrix(matrix);
+#endif
}
} // anonymous namespace
« no previous file with comments | « no previous file | webkit/media/android/stream_texture_factory_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698