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

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

Issue 2836293002: Introduce AudioRendererSink::IsOptimizedForHardwareParameters (Closed)
Patch Set: rebase Created 3 years, 7 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/audio/null_audio_sink.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 30 matching lines...) Expand all
41 const url::Origin& security_origin, 41 const url::Origin& security_origin,
42 AudioLatency::LatencyType latency); 42 AudioLatency::LatencyType latency);
43 43
44 // SwitchableAudioRendererSink implementation. 44 // SwitchableAudioRendererSink implementation.
45 void Start() override; 45 void Start() override;
46 void Stop() override; 46 void Stop() override;
47 void Play() override; 47 void Play() override;
48 void Pause() override; 48 void Pause() override;
49 bool SetVolume(double volume) override; 49 bool SetVolume(double volume) override;
50 OutputDeviceInfo GetOutputDeviceInfo() override; 50 OutputDeviceInfo GetOutputDeviceInfo() override;
51 bool IsOptimizedForHardwareParameters() override;
51 void Initialize(const AudioParameters& params, 52 void Initialize(const AudioParameters& params,
52 AudioRendererSink::RenderCallback* renderer) override; 53 AudioRendererSink::RenderCallback* renderer) override;
53 void SwitchOutputDevice(const std::string& device_id, 54 void SwitchOutputDevice(const std::string& device_id,
54 const url::Origin& security_origin, 55 const url::Origin& security_origin,
55 const OutputDeviceStatusCB& callback) override; 56 const OutputDeviceStatusCB& callback) override;
56 // This is expected to be called on the audio rendering thread. The caller 57 // This is expected to be called on the audio rendering thread. The caller
57 // must ensure that this input has been added to a mixer before calling the 58 // must ensure that this input has been added to a mixer before calling the
58 // function, and that it is not removed from the mixer before this function 59 // function, and that it is not removed from the mixer before this function
59 // returns. 60 // returns.
60 bool CurrentThreadIsRenderingThread() override; 61 bool CurrentThreadIsRenderingThread() override;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 100
100 // Error callback for handing to AudioRendererMixer. 101 // Error callback for handing to AudioRendererMixer.
101 const base::Closure error_cb_; 102 const base::Closure error_cb_;
102 103
103 DISALLOW_COPY_AND_ASSIGN(AudioRendererMixerInput); 104 DISALLOW_COPY_AND_ASSIGN(AudioRendererMixerInput);
104 }; 105 };
105 106
106 } // namespace media 107 } // namespace media
107 108
108 #endif // MEDIA_BASE_AUDIO_RENDERER_MIXER_INPUT_H_ 109 #endif // MEDIA_BASE_AUDIO_RENDERER_MIXER_INPUT_H_
OLDNEW
« no previous file with comments | « media/audio/null_audio_sink.cc ('k') | media/base/audio_renderer_mixer_input.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698