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

Side by Side Diff: media/base/audio_renderer_sink.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/base/audio_renderer_mixer_input.cc ('k') | media/base/fake_audio_renderer_sink.h » ('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_SINK_H_ 5 #ifndef MEDIA_BASE_AUDIO_RENDERER_SINK_H_
6 #define MEDIA_BASE_AUDIO_RENDERER_SINK_H_ 6 #define MEDIA_BASE_AUDIO_RENDERER_SINK_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 // Returns |true| on success. 66 // Returns |true| on success.
67 virtual bool SetVolume(double volume) = 0; 67 virtual bool SetVolume(double volume) = 0;
68 68
69 // Returns current output device information. If the information is not 69 // Returns current output device information. If the information is not
70 // available yet, this method may block until it becomes available. 70 // available yet, this method may block until it becomes available.
71 // If the sink is not associated with any output device, |device_status| of 71 // If the sink is not associated with any output device, |device_status| of
72 // OutputDeviceInfo should be set to OUTPUT_DEVICE_STATUS_ERROR_INTERNAL. 72 // OutputDeviceInfo should be set to OUTPUT_DEVICE_STATUS_ERROR_INTERNAL.
73 // Must never be called on the IO thread. 73 // Must never be called on the IO thread.
74 virtual OutputDeviceInfo GetOutputDeviceInfo() = 0; 74 virtual OutputDeviceInfo GetOutputDeviceInfo() = 0;
75 75
76 // Returns |true| if a source with hardware parameters is preferable.
77 virtual bool IsOptimizedForHardwareParameters() = 0;
78
76 // If DCHECKs are enabled, this function returns true if called on rendering 79 // If DCHECKs are enabled, this function returns true if called on rendering
77 // thread, otherwise false. With DCHECKs disabled, it returns true. Thus, it 80 // thread, otherwise false. With DCHECKs disabled, it returns true. Thus, it
78 // is intended to be used for DCHECKing. 81 // is intended to be used for DCHECKing.
79 virtual bool CurrentThreadIsRenderingThread() = 0; 82 virtual bool CurrentThreadIsRenderingThread() = 0;
80 83
81 protected: 84 protected:
82 friend class base::RefCountedThreadSafe<AudioRendererSink>; 85 friend class base::RefCountedThreadSafe<AudioRendererSink>;
83 virtual ~AudioRendererSink() {} 86 virtual ~AudioRendererSink() {}
84 }; 87 };
85 88
(...skipping 18 matching lines...) Expand all
104 const url::Origin& security_origin, 107 const url::Origin& security_origin,
105 const OutputDeviceStatusCB& callback) = 0; 108 const OutputDeviceStatusCB& callback) = 0;
106 109
107 protected: 110 protected:
108 ~SwitchableAudioRendererSink() override {} 111 ~SwitchableAudioRendererSink() override {}
109 }; 112 };
110 113
111 } // namespace media 114 } // namespace media
112 115
113 #endif // MEDIA_BASE_AUDIO_RENDERER_SINK_H_ 116 #endif // MEDIA_BASE_AUDIO_RENDERER_SINK_H_
OLDNEW
« no previous file with comments | « media/base/audio_renderer_mixer_input.cc ('k') | media/base/fake_audio_renderer_sink.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698