| 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(), effects() { | 109 : sample_rate(), channel_layout(), frames_per_buffer() { |
| 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() { | |
| 118 } | 117 } |
| 119 | 118 |
| 120 // Preferred sample rate in samples per second for the device. | 119 // Preferred sample rate in samples per second for the device. |
| 121 int sample_rate; | 120 int sample_rate; |
| 122 | 121 |
| 123 // Preferred channel configuration for the device. | 122 // Preferred channel configuration for the device. |
| 124 // TODO(henrika): ideally, we would like to use media::ChannelLayout here | 123 // TODO(henrika): ideally, we would like to use media::ChannelLayout here |
| 125 // but including media/base/channel_layout.h violates checkdeps rules. | 124 // but including media/base/channel_layout.h violates checkdeps rules. |
| 126 int channel_layout; | 125 int channel_layout; |
| 127 | 126 |
| 128 // Preferred number of frames per buffer for the device. This is filled | 127 // Preferred number of frames per buffer for the device. This is filled |
| 129 // in on the browser side and can be used by the renderer to match the | 128 // in on the browser side and can be used by the renderer to match the |
| 130 // expected browser side settings and avoid unnecessary buffering. | 129 // expected browser side settings and avoid unnecessary buffering. |
| 131 // See media::AudioParameters for more. | 130 // See media::AudioParameters for more. |
| 132 int frames_per_buffer; | 131 int frames_per_buffer; |
| 133 | |
| 134 // See media::AudioParameters::PlatformEffectsMask. | |
| 135 int effects; | |
| 136 }; | 132 }; |
| 137 | 133 |
| 138 // These below two member variables are valid only when the type of device is | 134 // These below two member variables are valid only when the type of device is |
| 139 // audio (i.e. IsAudioMediaType returns true). | 135 // audio (i.e. IsAudioMediaType returns true). |
| 140 | 136 |
| 141 // Contains the device properties of the capture device. | 137 // Contains the device properties of the capture device. |
| 142 AudioDeviceParameters input; | 138 AudioDeviceParameters input; |
| 143 | 139 |
| 144 // If the capture device has an associated output device (e.g. headphones), | 140 // If the capture device has an associated output device (e.g. headphones), |
| 145 // this will contain the properties for the output device. If no such device | 141 // 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 Loading... |
| 226 }; | 222 }; |
| 227 | 223 |
| 228 // Callback used return results of media access requests. | 224 // Callback used return results of media access requests. |
| 229 typedef base::Callback<void( | 225 typedef base::Callback<void( |
| 230 const MediaStreamDevices& devices, | 226 const MediaStreamDevices& devices, |
| 231 scoped_ptr<MediaStreamUI> ui)> MediaResponseCallback; | 227 scoped_ptr<MediaStreamUI> ui)> MediaResponseCallback; |
| 232 | 228 |
| 233 } // namespace content | 229 } // namespace content |
| 234 | 230 |
| 235 #endif // CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_ | 231 #endif // CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_ |
| OLD | NEW |