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

Side by Side Diff: webkit/glue/webmediaplayer_impl.cc

Issue 2101015: Change MediaFilter::Stop() to accept a callback so that Stop() is asynchronous. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Revert filter changes. Going to make that another patch. Created 10 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "webkit/glue/webmediaplayer_impl.h" 5 #include "webkit/glue/webmediaplayer_impl.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "media/base/limits.h" 9 #include "media/base/limits.h"
10 #include "media/base/media_format.h" 10 #include "media/base/media_format.h"
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 DCHECK(MessageLoop::current() == main_loop_); 627 DCHECK(MessageLoop::current() == main_loop_);
628 if (pipeline_->GetError() == media::PIPELINE_OK) { 628 if (pipeline_->GetError() == media::PIPELINE_OK) {
629 GetClient()->timeChanged(); 629 GetClient()->timeChanged();
630 } 630 }
631 } 631 }
632 632
633 void WebMediaPlayerImpl::OnPipelineError() { 633 void WebMediaPlayerImpl::OnPipelineError() {
634 DCHECK(MessageLoop::current() == main_loop_); 634 DCHECK(MessageLoop::current() == main_loop_);
635 switch (pipeline_->GetError()) { 635 switch (pipeline_->GetError()) {
636 case media::PIPELINE_OK: 636 case media::PIPELINE_OK:
637 case media::PIPELINE_STOPPING:
638 NOTREACHED() << "We shouldn't get called with these non-errors";
639 break;
640
641 case media::PIPELINE_ERROR_INITIALIZATION_FAILED: 637 case media::PIPELINE_ERROR_INITIALIZATION_FAILED:
642 case media::PIPELINE_ERROR_REQUIRED_FILTER_MISSING: 638 case media::PIPELINE_ERROR_REQUIRED_FILTER_MISSING:
643 case media::PIPELINE_ERROR_COULD_NOT_RENDER: 639 case media::PIPELINE_ERROR_COULD_NOT_RENDER:
644 case media::PIPELINE_ERROR_URL_NOT_FOUND: 640 case media::PIPELINE_ERROR_URL_NOT_FOUND:
645 case media::PIPELINE_ERROR_NETWORK: 641 case media::PIPELINE_ERROR_NETWORK:
646 case media::PIPELINE_ERROR_READ: 642 case media::PIPELINE_ERROR_READ:
647 case media::DEMUXER_ERROR_COULD_NOT_OPEN: 643 case media::DEMUXER_ERROR_COULD_NOT_OPEN:
648 case media::DEMUXER_ERROR_COULD_NOT_PARSE: 644 case media::DEMUXER_ERROR_COULD_NOT_PARSE:
649 case media::DEMUXER_ERROR_NO_SUPPORTED_STREAMS: 645 case media::DEMUXER_ERROR_NO_SUPPORTED_STREAMS:
650 case media::DEMUXER_ERROR_COULD_NOT_CREATE_THREAD: 646 case media::DEMUXER_ERROR_COULD_NOT_CREATE_THREAD:
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
707 } 703 }
708 } 704 }
709 705
710 WebKit::WebMediaPlayerClient* WebMediaPlayerImpl::GetClient() { 706 WebKit::WebMediaPlayerClient* WebMediaPlayerImpl::GetClient() {
711 DCHECK(MessageLoop::current() == main_loop_); 707 DCHECK(MessageLoop::current() == main_loop_);
712 DCHECK(client_); 708 DCHECK(client_);
713 return client_; 709 return client_;
714 } 710 }
715 711
716 } // namespace webkit_glue 712 } // namespace webkit_glue
OLDNEW
« media/base/pipeline_impl.cc ('K') | « media/base/pipeline_impl_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698