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

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

Issue 10582026: Add UMA reporting for GpuVideoDecoder::Initialize status. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « media/media.gyp ('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 809 matching lines...) Expand 10 before | Expand all | Expand 10 after
820 OnPipelineError(status); 820 OnPipelineError(status);
821 return; 821 return;
822 } 822 }
823 GetClient()->timeChanged(); 823 GetClient()->timeChanged();
824 } 824 }
825 825
826 void WebMediaPlayerImpl::OnPipelineError(PipelineStatus error) { 826 void WebMediaPlayerImpl::OnPipelineError(PipelineStatus error) {
827 DCHECK_EQ(main_loop_, MessageLoop::current()); 827 DCHECK_EQ(main_loop_, MessageLoop::current());
828 switch (error) { 828 switch (error) {
829 case media::PIPELINE_OK: 829 case media::PIPELINE_OK:
830 LOG(DFATAL) << "PIPELINE_OK isn't an error!"; 830 NOTREACHED() << "PIPELINE_OK isn't an error!";
831 break; 831 break;
832 832
833 case media::PIPELINE_ERROR_NETWORK: 833 case media::PIPELINE_ERROR_NETWORK:
834 case media::PIPELINE_ERROR_READ: 834 case media::PIPELINE_ERROR_READ:
835 SetNetworkState(WebMediaPlayer::NetworkStateNetworkError); 835 SetNetworkState(WebMediaPlayer::NetworkStateNetworkError);
836 break; 836 break;
837 837
838 case media::PIPELINE_ERROR_INITIALIZATION_FAILED: 838 case media::PIPELINE_ERROR_INITIALIZATION_FAILED:
839 case media::PIPELINE_ERROR_REQUIRED_FILTER_MISSING: 839 case media::PIPELINE_ERROR_REQUIRED_FILTER_MISSING:
840 case media::PIPELINE_ERROR_COULD_NOT_RENDER: 840 case media::PIPELINE_ERROR_COULD_NOT_RENDER:
(...skipping 11 matching lines...) Expand all
852 case media::PIPELINE_ERROR_INVALID_STATE: 852 case media::PIPELINE_ERROR_INVALID_STATE:
853 SetNetworkState(WebMediaPlayer::NetworkStateDecodeError); 853 SetNetworkState(WebMediaPlayer::NetworkStateDecodeError);
854 break; 854 break;
855 855
856 case media::PIPELINE_ERROR_DECRYPT: 856 case media::PIPELINE_ERROR_DECRYPT:
857 // Decrypt error. 857 // Decrypt error.
858 // TODO(xhwang): Change to use NetworkStateDecryptError once it's added in 858 // TODO(xhwang): Change to use NetworkStateDecryptError once it's added in
859 // Webkit (see http://crbug.com/124486). 859 // Webkit (see http://crbug.com/124486).
860 SetNetworkState(WebMediaPlayer::NetworkStateDecodeError); 860 SetNetworkState(WebMediaPlayer::NetworkStateDecodeError);
861 break; 861 break;
862
863 case media::PIPELINE_STATUS_MAX:
864 NOTREACHED() << "PIPELINE_STATUS_MAX isn't a real error!";
865 break;
862 } 866 }
863 867
864 // Repaint to trigger UI update. 868 // Repaint to trigger UI update.
865 Repaint(); 869 Repaint();
866 } 870 }
867 871
868 void WebMediaPlayerImpl::OnDemuxerOpened() { 872 void WebMediaPlayerImpl::OnDemuxerOpened() {
869 DCHECK_EQ(main_loop_, MessageLoop::current()); 873 DCHECK_EQ(main_loop_, MessageLoop::current());
870 874
871 GetClient()->sourceOpened(); 875 GetClient()->sourceOpened();
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
1021 return audio_source_provider_; 1025 return audio_source_provider_;
1022 } 1026 }
1023 1027
1024 void WebMediaPlayerImpl::IncrementExternallyAllocatedMemory() { 1028 void WebMediaPlayerImpl::IncrementExternallyAllocatedMemory() {
1025 DCHECK_EQ(main_loop_, MessageLoop::current()); 1029 DCHECK_EQ(main_loop_, MessageLoop::current());
1026 incremented_externally_allocated_memory_ = true; 1030 incremented_externally_allocated_memory_ = true;
1027 v8::V8::AdjustAmountOfExternalAllocatedMemory(kPlayerExtraMemory); 1031 v8::V8::AdjustAmountOfExternalAllocatedMemory(kPlayerExtraMemory);
1028 } 1032 }
1029 1033
1030 } // namespace webkit_media 1034 } // namespace webkit_media
OLDNEW
« no previous file with comments | « media/media.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698