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

Side by Side Diff: content/renderer/media/media_stream_audio_processor_options.h

Issue 1729683002: Remove old-style constraints from Chrome internals (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Complete the interface change Created 4 years, 9 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 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 |options| is maintained.
53 // mandatory/optional status. New values from |kDefaultAudioConstraints| will 52 // New values from |kDefaultAudioConstraints| will
54 // be added with optional status. 53 // be added.
55 static void ApplyFixedAudioConstraints(RTCMediaConstraints* constraints); 54 // TODO(hta): Switch to an interface without "cricket::" when webrtc has one.
55
56 static void ApplyFixedAudioConstraints(cricket::AudioOptions* options);
56 57
57 // |effects| is the bitmasks telling whether certain platform 58 // |effects| is the bitmasks telling whether certain platform
58 // hardware audio effects are enabled, like hardware echo cancellation. If 59 // hardware audio effects are enabled, like hardware echo cancellation. If
59 // some hardware effect is enabled, the corresponding software audio 60 // some hardware effect is enabled, the corresponding software audio
60 // processing will be disabled. 61 // processing will be disabled.
61 MediaAudioConstraints(const blink::WebMediaConstraints& constraints, 62 MediaAudioConstraints(const blink::WebMediaConstraints& constraints,
62 int effects); 63 int effects);
63 virtual ~MediaAudioConstraints(); 64 virtual ~MediaAudioConstraints();
64 65
65 bool GetGoogAudioMirroring() const; 66 bool GetGoogAudioMirroring() const;
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 139
139 // Returns the array geometry from the media constraints if existing and 140 // Returns the array geometry from the media constraints if existing and
140 // otherwise that provided by the input device. 141 // otherwise that provided by the input device.
141 CONTENT_EXPORT std::vector<webrtc::Point> GetArrayGeometryPreferringConstraints( 142 CONTENT_EXPORT std::vector<webrtc::Point> GetArrayGeometryPreferringConstraints(
142 const MediaAudioConstraints& audio_constraints, 143 const MediaAudioConstraints& audio_constraints,
143 const MediaStreamDevice::AudioDeviceParameters& input_params); 144 const MediaStreamDevice::AudioDeviceParameters& input_params);
144 145
145 } // namespace content 146 } // namespace content
146 147
147 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_PROCESSOR_OPTIONS_H_ 148 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_PROCESSOR_OPTIONS_H_
OLDNEW
« no previous file with comments | « content/renderer/media/media_stream_audio_processor.cc ('k') | content/renderer/media/media_stream_audio_processor_options.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698