| 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
|
|
|