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

Side by Side Diff: media/filters/gpu_video_decoder.cc

Issue 148553003: Clean up histogram'd media enum max values. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix naming collision Created 6 years, 9 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
« no previous file with comments | « media/filters/audio_renderer_impl.cc ('k') | media/filters/stream_parser_factory.cc » ('j') | 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 "media/filters/gpu_video_decoder.h" 5 #include "media/filters/gpu_video_decoder.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 return os_large_video_support && hw_large_video_support; 129 return os_large_video_support && hw_large_video_support;
130 } 130 }
131 131
132 // Report |status| to UMA and run |cb| with it. This is super-specific to the 132 // Report |status| to UMA and run |cb| with it. This is super-specific to the
133 // UMA stat reported because the UMA_HISTOGRAM_ENUMERATION API requires a 133 // UMA stat reported because the UMA_HISTOGRAM_ENUMERATION API requires a
134 // callsite to always be called with the same stat name (can't parameterize it). 134 // callsite to always be called with the same stat name (can't parameterize it).
135 static void ReportGpuVideoDecoderInitializeStatusToUMAAndRunCB( 135 static void ReportGpuVideoDecoderInitializeStatusToUMAAndRunCB(
136 const PipelineStatusCB& cb, 136 const PipelineStatusCB& cb,
137 PipelineStatus status) { 137 PipelineStatus status) {
138 UMA_HISTOGRAM_ENUMERATION( 138 UMA_HISTOGRAM_ENUMERATION(
139 "Media.GpuVideoDecoderInitializeStatus", status, PIPELINE_STATUS_MAX); 139 "Media.GpuVideoDecoderInitializeStatus", status, PIPELINE_STATUS_MAX + 1);
140 cb.Run(status); 140 cb.Run(status);
141 } 141 }
142 142
143 void GpuVideoDecoder::Initialize(const VideoDecoderConfig& config, 143 void GpuVideoDecoder::Initialize(const VideoDecoderConfig& config,
144 const PipelineStatusCB& orig_status_cb) { 144 const PipelineStatusCB& orig_status_cb) {
145 DVLOG(3) << "Initialize()"; 145 DVLOG(3) << "Initialize()";
146 DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent(); 146 DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent();
147 DCHECK(config.IsValidConfig()); 147 DCHECK(config.IsValidConfig());
148 DCHECK(!config.is_encrypted()); 148 DCHECK(!config.is_encrypted());
149 149
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 return; 646 return;
647 } 647 }
648 } 648 }
649 649
650 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() 650 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent()
651 const { 651 const {
652 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread()); 652 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread());
653 } 653 }
654 654
655 } // namespace media 655 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/audio_renderer_impl.cc ('k') | media/filters/stream_parser_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698