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

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

Issue 159669: Change to WebMediaPlayerImpl incorrectly translated some pipeline errors.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 DCHECK(MessageLoop::current() == main_loop_); 425 DCHECK(MessageLoop::current() == main_loop_);
426 switch (pipeline_->GetError()) { 426 switch (pipeline_->GetError()) {
427 case media::PIPELINE_OK: 427 case media::PIPELINE_OK:
428 case media::PIPELINE_STOPPING: 428 case media::PIPELINE_STOPPING:
429 NOTREACHED() << "We shouldn't get called with these non-errors"; 429 NOTREACHED() << "We shouldn't get called with these non-errors";
430 break; 430 break;
431 431
432 case media::PIPELINE_ERROR_INITIALIZATION_FAILED: 432 case media::PIPELINE_ERROR_INITIALIZATION_FAILED:
433 case media::PIPELINE_ERROR_REQUIRED_FILTER_MISSING: 433 case media::PIPELINE_ERROR_REQUIRED_FILTER_MISSING:
434 case media::PIPELINE_ERROR_COULD_NOT_RENDER: 434 case media::PIPELINE_ERROR_COULD_NOT_RENDER:
435 case media::PIPELINE_ERROR_URL_NOT_FOUND:
436 case media::PIPELINE_ERROR_NETWORK:
437 case media::PIPELINE_ERROR_READ:
438 case media::DEMUXER_ERROR_COULD_NOT_OPEN:
439 case media::DEMUXER_ERROR_COULD_NOT_PARSE:
440 case media::DEMUXER_ERROR_NO_SUPPORTED_STREAMS:
441 case media::DEMUXER_ERROR_COULD_NOT_CREATE_THREAD:
435 // Format error. 442 // Format error.
436 SetNetworkState(WebMediaPlayer::FormatError); 443 SetNetworkState(WebMediaPlayer::FormatError);
437 break; 444 break;
438 445
439 case media::PIPELINE_ERROR_URL_NOT_FOUND:
440 case media::PIPELINE_ERROR_NETWORK:
441 case media::PIPELINE_ERROR_DECODE: 446 case media::PIPELINE_ERROR_DECODE:
442 case media::PIPELINE_ERROR_ABORT: 447 case media::PIPELINE_ERROR_ABORT:
443 case media::PIPELINE_ERROR_OUT_OF_MEMORY: 448 case media::PIPELINE_ERROR_OUT_OF_MEMORY:
444 case media::PIPELINE_ERROR_READ:
445 case media::PIPELINE_ERROR_AUDIO_HARDWARE: 449 case media::PIPELINE_ERROR_AUDIO_HARDWARE:
446 case media::DEMUXER_ERROR_COULD_NOT_OPEN:
447 case media::DEMUXER_ERROR_COULD_NOT_PARSE:
448 case media::DEMUXER_ERROR_NO_SUPPORTED_STREAMS:
449 case media::DEMUXER_ERROR_COULD_NOT_CREATE_THREAD:
450 // Decode error. 450 // Decode error.
451 SetNetworkState(WebMediaPlayer::DecodeError); 451 SetNetworkState(WebMediaPlayer::DecodeError);
452 break; 452 break;
453 } 453 }
454 } 454 }
455 455
456 void WebMediaPlayerImpl::SetNetworkState( 456 void WebMediaPlayerImpl::SetNetworkState(
457 WebKit::WebMediaPlayer::NetworkState state) { 457 WebKit::WebMediaPlayer::NetworkState state) {
458 DCHECK(MessageLoop::current() == main_loop_); 458 DCHECK(MessageLoop::current() == main_loop_);
459 if (network_state_ != state) { 459 if (network_state_ != state) {
(...skipping 27 matching lines...) Expand all
487 } 487 }
488 } 488 }
489 489
490 WebKit::WebMediaPlayerClient* WebMediaPlayerImpl::GetClient() { 490 WebKit::WebMediaPlayerClient* WebMediaPlayerImpl::GetClient() {
491 DCHECK(MessageLoop::current() == main_loop_); 491 DCHECK(MessageLoop::current() == main_loop_);
492 DCHECK(client_); 492 DCHECK(client_);
493 return client_; 493 return client_;
494 } 494 }
495 495
496 } // namespace webkit_glue 496 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698