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

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: Add PlatformEffects, unittests and clean up. 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>
11 11
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/callback_forward.h" 13 #include "base/callback_forward.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "content/common/content_export.h" 15 #include "content/common/content_export.h"
16 #include "media/audio/audio_parameters.h"
ajm 2013/12/10 06:37:16 This trips a presubmit check: "You added one or mo
tommi (sloooow) - chröme 2013/12/11 12:14:36 Yes unfortunately. That's why we're not using Aud
16 #include "url/gurl.h" 17 #include "url/gurl.h"
17 18
18 namespace content { 19 namespace content {
19 20
20 // Types of media streams. 21 // Types of media streams.
21 enum MediaStreamType { 22 enum MediaStreamType {
22 MEDIA_NO_SERVICE = 0, 23 MEDIA_NO_SERVICE = 0,
23 24
24 // A device provided by the operating system (e.g., webcam input). 25 // A device provided by the operating system (e.g., webcam input).
25 MEDIA_DEVICE_AUDIO_CAPTURE, 26 MEDIA_DEVICE_AUDIO_CAPTURE,
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
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() {
110 } 111 }
111 112
112 AudioDeviceParameters(int sample_rate, int channel_layout, 113 AudioDeviceParameters(int sample_rate, int channel_layout,
113 int frames_per_buffer) 114 int frames_per_buffer)
114 : sample_rate(sample_rate), 115 : sample_rate(sample_rate),
115 channel_layout(channel_layout), 116 channel_layout(channel_layout),
116 frames_per_buffer(frames_per_buffer) { 117 frames_per_buffer(frames_per_buffer) {
117 } 118 }
118 119
119 // Preferred sample rate in samples per second for the device. 120 // Preferred sample rate in samples per second for the device.
120 int sample_rate; 121 int sample_rate;
121 122
122 // Preferred channel configuration for the device. 123 // Preferred channel configuration for the device.
123 // TODO(henrika): ideally, we would like to use media::ChannelLayout here 124 // TODO(henrika): ideally, we would like to use media::ChannelLayout here
124 // but including media/base/channel_layout.h violates checkdeps rules. 125 // but including media/base/channel_layout.h violates checkdeps rules.
125 int channel_layout; 126 int channel_layout;
126 127
127 // Preferred number of frames per buffer for the device. This is filled 128 // 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 129 // in on the browser side and can be used by the renderer to match the
129 // expected browser side settings and avoid unnecessary buffering. 130 // expected browser side settings and avoid unnecessary buffering.
130 // See media::AudioParameters for more. 131 // See media::AudioParameters for more.
131 int frames_per_buffer; 132 int frames_per_buffer;
133
134 // See media::AudioParameters.
135 media::AudioParameters::PlatformEffects effects;
132 }; 136 };
133 137
134 // These below two member variables are valid only when the type of device is 138 // These below two member variables are valid only when the type of device is
135 // audio (i.e. IsAudioMediaType returns true). 139 // audio (i.e. IsAudioMediaType returns true).
136 140
137 // Contains the device properties of the capture device. 141 // Contains the device properties of the capture device.
138 AudioDeviceParameters input; 142 AudioDeviceParameters input;
139 143
140 // If the capture device has an associated output device (e.g. headphones), 144 // 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 145 // 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 }; 226 };
223 227
224 // Callback used return results of media access requests. 228 // Callback used return results of media access requests.
225 typedef base::Callback<void( 229 typedef base::Callback<void(
226 const MediaStreamDevices& devices, 230 const MediaStreamDevices& devices,
227 scoped_ptr<MediaStreamUI> ui)> MediaResponseCallback; 231 scoped_ptr<MediaStreamUI> ui)> MediaResponseCallback;
228 232
229 } // namespace content 233 } // namespace content
230 234
231 #endif // CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_ 235 #endif // CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698