diff options
author | fischman@chromium.org <fischman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-17 22:03:12 +0000 |
---|---|---|
committer | fischman@chromium.org <fischman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-17 22:03:12 +0000 |
commit | ea431e54446816d680168b7a603fc50663072945 (patch) | |
tree | 04aa2dd64a5e7f7e24cef4bfc49f6134c8a9f74c /webkit/glue/webmediaplayer_impl.cc | |
parent | 5b8874a6ca3399ab8950b26b7ddd1f52acc189f1 (diff) | |
download | chromium_src-ea431e54446816d680168b7a603fc50663072945.zip chromium_src-ea431e54446816d680168b7a603fc50663072945.tar.gz chromium_src-ea431e54446816d680168b7a603fc50663072945.tar.bz2 |
Use PipelineStatusNotification instead of a condvar for pipeline stopping.
BUG=none
TEST={,http/tests/}media layouttests pass.
Review URL: http://codereview.chromium.org/6688014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78611 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webmediaplayer_impl.cc')
-rw-r--r-- | webkit/glue/webmediaplayer_impl.cc | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/webkit/glue/webmediaplayer_impl.cc b/webkit/glue/webmediaplayer_impl.cc index 61bb454..7ac8e76 100644 --- a/webkit/glue/webmediaplayer_impl.cc +++ b/webkit/glue/webmediaplayer_impl.cc @@ -281,8 +281,7 @@ WebMediaPlayerImpl::WebMediaPlayerImpl( seeking_(false), playback_rate_(0.0f), client_(client), - proxy_(NULL), - pipeline_stopped_(false, false) { + proxy_(NULL) { // Saves the current message loop. DCHECK(!main_loop_); main_loop_ = MessageLoop::current(); @@ -884,9 +883,9 @@ void WebMediaPlayerImpl::Destroy() { // Make sure to kill the pipeline so there's no more media threads running. // Note: stopping the pipeline might block for a long time. if (pipeline_) { - pipeline_->Stop(NewCallback(this, - &WebMediaPlayerImpl::PipelineStoppedCallback)); - pipeline_stopped_.Wait(); + media::PipelineStatusNotification note; + pipeline_->Stop(note.Callback()); + note.Wait(); } message_loop_factory_.reset(); @@ -899,10 +898,6 @@ void WebMediaPlayerImpl::Destroy() { } } -void WebMediaPlayerImpl::PipelineStoppedCallback(PipelineStatus status) { - pipeline_stopped_.Signal(); -} - WebKit::WebMediaPlayerClient* WebMediaPlayerImpl::GetClient() { DCHECK(MessageLoop::current() == main_loop_); DCHECK(client_); |