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

Side by Side Diff: content/public/common/media_stream_request.h

Issue 99033003: Enable platform echo cancellation through the AudioRecord path. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove getEnabled() logging. Created 7 years 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 (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 CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_ 5 #ifndef CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_
6 #define CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_ 6 #define CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 MediaStreamType type, 73 MediaStreamType type,
74 const std::string& id, 74 const std::string& id,
75 const std::string& name); 75 const std::string& name);
76 76
77 MediaStreamDevice( 77 MediaStreamDevice(
78 MediaStreamType type, 78 MediaStreamType type,
79 const std::string& id, 79 const std::string& id,
80 const std::string& name, 80 const std::string& name,
81 int sample_rate, 81 int sample_rate,
82 int channel_layout, 82 int channel_layout,
83 int frames_per_buffer); 83 int frames_per_buffer,
84 bool use_platform_aec);
84 85
85 ~MediaStreamDevice(); 86 ~MediaStreamDevice();
86 87
87 bool IsEqual(const MediaStreamDevice& second) const; 88 bool IsEqual(const MediaStreamDevice& second) const;
88 89
89 // The device's type. 90 // The device's type.
90 MediaStreamType type; 91 MediaStreamType type;
91 92
92 // The device's unique ID. 93 // The device's unique ID.
93 std::string id; 94 std::string id;
94 95
95 // The facing mode for video capture device. 96 // The facing mode for video capture device.
96 VideoFacingMode video_facing; 97 VideoFacingMode video_facing;
97 98
98 // The device id of a matched output device if any (otherwise empty). 99 // The device id of a matched output device if any (otherwise empty).
99 // Only applicable to audio devices. 100 // Only applicable to audio devices.
100 std::string matched_output_device_id; 101 std::string matched_output_device_id;
101 102
102 // The device's "friendly" name. Not guaranteed to be unique. 103 // The device's "friendly" name. Not guaranteed to be unique.
103 std::string name; 104 std::string name;
104 105
105 // Contains properties that match directly with those with the same name 106 // Contains properties that match directly with those with the same name
106 // in media::AudioParameters. 107 // in media::AudioParameters.
107 struct AudioDeviceParameters { 108 struct AudioDeviceParameters {
108 AudioDeviceParameters() 109 AudioDeviceParameters()
109 : sample_rate(), channel_layout(), frames_per_buffer() { 110 : sample_rate(), channel_layout(), frames_per_buffer(),
111 use_platform_aec(false) {
110 } 112 }
111 113
112 AudioDeviceParameters(int sample_rate, int channel_layout, 114 AudioDeviceParameters(int sample_rate, int channel_layout,
113 int frames_per_buffer) 115 int frames_per_buffer, bool use_platform_aec)
114 : sample_rate(sample_rate), 116 : sample_rate(sample_rate),
115 channel_layout(channel_layout), 117 channel_layout(channel_layout),
116 frames_per_buffer(frames_per_buffer) { 118 frames_per_buffer(frames_per_buffer),
119 use_platform_aec(use_platform_aec) {
117 } 120 }
118 121
119 // Preferred sample rate in samples per second for the device. 122 // Preferred sample rate in samples per second for the device.
120 int sample_rate; 123 int sample_rate;
121 124
122 // Preferred channel configuration for the device. 125 // Preferred channel configuration for the device.
123 // TODO(henrika): ideally, we would like to use media::ChannelLayout here 126 // TODO(henrika): ideally, we would like to use media::ChannelLayout here
124 // but including media/base/channel_layout.h violates checkdeps rules. 127 // but including media/base/channel_layout.h violates checkdeps rules.
125 int channel_layout; 128 int channel_layout;
126 129
127 // Preferred number of frames per buffer for the device. This is filled 130 // Preferred number of frames per buffer for the device. This is filled
128 // in on the browser side and can be used by the renderer to match the 131 // in on the browser side and can be used by the renderer to match the
129 // expected browser side settings and avoid unnecessary buffering. 132 // expected browser side settings and avoid unnecessary buffering.
130 // See media::AudioParameters for more. 133 // See media::AudioParameters for more.
131 int frames_per_buffer; 134 int frames_per_buffer;
135
136 // See media::AudioParameters.
137 bool use_platform_aec;
132 }; 138 };
133 139
134 // These below two member variables are valid only when the type of device is 140 // These below two member variables are valid only when the type of device is
135 // audio (i.e. IsAudioMediaType returns true). 141 // audio (i.e. IsAudioMediaType returns true).
136 142
137 // Contains the device properties of the capture device. 143 // Contains the device properties of the capture device.
138 AudioDeviceParameters input; 144 AudioDeviceParameters input;
139 145
140 // If the capture device has an associated output device (e.g. headphones), 146 // If the capture device has an associated output device (e.g. headphones),
141 // this will contain the properties for the output device. If no such device 147 // this will contain the properties for the output device. If no such device
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 }; 228 };
223 229
224 // Callback used return results of media access requests. 230 // Callback used return results of media access requests.
225 typedef base::Callback<void( 231 typedef base::Callback<void(
226 const MediaStreamDevices& devices, 232 const MediaStreamDevices& devices,
227 scoped_ptr<MediaStreamUI> ui)> MediaResponseCallback; 233 scoped_ptr<MediaStreamUI> ui)> MediaResponseCallback;
228 234
229 } // namespace content 235 } // namespace content
230 236
231 #endif // CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_ 237 #endif // CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698