diff options
author | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-26 17:16:01 +0000 |
---|---|---|
committer | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-26 17:16:01 +0000 |
commit | 17019d03a6820f7a6a4165319c614608e2e25e42 (patch) | |
tree | 203854e3520c5cec37ee19027558037191f2ea2a /webkit/media | |
parent | 253442e3005d3cab5307ec6b7f04b9463cd7f46f (diff) | |
download | chromium_src-17019d03a6820f7a6a4165319c614608e2e25e42.zip chromium_src-17019d03a6820f7a6a4165319c614608e2e25e42.tar.gz chromium_src-17019d03a6820f7a6a4165319c614608e2e25e42.tar.bz2 |
Remove WebVideoFrame, WebVideoFrameProvider, and WebVideoLayer.
These class are no longer used. Removes the #ifdefs guarding the old
unused paths, and removes the WebVideo* files entirely.
R=jamesr
BUG=196810
Review URL: https://chromiumcodereview.appspot.com/12902002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@190706 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/media')
-rw-r--r-- | webkit/media/android/stream_texture_factory_android.h | 9 | ||||
-rw-r--r-- | webkit/media/android/webmediaplayer_android.cc | 36 | ||||
-rw-r--r-- | webkit/media/android/webmediaplayer_android.h | 18 | ||||
-rw-r--r-- | webkit/media/webkit_media.gypi | 2 | ||||
-rw-r--r-- | webkit/media/webmediaplayer_impl.cc | 31 | ||||
-rw-r--r-- | webkit/media/webmediaplayer_impl.h | 7 | ||||
-rw-r--r-- | webkit/media/webmediaplayer_ms.cc | 31 | ||||
-rw-r--r-- | webkit/media/webmediaplayer_ms.h | 8 | ||||
-rw-r--r-- | webkit/media/webvideoframe_impl.cc | 17 | ||||
-rw-r--r-- | webkit/media/webvideoframe_impl.h | 31 |
10 files changed, 0 insertions, 190 deletions
diff --git a/webkit/media/android/stream_texture_factory_android.h b/webkit/media/android/stream_texture_factory_android.h index dffcb8b..6fc3591 100644 --- a/webkit/media/android/stream_texture_factory_android.h +++ b/webkit/media/android/stream_texture_factory_android.h @@ -6,11 +6,6 @@ #define WEBKIT_MEDIA_ANDROID_STREAM_TEXTURE_FACTORY_ANDROID_H_ #include "cc/layers/video_frame_provider.h" -#include "third_party/WebKit/Source/Platform/chromium/public/WebVideoFrame.h" - -namespace WebKit { -class WebStreamTextureClient; -} namespace webkit_media { @@ -28,11 +23,7 @@ class StreamTextureProxy { // Setting the target for callback when a frame is available. This function // could be called on both the main thread and the compositor thread. -#ifndef REMOVE_WEBVIDEOFRAME - virtual void SetClient(WebKit::WebStreamTextureClient* client) = 0; -#else virtual void SetClient(cc::VideoFrameProvider::Client* client) = 0; -#endif }; diff --git a/webkit/media/android/webmediaplayer_android.cc b/webkit/media/android/webmediaplayer_android.cc index 15dd860..774ab07 100644 --- a/webkit/media/android/webmediaplayer_android.cc +++ b/webkit/media/android/webmediaplayer_android.cc @@ -17,7 +17,6 @@ #include "webkit/media/android/webmediaplayer_manager_android.h" #include "webkit/media/media_switches.h" #include "webkit/media/webmediaplayer_util.h" -#include "webkit/media/webvideoframe_impl.h" static const uint32 kGLTextureExternalOES = 0x8D65; @@ -26,7 +25,6 @@ using WebKit::WebMediaSource; using WebKit::WebSize; using WebKit::WebTimeRanges; using WebKit::WebURL; -using WebKit::WebVideoFrame; using media::MediaPlayerBridge; using media::VideoFrame; @@ -68,10 +66,8 @@ WebMediaPlayerAndroid::WebMediaPlayerAndroid( } WebMediaPlayerAndroid::~WebMediaPlayerAndroid() { -#ifdef REMOVE_WEBVIDEOFRAME SetVideoFrameProviderClient(NULL); client_->setWebLayer(NULL); -#endif if (stream_id_) stream_texture_factory_->DestroyStreamTexture(texture_id_); @@ -296,21 +292,13 @@ void WebMediaPlayerAndroid::OnMediaPrepared(base::TimeDelta duration) { if (ready_state_ != WebMediaPlayer::ReadyStateHaveEnoughData) { UpdateReadyState(WebMediaPlayer::ReadyStateHaveMetadata); UpdateReadyState(WebMediaPlayer::ReadyStateHaveEnoughData); -#ifndef REMOVE_WEBVIDEOFRAME - } else { - // If the status is already set to ReadyStateHaveEnoughData, set it again - // to make sure that Videolayerchromium will get created. - UpdateReadyState(WebMediaPlayer::ReadyStateHaveEnoughData); -#endif } -#ifdef REMOVE_WEBVIDEOFRAME if (hasVideo() && !video_weblayer_ && client_->needsWebLayerForVideo()) { video_weblayer_.reset( new webkit::WebLayerImpl(cc::VideoLayer::Create(this))); client_->setWebLayer(video_weblayer_.get()); } -#endif // In we have skipped loading, we have to update webkit about the new // duration. @@ -448,29 +436,6 @@ void WebMediaPlayerAndroid::ReallocateVideoFrame() { } } -#ifndef REMOVE_WEBVIDEOFRAME -WebVideoFrame* WebMediaPlayerAndroid::getCurrentFrame() { - if (stream_texture_proxy_ && !stream_texture_proxy_->IsInitialized() && - stream_id_ && !needs_external_surface_) { - gfx::Size natural_size = current_frame_->natural_size(); - stream_texture_proxy_->Initialize( - stream_id_, natural_size.width(), natural_size.height()); - } - - return new WebVideoFrameImpl(current_frame_); -} - -void WebMediaPlayerAndroid::putCurrentFrame( - WebVideoFrame* web_video_frame) { - delete web_video_frame; -} - -void WebMediaPlayerAndroid::setStreamTextureClient( - WebKit::WebStreamTextureClient* client) { - if (stream_texture_proxy_.get()) - stream_texture_proxy_->SetClient(client); -} -#else void WebMediaPlayerAndroid::SetVideoFrameProviderClient( cc::VideoFrameProvider::Client* client) { // This is called from both the main renderer thread and the compositor @@ -497,7 +462,6 @@ scoped_refptr<media::VideoFrame> WebMediaPlayerAndroid::GetCurrentFrame() { void WebMediaPlayerAndroid::PutCurrentFrame( const scoped_refptr<media::VideoFrame>& frame) { } -#endif void WebMediaPlayerAndroid::EstablishSurfaceTexturePeer() { if (stream_texture_factory_.get() && stream_id_) diff --git a/webkit/media/android/webmediaplayer_android.h b/webkit/media/android/webmediaplayer_android.h index fb5fae1..432d2c2 100644 --- a/webkit/media/android/webmediaplayer_android.h +++ b/webkit/media/android/webmediaplayer_android.h @@ -17,10 +17,6 @@ #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; } @@ -30,15 +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, -#ifdef REMOVE_WEBVIDEOFRAME public cc::VideoFrameProvider, -#endif public MessageLoop::DestructionObserver { public: // Resource loading. @@ -103,16 +96,6 @@ class WebMediaPlayerAndroid virtual unsigned audioDecodedByteCount() const; virtual unsigned videoDecodedByteCount() const; -#ifndef REMOVE_WEBVIDEOFRAME - // 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); -#else // cc::VideoFrameProvider implementation. These methods are running on the // compositor thread. virtual void SetVideoFrameProviderClient( @@ -120,7 +103,6 @@ class WebMediaPlayerAndroid virtual scoped_refptr<media::VideoFrame> GetCurrentFrame() OVERRIDE; virtual void PutCurrentFrame(const scoped_refptr<media::VideoFrame>& frame) OVERRIDE; -#endif // Media player callback handlers. virtual void OnMediaPrepared(base::TimeDelta duration); diff --git a/webkit/media/webkit_media.gypi b/webkit/media/webkit_media.gypi index 859f6510..705f55a 100644 --- a/webkit/media/webkit_media.gypi +++ b/webkit/media/webkit_media.gypi @@ -97,8 +97,6 @@ 'webmediaplayer_util.h', 'webmediasourceclient_impl.cc', 'webmediasourceclient_impl.h', - 'webvideoframe_impl.cc', - 'webvideoframe_impl.h', ], 'conditions': [ ['inside_chromium_build == 0', { diff --git a/webkit/media/webmediaplayer_impl.cc b/webkit/media/webmediaplayer_impl.cc index 37af4aa..0b76985 100644 --- a/webkit/media/webmediaplayer_impl.cc +++ b/webkit/media/webmediaplayer_impl.cc @@ -43,7 +43,6 @@ #include "webkit/media/webmediaplayer_params.h" #include "webkit/media/webmediaplayer_util.h" #include "webkit/media/webmediasourceclient_impl.h" -#include "webkit/media/webvideoframe_impl.h" #include "webkit/plugins/ppapi/ppapi_webplugin_impl.h" using WebKit::WebCanvas; @@ -219,10 +218,8 @@ WebMediaPlayerImpl::WebMediaPlayerImpl( } WebMediaPlayerImpl::~WebMediaPlayerImpl() { -#ifdef REMOVE_WEBVIDEOFRAME SetVideoFrameProviderClient(NULL); GetClient()->setWebLayer(NULL); -#endif DCHECK(main_loop_->BelongsToCurrentThread()); Destroy(); @@ -669,24 +666,6 @@ unsigned WebMediaPlayerImpl::videoDecodedByteCount() const { return stats.video_bytes_decoded; } -#ifndef REMOVE_WEBVIDEOFRAME -WebKit::WebVideoFrame* WebMediaPlayerImpl::getCurrentFrame() { - base::AutoLock auto_lock(lock_); - if (current_frame_) - return new WebVideoFrameImpl(current_frame_); - return NULL; -} - -void WebMediaPlayerImpl::putCurrentFrame( - WebKit::WebVideoFrame* web_video_frame) { - if (!accelerated_compositing_reported_) { - accelerated_compositing_reported_ = true; - DCHECK(frame_->view()->isAcceleratedCompositingActive()); - UMA_HISTOGRAM_BOOLEAN("Media.AcceleratedCompositingActive", true); - } - delete web_video_frame; -} -#else void WebMediaPlayerImpl::SetVideoFrameProviderClient( cc::VideoFrameProvider::Client* client) { // This is called from both the main renderer thread and the compositor @@ -709,7 +688,6 @@ void WebMediaPlayerImpl::PutCurrentFrame( UMA_HISTOGRAM_BOOLEAN("Media.AcceleratedCompositingActive", true); } } -#endif bool WebMediaPlayerImpl::copyVideoTextureToPlatformTexture( WebKit::WebGraphicsContext3D* web_graphics_context, @@ -1001,14 +979,12 @@ void WebMediaPlayerImpl::OnPipelineBufferingState( case media::Pipeline::kHaveMetadata: SetReadyState(WebMediaPlayer::ReadyStateHaveMetadata); -#ifdef REMOVE_WEBVIDEOFRAME if (hasVideo() && GetClient()->needsWebLayerForVideo()) { DCHECK(!video_weblayer_); video_weblayer_.reset( new webkit::WebLayerImpl(cc::VideoLayer::Create(this))); GetClient()->setWebLayer(video_weblayer_.get()); } -#endif break; case media::Pipeline::kPrerollCompleted: SetReadyState(WebMediaPlayer::ReadyStateHaveEnoughData); @@ -1161,13 +1137,6 @@ void WebMediaPlayerImpl::SetReadyState(WebMediaPlayer::ReadyState state) { DCHECK(main_loop_->BelongsToCurrentThread()); DVLOG(1) << "SetReadyState: " << state; -#ifndef REMOVE_WEBVIDEOFRAME - if (ready_state_ == WebMediaPlayer::ReadyStateHaveNothing && - state >= WebMediaPlayer::ReadyStateHaveMetadata) { - if (!hasVideo()) - GetClient()->disableAcceleratedCompositing(); - } else -#endif if (state == WebMediaPlayer::ReadyStateHaveEnoughData && is_local_source_ && network_state_ == WebMediaPlayer::NetworkStateLoading) diff --git a/webkit/media/webmediaplayer_impl.h b/webkit/media/webmediaplayer_impl.h index 57afd6b..3e1799a 100644 --- a/webkit/media/webmediaplayer_impl.h +++ b/webkit/media/webmediaplayer_impl.h @@ -69,9 +69,7 @@ class WebMediaPlayerParams; class WebMediaPlayerImpl : public WebKit::WebMediaPlayer, -#ifdef REMOVE_WEBVIDEOFRAME public cc::VideoFrameProvider, -#endif public MessageLoop::DestructionObserver, public base::SupportsWeakPtr<WebMediaPlayerImpl> { public: @@ -149,17 +147,12 @@ class WebMediaPlayerImpl virtual unsigned audioDecodedByteCount() const; virtual unsigned videoDecodedByteCount() const; -#ifndef REMOVE_WEBVIDEOFRAME - virtual WebKit::WebVideoFrame* getCurrentFrame(); - virtual void putCurrentFrame(WebKit::WebVideoFrame* web_video_frame); -#else // 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; -#endif virtual bool copyVideoTextureToPlatformTexture( WebKit::WebGraphicsContext3D* web_graphics_context, diff --git a/webkit/media/webmediaplayer_ms.cc b/webkit/media/webmediaplayer_ms.cc index a79594e..1c0b1cb 100644 --- a/webkit/media/webmediaplayer_ms.cc +++ b/webkit/media/webmediaplayer_ms.cc @@ -16,7 +16,6 @@ #include "third_party/WebKit/Source/Platform/chromium/public/WebRect.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/Platform/chromium/public/WebVideoFrame.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayerClient.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" @@ -26,7 +25,6 @@ #include "webkit/media/video_frame_provider.h" #include "webkit/media/webmediaplayer_delegate.h" #include "webkit/media/webmediaplayer_util.h" -#include "webkit/media/webvideoframe_impl.h" using WebKit::WebCanvas; using WebKit::WebMediaPlayer; @@ -67,10 +65,8 @@ WebMediaPlayerMS::~WebMediaPlayerMS() { DVLOG(1) << "WebMediaPlayerMS::dtor"; DCHECK(thread_checker_.CalledOnValidThread()); -#ifdef REMOVE_WEBVIDEOFRAME SetVideoFrameProviderClient(NULL); GetClient()->setWebLayer(NULL); -#endif if (video_frame_provider_) { video_frame_provider_->Stop(); @@ -367,30 +363,6 @@ unsigned WebMediaPlayerMS::videoDecodedByteCount() const { return 0; } -#ifndef REMOVE_WEBVIDEOFRAME -WebKit::WebVideoFrame* WebMediaPlayerMS::getCurrentFrame() { - DVLOG(3) << "WebMediaPlayerMS::getCurrentFrame"; - base::AutoLock auto_lock(current_frame_lock_); - DCHECK(!pending_repaint_); - if (current_frame_.get()) { - pending_repaint_ = true; - current_frame_used_ = true; - return new webkit_media::WebVideoFrameImpl(current_frame_); - } - return NULL; -} - -void WebMediaPlayerMS::putCurrentFrame( - WebKit::WebVideoFrame* web_video_frame) { - DVLOG(3) << "WebMediaPlayerMS::putCurrentFrame"; - base::AutoLock auto_lock(current_frame_lock_); - DCHECK(pending_repaint_); - pending_repaint_ = false; - if (web_video_frame) { - delete web_video_frame; - } -} -#else void WebMediaPlayerMS::SetVideoFrameProviderClient( cc::VideoFrameProvider::Client* client) { // This is called from both the main renderer thread and the compositor @@ -417,7 +389,6 @@ void WebMediaPlayerMS::PutCurrentFrame( DCHECK(pending_repaint_); pending_repaint_ = false; } -#endif void WebMediaPlayerMS::OnFrameAvailable( const scoped_refptr<media::VideoFrame>& frame) { @@ -436,13 +407,11 @@ void WebMediaPlayerMS::OnFrameAvailable( SetReadyState(WebMediaPlayer::ReadyStateHaveEnoughData); GetClient()->sizeChanged(); -#ifdef REMOVE_WEBVIDEOFRAME if (video_frame_provider_ && GetClient()->needsWebLayerForVideo()) { video_weblayer_.reset( new webkit::WebLayerImpl(cc::VideoLayer::Create(this))); GetClient()->setWebLayer(video_weblayer_.get()); } -#endif } // Do not update |current_frame_| when paused. diff --git a/webkit/media/webmediaplayer_ms.h b/webkit/media/webmediaplayer_ms.h index 7fe508e..a6eea43 100644 --- a/webkit/media/webmediaplayer_ms.h +++ b/webkit/media/webmediaplayer_ms.h @@ -18,7 +18,6 @@ namespace WebKit { class WebFrame; class WebMediaPlayerClient; -class WebVideoFrame; } namespace media { @@ -52,9 +51,7 @@ class WebMediaPlayerDelegate; // WebKit client of this media player object. class WebMediaPlayerMS : public WebKit::WebMediaPlayer, -#ifdef REMOVE_WEBVIDEOFRAME public cc::VideoFrameProvider, -#endif public base::SupportsWeakPtr<WebMediaPlayerMS> { public: // Construct a WebMediaPlayerMS with reference to the client, and @@ -128,17 +125,12 @@ class WebMediaPlayerMS virtual unsigned audioDecodedByteCount() const OVERRIDE; virtual unsigned videoDecodedByteCount() const OVERRIDE; -#ifndef REMOVE_WEBVIDEOFRAME - virtual WebKit::WebVideoFrame* getCurrentFrame() OVERRIDE; - virtual void putCurrentFrame(WebKit::WebVideoFrame* web_video_frame) OVERRIDE; -#else // 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; -#endif private: // The callback for VideoFrameProvider to signal a new frame is available. diff --git a/webkit/media/webvideoframe_impl.cc b/webkit/media/webvideoframe_impl.cc deleted file mode 100644 index b1c1dc7..0000000 --- a/webkit/media/webvideoframe_impl.cc +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "media/base/video_frame.h" -#include "webkit/media/webvideoframe_impl.h" - -namespace webkit_media { - -WebVideoFrameImpl::WebVideoFrameImpl( - scoped_refptr<media::VideoFrame> video_frame) - : video_frame(video_frame) { -} - -WebVideoFrameImpl::~WebVideoFrameImpl() {} - -} // namespace webkit_media diff --git a/webkit/media/webvideoframe_impl.h b/webkit/media/webvideoframe_impl.h deleted file mode 100644 index 4680b5c..0000000 --- a/webkit/media/webvideoframe_impl.h +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef WEBKIT_MEDIA_WEBVIDEOFRAME_IMPL_H_ -#define WEBKIT_MEDIA_WEBVIDEOFRAME_IMPL_H_ - -#include "base/compiler_specific.h" -#include "base/memory/ref_counted.h" -#include "third_party/WebKit/Source/Platform/chromium/public/WebVideoFrame.h" - -namespace media { -class VideoFrame; -} - -namespace webkit_media { - -class WebVideoFrameImpl : public WebKit::WebVideoFrame { - public: - WebVideoFrameImpl(scoped_refptr<media::VideoFrame> video_frame); - virtual ~WebVideoFrameImpl(); - - scoped_refptr<media::VideoFrame> video_frame; - - private: - DISALLOW_COPY_AND_ASSIGN(WebVideoFrameImpl); -}; - -} // namespace webkit_media - -#endif // WEBKIT_MEDIA_WEBVIDEOFRAME_IMPL_H_ |