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

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

Issue 2083933003: Implement AudioRendererMixerInput::CurrentThreadIsRenderingThread(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Code review. Rebase. Created 4 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 | « no previous file | media/base/audio_renderer_mixer.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 #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 30 matching lines...) Expand all
41 // must be given to both the functions. 41 // must be given to both the functions.
42 void AddErrorCallback(const base::Closure& error_cb); 42 void AddErrorCallback(const base::Closure& error_cb);
43 void RemoveErrorCallback(const base::Closure& error_cb); 43 void RemoveErrorCallback(const base::Closure& error_cb);
44 44
45 void set_pause_delay_for_testing(base::TimeDelta delay) { 45 void set_pause_delay_for_testing(base::TimeDelta delay) {
46 pause_delay_ = delay; 46 pause_delay_ = delay;
47 } 47 }
48 48
49 OutputDeviceInfo GetOutputDeviceInfo(); 49 OutputDeviceInfo GetOutputDeviceInfo();
50 50
51 // Returns true if called on rendering thread, otherwise false.
52 bool CurrentThreadIsRenderingThread();
53
51 private: 54 private:
52 // Maps input sample rate to the dedicated converter. 55 // Maps input sample rate to the dedicated converter.
53 using AudioConvertersMap = 56 using AudioConvertersMap =
54 std::map<int, std::unique_ptr<LoopbackAudioConverter>>; 57 std::map<int, std::unique_ptr<LoopbackAudioConverter>>;
55 58
56 // AudioRendererSink::RenderCallback implementation. 59 // AudioRendererSink::RenderCallback implementation.
57 int Render(AudioBus* audio_bus, 60 int Render(AudioBus* audio_bus,
58 uint32_t frames_delayed, 61 uint32_t frames_delayed,
59 uint32_t frames_skipped) override; 62 uint32_t frames_skipped) override;
60 void OnRenderError() override; 63 void OnRenderError() override;
(...skipping 29 matching lines...) Expand all
90 base::TimeDelta pause_delay_; 93 base::TimeDelta pause_delay_;
91 base::TimeTicks last_play_time_; 94 base::TimeTicks last_play_time_;
92 bool playing_; 95 bool playing_;
93 96
94 DISALLOW_COPY_AND_ASSIGN(AudioRendererMixer); 97 DISALLOW_COPY_AND_ASSIGN(AudioRendererMixer);
95 }; 98 };
96 99
97 } // namespace media 100 } // namespace media
98 101
99 #endif // MEDIA_BASE_AUDIO_RENDERER_MIXER_H_ 102 #endif // MEDIA_BASE_AUDIO_RENDERER_MIXER_H_
OLDNEW
« no previous file with comments | « no previous file | media/base/audio_renderer_mixer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698