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

Side by Side Diff: media/renderers/audio_renderer_impl.h

Issue 2752323002: Support Opus Ambisonics playback (Closed)
Patch Set: another fix for unreliable ffmpeg channels vs layout Created 3 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
« no previous file with comments | « media/formats/webm/webm_audio_client.cc ('k') | media/renderers/audio_renderer_impl.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 // Audio rendering unit utilizing an AudioRendererSink to output data. 5 // Audio rendering unit utilizing an AudioRendererSink to output data.
6 // 6 //
7 // This class lives inside three threads during it's lifetime, namely: 7 // This class lives inside three threads during it's lifetime, namely:
8 // 1. Render thread 8 // 1. Render thread
9 // Where the object is created. 9 // Where the object is created.
10 // 2. Media thread (provided via constructor) 10 // 2. Media thread (provided via constructor)
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 // sample rate changes due to implicit AAC configuration change. 241 // sample rate changes due to implicit AAC configuration change.
242 int last_decoded_sample_rate_; 242 int last_decoded_sample_rate_;
243 243
244 // Similar to |last_decoded_sample_rate_|, used to configure the channel mask 244 // Similar to |last_decoded_sample_rate_|, used to configure the channel mask
245 // given to the |algorithm_| for efficient playback rate changes. 245 // given to the |algorithm_| for efficient playback rate changes.
246 ChannelLayout last_decoded_channel_layout_; 246 ChannelLayout last_decoded_channel_layout_;
247 247
248 // Whether the stream is possibly encrypted. 248 // Whether the stream is possibly encrypted.
249 bool is_encrypted_; 249 bool is_encrypted_;
250 250
251 // Similar to |last_decoded_channel_layout_|, used to configure the channel
252 // mask given to the |algorithm_| for efficient playback rate changes.
253 int last_decoded_channels_;
254
251 // After Initialize() has completed, all variables below must be accessed 255 // After Initialize() has completed, all variables below must be accessed
252 // under |lock_|. ------------------------------------------------------------ 256 // under |lock_|. ------------------------------------------------------------
253 base::Lock lock_; 257 base::Lock lock_;
254 258
255 // Algorithm for scaling audio. 259 // Algorithm for scaling audio.
256 double playback_rate_; 260 double playback_rate_;
257 std::unique_ptr<AudioRendererAlgorithm> algorithm_; 261 std::unique_ptr<AudioRendererAlgorithm> algorithm_;
258 262
259 // Simple state tracking variable. 263 // Simple state tracking variable.
260 State state_; 264 State state_;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 312
309 // NOTE: Weak pointers must be invalidated before all other member variables. 313 // NOTE: Weak pointers must be invalidated before all other member variables.
310 base::WeakPtrFactory<AudioRendererImpl> weak_factory_; 314 base::WeakPtrFactory<AudioRendererImpl> weak_factory_;
311 315
312 DISALLOW_COPY_AND_ASSIGN(AudioRendererImpl); 316 DISALLOW_COPY_AND_ASSIGN(AudioRendererImpl);
313 }; 317 };
314 318
315 } // namespace media 319 } // namespace media
316 320
317 #endif // MEDIA_RENDERERS_AUDIO_RENDERER_IMPL_H_ 321 #endif // MEDIA_RENDERERS_AUDIO_RENDERER_IMPL_H_
OLDNEW
« no previous file with comments | « media/formats/webm/webm_audio_client.cc ('k') | media/renderers/audio_renderer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698