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

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

Issue 10837206: Rewrite media::Pipeline state transition machinery and simplify shutdown. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src
Patch Set: nits Created 8 years, 3 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 | « media/base/serial_runner.cc ('k') | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/media/webmediaplayer_impl.h" 5 #include "webkit/media/webmediaplayer_impl.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 822 matching lines...) Expand 10 before | Expand all | Expand 10 after
833 833
834 case media::PIPELINE_ERROR_NETWORK: 834 case media::PIPELINE_ERROR_NETWORK:
835 case media::PIPELINE_ERROR_READ: 835 case media::PIPELINE_ERROR_READ:
836 SetNetworkState(WebMediaPlayer::NetworkStateNetworkError); 836 SetNetworkState(WebMediaPlayer::NetworkStateNetworkError);
837 break; 837 break;
838 838
839 // TODO(vrk): Because OnPipelineInitialize() directly reports the 839 // TODO(vrk): Because OnPipelineInitialize() directly reports the
840 // NetworkStateFormatError instead of calling OnPipelineError(), I believe 840 // NetworkStateFormatError instead of calling OnPipelineError(), I believe
841 // this block can be deleted. Should look into it! (crbug.com/126070) 841 // this block can be deleted. Should look into it! (crbug.com/126070)
842 case media::PIPELINE_ERROR_INITIALIZATION_FAILED: 842 case media::PIPELINE_ERROR_INITIALIZATION_FAILED:
843 case media::PIPELINE_ERROR_REQUIRED_FILTER_MISSING:
844 case media::PIPELINE_ERROR_COULD_NOT_RENDER: 843 case media::PIPELINE_ERROR_COULD_NOT_RENDER:
845 case media::PIPELINE_ERROR_URL_NOT_FOUND: 844 case media::PIPELINE_ERROR_URL_NOT_FOUND:
846 case media::DEMUXER_ERROR_COULD_NOT_OPEN: 845 case media::DEMUXER_ERROR_COULD_NOT_OPEN:
847 case media::DEMUXER_ERROR_COULD_NOT_PARSE: 846 case media::DEMUXER_ERROR_COULD_NOT_PARSE:
848 case media::DEMUXER_ERROR_NO_SUPPORTED_STREAMS: 847 case media::DEMUXER_ERROR_NO_SUPPORTED_STREAMS:
849 case media::DECODER_ERROR_NOT_SUPPORTED: 848 case media::DECODER_ERROR_NOT_SUPPORTED:
850 SetNetworkState(WebMediaPlayer::NetworkStateFormatError); 849 SetNetworkState(WebMediaPlayer::NetworkStateFormatError);
851 break; 850 break;
852 851
853 case media::PIPELINE_ERROR_DECODE: 852 case media::PIPELINE_ERROR_DECODE:
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
1064 return audio_source_provider_; 1063 return audio_source_provider_;
1065 } 1064 }
1066 1065
1067 void WebMediaPlayerImpl::IncrementExternallyAllocatedMemory() { 1066 void WebMediaPlayerImpl::IncrementExternallyAllocatedMemory() {
1068 DCHECK_EQ(main_loop_, MessageLoop::current()); 1067 DCHECK_EQ(main_loop_, MessageLoop::current());
1069 incremented_externally_allocated_memory_ = true; 1068 incremented_externally_allocated_memory_ = true;
1070 v8::V8::AdjustAmountOfExternalAllocatedMemory(kPlayerExtraMemory); 1069 v8::V8::AdjustAmountOfExternalAllocatedMemory(kPlayerExtraMemory);
1071 } 1070 }
1072 1071
1073 } // namespace webkit_media 1072 } // namespace webkit_media
OLDNEW
« no previous file with comments | « media/base/serial_runner.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698