Chromium Code Reviews| 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" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
| 13 #include "content/public/common/media_stream_request.h" | 13 #include "content/public/common/media_stream_request.h" |
| 14 #include "third_party/WebKit/public/platform/WebMediaConstraints.h" | 14 #include "third_party/WebKit/public/platform/WebMediaConstraints.h" |
| 15 #include "third_party/webrtc/api/mediastreaminterface.h" | 15 #include "third_party/webrtc/api/mediastreaminterface.h" |
| 16 #include "third_party/webrtc/media/base/mediachannel.h" | |
| 16 #include "third_party/webrtc/modules/audio_processing/include/audio_processing.h " | 17 #include "third_party/webrtc/modules/audio_processing/include/audio_processing.h " |
| 17 | 18 |
| 18 namespace webrtc { | 19 namespace webrtc { |
| 19 | 20 |
| 20 class EchoCancellation; | 21 class EchoCancellation; |
| 21 class MediaConstraintsInterface; | |
| 22 class TypingDetection; | 22 class TypingDetection; |
| 23 | 23 |
| 24 } | 24 } |
| 25 | 25 |
| 26 namespace content { | 26 namespace content { |
| 27 | 27 |
| 28 class RTCMediaConstraints; | 28 class RTCMediaConstraints; |
| 29 | 29 |
| 30 using webrtc::AudioProcessing; | 30 using webrtc::AudioProcessing; |
| 31 using webrtc::MediaConstraintsInterface; | |
| 32 | 31 |
| 33 // A helper class to parse audio constraints from a blink::WebMediaConstraints | 32 // A helper class to parse audio constraints from a blink::WebMediaConstraints |
| 34 // object. | 33 // object. |
| 35 class CONTENT_EXPORT MediaAudioConstraints { | 34 class CONTENT_EXPORT MediaAudioConstraints { |
| 36 public: | 35 public: |
| 37 // Constraint keys used by audio processing. | 36 // Constraint keys used by audio processing. |
| 38 static const char kEchoCancellation[]; | 37 static const char kEchoCancellation[]; |
| 39 static const char kGoogEchoCancellation[]; | 38 static const char kGoogEchoCancellation[]; |
| 40 static const char kGoogExperimentalEchoCancellation[]; | 39 static const char kGoogExperimentalEchoCancellation[]; |
| 41 static const char kGoogAutoGainControl[]; | 40 static const char kGoogAutoGainControl[]; |
| 42 static const char kGoogExperimentalAutoGainControl[]; | 41 static const char kGoogExperimentalAutoGainControl[]; |
| 43 static const char kGoogNoiseSuppression[]; | 42 static const char kGoogNoiseSuppression[]; |
| 44 static const char kGoogExperimentalNoiseSuppression[]; | 43 static const char kGoogExperimentalNoiseSuppression[]; |
| 45 static const char kGoogBeamforming[]; | 44 static const char kGoogBeamforming[]; |
| 46 static const char kGoogArrayGeometry[]; | 45 static const char kGoogArrayGeometry[]; |
| 47 static const char kGoogHighpassFilter[]; | 46 static const char kGoogHighpassFilter[]; |
| 48 static const char kGoogTypingNoiseDetection[]; | 47 static const char kGoogTypingNoiseDetection[]; |
| 49 static const char kGoogAudioMirroring[]; | 48 static const char kGoogAudioMirroring[]; |
| 50 | 49 |
| 51 // Merge |constraints| with |kDefaultAudioConstraints|. For any key which | 50 // Merge |options| with |kDefaultAudioConstraints|. For any key which |
| 52 // exists in both, the value from |constraints| is maintained, including its | 51 // exists in both, the value from |constraints| is maintained, including its |
| 53 // mandatory/optional status. New values from |kDefaultAudioConstraints| will | 52 // mandatory/optional status. New values from |kDefaultAudioConstraints| will |
| 54 // be added with optional status. | 53 // be added. |
| 55 static void ApplyFixedAudioConstraints(RTCMediaConstraints* constraints); | 54 static void ApplyFixedAudioConstraints(cricket::AudioOptions* options); |
|
tommi (sloooow) - chröme
2016/03/14 18:37:47
depending on a type from 'cricket' looks like a re
hta - Chromium
2016/03/15 06:47:33
Not that I know of. The third_party/webrtc/api/loc
| |
| 56 | 55 |
| 57 // |effects| is the bitmasks telling whether certain platform | 56 // |effects| is the bitmasks telling whether certain platform |
| 58 // hardware audio effects are enabled, like hardware echo cancellation. If | 57 // hardware audio effects are enabled, like hardware echo cancellation. If |
| 59 // some hardware effect is enabled, the corresponding software audio | 58 // some hardware effect is enabled, the corresponding software audio |
| 60 // processing will be disabled. | 59 // processing will be disabled. |
| 61 MediaAudioConstraints(const blink::WebMediaConstraints& constraints, | 60 MediaAudioConstraints(const blink::WebMediaConstraints& constraints, |
| 62 int effects); | 61 int effects); |
| 63 virtual ~MediaAudioConstraints(); | 62 virtual ~MediaAudioConstraints(); |
| 64 | 63 |
| 65 bool GetGoogAudioMirroring() const; | 64 bool GetGoogAudioMirroring() const; |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 138 | 137 |
| 139 // Returns the array geometry from the media constraints if existing and | 138 // Returns the array geometry from the media constraints if existing and |
| 140 // otherwise that provided by the input device. | 139 // otherwise that provided by the input device. |
| 141 CONTENT_EXPORT std::vector<webrtc::Point> GetArrayGeometryPreferringConstraints( | 140 CONTENT_EXPORT std::vector<webrtc::Point> GetArrayGeometryPreferringConstraints( |
| 142 const MediaAudioConstraints& audio_constraints, | 141 const MediaAudioConstraints& audio_constraints, |
| 143 const MediaStreamDevice::AudioDeviceParameters& input_params); | 142 const MediaStreamDevice::AudioDeviceParameters& input_params); |
| 144 | 143 |
| 145 } // namespace content | 144 } // namespace content |
| 146 | 145 |
| 147 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_PROCESSOR_OPTIONS_H_ | 146 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_PROCESSOR_OPTIONS_H_ |
| OLD | NEW |