| OLD | NEW |
| 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 // Only applicable to audio devices. | 99 // Only applicable to audio devices. |
| 100 std::string matched_output_device_id; | 100 std::string matched_output_device_id; |
| 101 | 101 |
| 102 // The device's "friendly" name. Not guaranteed to be unique. | 102 // The device's "friendly" name. Not guaranteed to be unique. |
| 103 std::string name; | 103 std::string name; |
| 104 | 104 |
| 105 // Contains properties that match directly with those with the same name | 105 // Contains properties that match directly with those with the same name |
| 106 // in media::AudioParameters. | 106 // in media::AudioParameters. |
| 107 struct AudioDeviceParameters { | 107 struct AudioDeviceParameters { |
| 108 AudioDeviceParameters() | 108 AudioDeviceParameters() |
| 109 : sample_rate(), channel_layout(), frames_per_buffer() { | 109 : sample_rate(), channel_layout(), frames_per_buffer(), effects() { |
| 110 } | 110 } |
| 111 | 111 |
| 112 AudioDeviceParameters(int sample_rate, int channel_layout, | 112 AudioDeviceParameters(int sample_rate, int channel_layout, |
| 113 int frames_per_buffer) | 113 int frames_per_buffer) |
| 114 : sample_rate(sample_rate), | 114 : sample_rate(sample_rate), |
| 115 channel_layout(channel_layout), | 115 channel_layout(channel_layout), |
| 116 frames_per_buffer(frames_per_buffer) { | 116 frames_per_buffer(frames_per_buffer), |
| 117 effects() { |
| 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::PlatformEffectsMask. |
| 135 int 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 }; | 223 }; |
| 220 | 224 |
| 221 // Callback used return results of media access requests. | 225 // Callback used return results of media access requests. |
| 222 typedef base::Callback<void( | 226 typedef base::Callback<void( |
| 223 const MediaStreamDevices& devices, | 227 const MediaStreamDevices& devices, |
| 224 scoped_ptr<MediaStreamUI> ui)> MediaResponseCallback; | 228 scoped_ptr<MediaStreamUI> ui)> MediaResponseCallback; |
| 225 | 229 |
| 226 } // namespace content | 230 } // namespace content |
| 227 | 231 |
| 228 #endif // CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_ | 232 #endif // CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_ |
| OLD | NEW |