OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_PROCESSOR_OPTIONS_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_PROCESSOR_OPTIONS_H_ |
6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_PROCESSOR_OPTIONS_H_ | 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_PROCESSOR_OPTIONS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/files/file.h" | 10 #include "base/files/file.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 static void ApplyFixedAudioConstraints(RTCMediaConstraints* constraints); | 51 static void ApplyFixedAudioConstraints(RTCMediaConstraints* constraints); |
52 | 52 |
53 // |effects| is the bitmasks telling whether certain platform | 53 // |effects| is the bitmasks telling whether certain platform |
54 // hardware audio effects are enabled, like hardware echo cancellation. If | 54 // hardware audio effects are enabled, like hardware echo cancellation. If |
55 // some hardware effect is enabled, the corresponding software audio | 55 // some hardware effect is enabled, the corresponding software audio |
56 // processing will be disabled. | 56 // processing will be disabled. |
57 MediaAudioConstraints(const blink::WebMediaConstraints& constraints, | 57 MediaAudioConstraints(const blink::WebMediaConstraints& constraints, |
58 int effects); | 58 int effects); |
59 virtual ~MediaAudioConstraints(); | 59 virtual ~MediaAudioConstraints(); |
60 | 60 |
61 // Checks if any audio constraints are set that requires audio processing to | |
62 // be applied. | |
63 bool NeedsAudioProcessing(); | |
64 | |
65 // Gets the property of the constraint named by |key| in |constraints_|. | 61 // Gets the property of the constraint named by |key| in |constraints_|. |
66 // Returns the constraint's value if the key is found; Otherwise returns the | 62 // Returns the constraint's value if the key is found; Otherwise returns the |
67 // default value of the constraint. | 63 // default value of the constraint. |
68 // Note, for constraint of |kEchoCancellation| or |kGoogEchoCancellation|, | 64 // Note, for constraint of |kEchoCancellation| or |kGoogEchoCancellation|, |
69 // clients should use GetEchoCancellationProperty(). | 65 // clients should use GetEchoCancellationProperty(). |
70 bool GetProperty(const std::string& key); | 66 bool GetProperty(const std::string& key); |
71 | 67 |
72 // Gets the property of echo cancellation defined in |constraints_|. The | 68 // Gets the property of echo cancellation defined in |constraints_|. The |
73 // returned value depends on a combination of |effects_|, |kEchoCancellation| | 69 // returned value depends on a combination of |effects_|, |kEchoCancellation| |
74 // and |kGoogEchoCancellation| in |constraints_|. | 70 // and |kGoogEchoCancellation| in |constraints_|. |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 void StopEchoCancellationDump(AudioProcessing* audio_processing); | 107 void StopEchoCancellationDump(AudioProcessing* audio_processing); |
112 | 108 |
113 void EnableAutomaticGainControl(AudioProcessing* audio_processing); | 109 void EnableAutomaticGainControl(AudioProcessing* audio_processing); |
114 | 110 |
115 void GetAecStats(AudioProcessing* audio_processing, | 111 void GetAecStats(AudioProcessing* audio_processing, |
116 webrtc::AudioProcessorInterface::AudioProcessorStats* stats); | 112 webrtc::AudioProcessorInterface::AudioProcessorStats* stats); |
117 | 113 |
118 } // namespace content | 114 } // namespace content |
119 | 115 |
120 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_PROCESSOR_OPTIONS_H_ | 116 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_PROCESSOR_OPTIONS_H_ |
OLD | NEW |