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

Side by Side Diff: media/base/audio_renderer_mixer_input.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 | « media/base/audio_renderer_mixer.cc ('k') | media/base/audio_renderer_mixer_input.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 // THREAD SAFETY 5 // THREAD SAFETY
6 // 6 //
7 // This class is generally not thread safe. Callers should ensure thread safety. 7 // This class is generally not thread safe. Callers should ensure thread safety.
8 // For instance, the |sink_lock_| in WebAudioSourceProvider synchronizes access 8 // For instance, the |sink_lock_| in WebAudioSourceProvider synchronizes access
9 // to this object across the main thread (for WebAudio APIs) and the 9 // to this object across the main thread (for WebAudio APIs) and the
10 // media thread (for HTMLMediaElement APIs). 10 // media thread (for HTMLMediaElement APIs).
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 void Stop() override; 44 void Stop() override;
45 void Play() override; 45 void Play() override;
46 void Pause() override; 46 void Pause() override;
47 bool SetVolume(double volume) override; 47 bool SetVolume(double volume) override;
48 OutputDeviceInfo GetOutputDeviceInfo() override; 48 OutputDeviceInfo GetOutputDeviceInfo() override;
49 void Initialize(const AudioParameters& params, 49 void Initialize(const AudioParameters& params,
50 AudioRendererSink::RenderCallback* renderer) override; 50 AudioRendererSink::RenderCallback* renderer) override;
51 void SwitchOutputDevice(const std::string& device_id, 51 void SwitchOutputDevice(const std::string& device_id,
52 const url::Origin& security_origin, 52 const url::Origin& security_origin,
53 const OutputDeviceStatusCB& callback) override; 53 const OutputDeviceStatusCB& callback) override;
54 // This is expected to be called on the audio rendering thread. The caller
55 // must ensure that this input has been added to a mixer before calling the
56 // function, and that it is not removed from the mixer before this function
57 // returns.
54 bool CurrentThreadIsRenderingThread() override; 58 bool CurrentThreadIsRenderingThread() override;
55 59
56 // Called by AudioRendererMixer when an error occurs. 60 // Called by AudioRendererMixer when an error occurs.
57 void OnRenderError(); 61 void OnRenderError();
58 62
59 protected: 63 protected:
60 ~AudioRendererMixerInput() override; 64 ~AudioRendererMixerInput() override;
61 65
62 private: 66 private:
63 friend class AudioRendererMixerInputTest; 67 friend class AudioRendererMixerInputTest;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 OutputDeviceStatusCB pending_switch_callback_; 102 OutputDeviceStatusCB pending_switch_callback_;
99 std::string pending_switch_device_id_; 103 std::string pending_switch_device_id_;
100 url::Origin pending_switch_security_origin_; 104 url::Origin pending_switch_security_origin_;
101 105
102 DISALLOW_COPY_AND_ASSIGN(AudioRendererMixerInput); 106 DISALLOW_COPY_AND_ASSIGN(AudioRendererMixerInput);
103 }; 107 };
104 108
105 } // namespace media 109 } // namespace media
106 110
107 #endif // MEDIA_BASE_AUDIO_RENDERER_MIXER_INPUT_H_ 111 #endif // MEDIA_BASE_AUDIO_RENDERER_MIXER_INPUT_H_
OLDNEW
« no previous file with comments | « media/base/audio_renderer_mixer.cc ('k') | media/base/audio_renderer_mixer_input.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698