| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |