summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webmediaplayer_impl.h
diff options
context:
space:
mode:
authorvrk@google.com <vrk@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-22 19:57:36 +0000
committervrk@google.com <vrk@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-22 19:57:36 +0000
commit5b5bb9d530c0085a5b8becad2a2302737e215890 (patch)
tree4d15db1e004de0d17c9baeaa73ec13900a43f82f /webkit/glue/webmediaplayer_impl.h
parent11c4c816a056ad651aefc241446b77f4e57cebd8 (diff)
downloadchromium_src-5b5bb9d530c0085a5b8becad2a2302737e215890.zip
chromium_src-5b5bb9d530c0085a5b8becad2a2302737e215890.tar.gz
chromium_src-5b5bb9d530c0085a5b8becad2a2302737e215890.tar.bz2
Adding Abort() to DataSource to wake up hanging Read()
This change adds an Abort() method to BufferedDataSource, which will wake up a blocking read if one exists. When WebMediaPlayerImpl being destroyed, it now tells BufferedDataSource to abort before it tells the pipeline to stop, so the pipeline will not hang while waiting for a never-ending Read() to return. BUG=54465 TEST=test_shell_tests Review URL: http://codereview.chromium.org/4009002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63548 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webmediaplayer_impl.h')
-rw-r--r--webkit/glue/webmediaplayer_impl.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/webkit/glue/webmediaplayer_impl.h b/webkit/glue/webmediaplayer_impl.h
index eefe1a9..30a8dcb 100644
--- a/webkit/glue/webmediaplayer_impl.h
+++ b/webkit/glue/webmediaplayer_impl.h
@@ -74,6 +74,8 @@ class FilterFactoryCollection;
namespace webkit_glue {
+class MediaResourceLoaderBridgeFactory;
+class WebDataSource;
class WebVideoRenderer;
class WebVideoRendererFactoryFactory;
@@ -96,6 +98,7 @@ class WebMediaPlayerImpl : public WebKit::WebMediaPlayer,
// Public methods called from the video renderer.
void Repaint();
void SetVideoRenderer(WebVideoRenderer* video_renderer);
+ void SetDataSource(WebDataSource* data_source);
// Public methods called from WebMediaPlayerImpl.
void Paint(skia::PlatformCanvas* canvas, const gfx::Rect& dest_rect);
@@ -103,6 +106,7 @@ class WebMediaPlayerImpl : public WebKit::WebMediaPlayer,
void Detach();
void GetCurrentFrame(scoped_refptr<media::VideoFrame>* frame_out);
void PutCurrentFrame(scoped_refptr<media::VideoFrame> frame);
+ void AbortDataSource();
// Public methods called from the pipeline via callback issued by
// WebMediaPlayerImpl.
@@ -141,6 +145,7 @@ class WebMediaPlayerImpl : public WebKit::WebMediaPlayer,
// The render message loop where WebKit lives.
MessageLoop* render_loop_;
WebMediaPlayerImpl* webmediaplayer_;
+ scoped_refptr<WebDataSource> data_source_;
scoped_refptr<WebVideoRenderer> video_renderer_;
Lock lock_;
@@ -172,6 +177,8 @@ class WebMediaPlayerImpl : public WebKit::WebMediaPlayer,
// a subclass of WebVideoRenderer. Is deleted by WebMediaPlayerImpl.
WebMediaPlayerImpl(WebKit::WebMediaPlayerClient* client,
media::FilterFactoryCollection* factory,
+ MediaResourceLoaderBridgeFactory* bridge_factory,
+ bool use_simple_data_source,
WebVideoRendererFactoryFactory* video_renderer_factory);
virtual ~WebMediaPlayerImpl();