| OLD | NEW |
| 1 // Copyright (c) 2008-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2008-2009 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/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "googleurl/src/gurl.h" | 8 #include "googleurl/src/gurl.h" |
| 9 #include "media/base/media_format.h" | 9 #include "media/base/media_format.h" |
| 10 #include "media/filters/ffmpeg_audio_decoder.h" | 10 #include "media/filters/ffmpeg_audio_decoder.h" |
| (...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 476 break; | 476 break; |
| 477 | 477 |
| 478 case media::PIPELINE_ERROR_DECODE: | 478 case media::PIPELINE_ERROR_DECODE: |
| 479 case media::PIPELINE_ERROR_ABORT: | 479 case media::PIPELINE_ERROR_ABORT: |
| 480 case media::PIPELINE_ERROR_OUT_OF_MEMORY: | 480 case media::PIPELINE_ERROR_OUT_OF_MEMORY: |
| 481 case media::PIPELINE_ERROR_AUDIO_HARDWARE: | 481 case media::PIPELINE_ERROR_AUDIO_HARDWARE: |
| 482 // Decode error. | 482 // Decode error. |
| 483 SetNetworkState(WebMediaPlayer::DecodeError); | 483 SetNetworkState(WebMediaPlayer::DecodeError); |
| 484 break; | 484 break; |
| 485 } | 485 } |
| 486 |
| 487 // Repaint to trigger UI update. |
| 488 Repaint(); |
| 486 } | 489 } |
| 487 | 490 |
| 488 void WebMediaPlayerImpl::SetNetworkState( | 491 void WebMediaPlayerImpl::SetNetworkState( |
| 489 WebKit::WebMediaPlayer::NetworkState state) { | 492 WebKit::WebMediaPlayer::NetworkState state) { |
| 490 DCHECK(MessageLoop::current() == main_loop_); | 493 DCHECK(MessageLoop::current() == main_loop_); |
| 491 if (network_state_ != state) { | 494 if (network_state_ != state) { |
| 492 network_state_ = state; | 495 network_state_ = state; |
| 493 GetClient()->networkStateChanged(); | 496 GetClient()->networkStateChanged(); |
| 494 } | 497 } |
| 495 } | 498 } |
| (...skipping 23 matching lines...) Expand all Loading... |
| 519 } | 522 } |
| 520 } | 523 } |
| 521 | 524 |
| 522 WebKit::WebMediaPlayerClient* WebMediaPlayerImpl::GetClient() { | 525 WebKit::WebMediaPlayerClient* WebMediaPlayerImpl::GetClient() { |
| 523 DCHECK(MessageLoop::current() == main_loop_); | 526 DCHECK(MessageLoop::current() == main_loop_); |
| 524 DCHECK(client_); | 527 DCHECK(client_); |
| 525 return client_; | 528 return client_; |
| 526 } | 529 } |
| 527 | 530 |
| 528 } // namespace webkit_glue | 531 } // namespace webkit_glue |
| OLD | NEW |