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

Side by Side Diff: media/base/audio_renderer_mixer.h

Issue 2466463005: Support (E)AC3 passthrough
Patch Set: Improve CastMediaClient::IsSupportedPassthroughAudio() Created 4 years, 1 month 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
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 #ifndef MEDIA_BASE_AUDIO_RENDERER_MIXER_H_ 5 #ifndef MEDIA_BASE_AUDIO_RENDERER_MIXER_H_
6 #define MEDIA_BASE_AUDIO_RENDERER_MIXER_H_ 6 #define MEDIA_BASE_AUDIO_RENDERER_MIXER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 // Output sink for this mixer. 79 // Output sink for this mixer.
80 const scoped_refptr<AudioRendererSink> audio_sink_; 80 const scoped_refptr<AudioRendererSink> audio_sink_;
81 81
82 // ---------------[ All variables below protected by |lock_| ]--------------- 82 // ---------------[ All variables below protected by |lock_| ]---------------
83 base::Lock lock_; 83 base::Lock lock_;
84 84
85 // List of error callbacks used by this mixer. 85 // List of error callbacks used by this mixer.
86 typedef std::list<base::Closure> ErrorCallbackList; 86 typedef std::list<base::Closure> ErrorCallbackList;
87 ErrorCallbackList error_callbacks_; 87 ErrorCallbackList error_callbacks_;
88 88
89 AudioConverter::InputCallback* raw_input_;
90
89 // Each of these converters mixes inputs with a given sample rate and 91 // Each of these converters mixes inputs with a given sample rate and
90 // resamples them to the output sample rate. Inputs not reqiuring resampling 92 // resamples them to the output sample rate. Inputs not reqiuring resampling
91 // go directly to |master_converter_|. 93 // go directly to |master_converter_|.
92 AudioConvertersMap converters_; 94 AudioConvertersMap converters_;
93 95
94 // Master converter which mixes all the outputs from |converters_| as well as 96 // Master converter which mixes all the outputs from |converters_| as well as
95 // mixer inputs that are in the output sample rate. 97 // mixer inputs that are in the output sample rate.
96 AudioConverter master_converter_; 98 AudioConverter master_converter_;
97 99
98 // Handles physical stream pause when no inputs are playing. For latency 100 // Handles physical stream pause when no inputs are playing. For latency
99 // reasons we don't want to immediately pause the physical stream. 101 // reasons we don't want to immediately pause the physical stream.
100 base::TimeDelta pause_delay_; 102 base::TimeDelta pause_delay_;
101 base::TimeTicks last_play_time_; 103 base::TimeTicks last_play_time_;
102 bool playing_; 104 bool playing_;
103 105
104 // Tracks the maximum number of simultaneous mixer inputs and logs it into 106 // Tracks the maximum number of simultaneous mixer inputs and logs it into
105 // UMA histogram upon the destruction. 107 // UMA histogram upon the destruction.
106 std::unique_ptr<UMAMaxValueTracker> input_count_tracker_; 108 std::unique_ptr<UMAMaxValueTracker> input_count_tracker_;
107 109
108 DISALLOW_COPY_AND_ASSIGN(AudioRendererMixer); 110 DISALLOW_COPY_AND_ASSIGN(AudioRendererMixer);
109 }; 111 };
110 112
111 } // namespace media 113 } // namespace media
112 114
113 #endif // MEDIA_BASE_AUDIO_RENDERER_MIXER_H_ 115 #endif // MEDIA_BASE_AUDIO_RENDERER_MIXER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698