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

Side by Side Diff: media/filters/audio_renderer_impl.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/ffmpeg/ffmpeg_common.cc ('k') | media/filters/gpu_video_decoder.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/audio_renderer_impl.h" 5 #include "media/filters/audio_renderer_impl.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
11 #include "base/bind.h" 11 #include "base/bind.h"
12 #include "base/callback.h" 12 #include "base/callback.h"
13 #include "base/callback_helpers.h" 13 #include "base/callback_helpers.h"
14 #include "base/logging.h" 14 #include "base/logging.h"
15 #include "base/metrics/histogram.h" 15 #include "base/metrics/histogram.h"
16 #include "base/single_thread_task_runner.h" 16 #include "base/single_thread_task_runner.h"
17 #include "media/base/audio_buffer.h" 17 #include "media/base/audio_buffer.h"
18 #include "media/base/audio_splicer.h" 18 #include "media/base/audio_splicer.h"
19 #include "media/base/bind_to_current_loop.h" 19 #include "media/base/bind_to_current_loop.h"
20 #include "media/base/demuxer_stream.h" 20 #include "media/base/demuxer_stream.h"
21 #include "media/filters/decrypting_demuxer_stream.h" 21 #include "media/filters/decrypting_demuxer_stream.h"
22 22
23 namespace media { 23 namespace media {
24 24
25 namespace { 25 namespace {
26 26
27 enum AudioRendererEvent { 27 enum AudioRendererEvent {
28 INITIALIZED, 28 INITIALIZED,
29 RENDER_ERROR, 29 RENDER_ERROR,
30 MAX_EVENTS 30 RENDER_EVENT_MAX = RENDER_ERROR,
31 }; 31 };
32 32
33 void HistogramRendererEvent(AudioRendererEvent event) { 33 void HistogramRendererEvent(AudioRendererEvent event) {
34 UMA_HISTOGRAM_ENUMERATION("Media.AudioRendererEvents", event, MAX_EVENTS); 34 UMA_HISTOGRAM_ENUMERATION(
35 "Media.AudioRendererEvents", event, RENDER_EVENT_MAX + 1);
35 } 36 }
36 37
37 } // namespace 38 } // namespace
38 39
39 AudioRendererImpl::AudioRendererImpl( 40 AudioRendererImpl::AudioRendererImpl(
40 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, 41 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
41 media::AudioRendererSink* sink, 42 media::AudioRendererSink* sink,
42 ScopedVector<AudioDecoder> decoders, 43 ScopedVector<AudioDecoder> decoders,
43 const SetDecryptorReadyCB& set_decryptor_ready_cb) 44 const SetDecryptorReadyCB& set_decryptor_ready_cb)
44 : task_runner_(task_runner), 45 : task_runner_(task_runner),
(...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after
741 } 742 }
742 } 743 }
743 744
744 void AudioRendererImpl::ChangeState_Locked(State new_state) { 745 void AudioRendererImpl::ChangeState_Locked(State new_state) {
745 DVLOG(1) << __FUNCTION__ << " : " << state_ << " -> " << new_state; 746 DVLOG(1) << __FUNCTION__ << " : " << state_ << " -> " << new_state;
746 lock_.AssertAcquired(); 747 lock_.AssertAcquired();
747 state_ = new_state; 748 state_ = new_state;
748 } 749 }
749 750
750 } // namespace media 751 } // namespace media
OLDNEW
« no previous file with comments | « media/ffmpeg/ffmpeg_common.cc ('k') | media/filters/gpu_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698