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

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

Issue 2038053002: Change audio render thread checking to use new AudioRendererSink::BelongsToRendererThread() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Using the new BelongsTo...() function for thread checking. 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
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 bool BelongsToRenderingThread() override;
54 55
55 // Called by AudioRendererMixer when an error occurs. 56 // Called by AudioRendererMixer when an error occurs.
56 void OnRenderError(); 57 void OnRenderError();
57 58
58 protected: 59 protected:
59 ~AudioRendererMixerInput() override; 60 ~AudioRendererMixerInput() override;
60 61
61 private: 62 private:
62 friend class AudioRendererMixerInputTest; 63 friend class AudioRendererMixerInputTest;
63 64
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 OutputDeviceStatusCB pending_switch_callback_; 98 OutputDeviceStatusCB pending_switch_callback_;
98 std::string pending_switch_device_id_; 99 std::string pending_switch_device_id_;
99 url::Origin pending_switch_security_origin_; 100 url::Origin pending_switch_security_origin_;
100 101
101 DISALLOW_COPY_AND_ASSIGN(AudioRendererMixerInput); 102 DISALLOW_COPY_AND_ASSIGN(AudioRendererMixerInput);
102 }; 103 };
103 104
104 } // namespace media 105 } // namespace media
105 106
106 #endif // MEDIA_BASE_AUDIO_RENDERER_MIXER_INPUT_H_ 107 #endif // MEDIA_BASE_AUDIO_RENDERER_MIXER_INPUT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698