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 // MediaStreamManager is used to open/enumerate media capture devices (video | 5 // MediaStreamManager is used to open/enumerate media capture devices (video |
6 // supported now). Call flow: | 6 // supported now). Call flow: |
7 // 1. GenerateStream is called when a render process wants to use a capture | 7 // 1. GenerateStream is called when a render process wants to use a capture |
8 // device. | 8 // device. |
9 // 2. MediaStreamManager will ask MediaStreamUIController for permission to | 9 // 2. MediaStreamManager will ask MediaStreamUIController for permission to |
10 // use devices and for which device to use. | 10 // use devices and for which device to use. |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 // list of currently available devices. | 300 // list of currently available devices. |
301 void StopRemovedDevices(const StreamDeviceInfoArray& old_devices, | 301 void StopRemovedDevices(const StreamDeviceInfoArray& old_devices, |
302 const StreamDeviceInfoArray& new_devices); | 302 const StreamDeviceInfoArray& new_devices); |
303 // Helper method used by StopRemovedDevices to stop the use of a certain | 303 // Helper method used by StopRemovedDevices to stop the use of a certain |
304 // device. | 304 // device. |
305 void StopRemovedDevice(const MediaStreamDevice& device); | 305 void StopRemovedDevice(const MediaStreamDevice& device); |
306 | 306 |
307 // Helpers to start and stop monitoring devices. | 307 // Helpers to start and stop monitoring devices. |
308 void StartMonitoring(); | 308 void StartMonitoring(); |
309 void StopMonitoring(); | 309 void StopMonitoring(); |
| 310 #if defined(OS_MACOSX) |
| 311 void StartMonitoringOnUIThread(); |
| 312 #endif |
310 | 313 |
311 // Finds the requested device id from constraints. The requested device type | 314 // Finds the requested device id from constraints. The requested device type |
312 // must be MEDIA_DEVICE_AUDIO_CAPTURE or MEDIA_DEVICE_VIDEO_CAPTURE. | 315 // must be MEDIA_DEVICE_AUDIO_CAPTURE or MEDIA_DEVICE_VIDEO_CAPTURE. |
313 bool GetRequestedDeviceCaptureId(const DeviceRequest* request, | 316 bool GetRequestedDeviceCaptureId(const DeviceRequest* request, |
314 MediaStreamType type, | 317 MediaStreamType type, |
315 std::string* device_id) const; | 318 std::string* device_id) const; |
316 | 319 |
317 void TranslateDeviceIdToSourceId(DeviceRequest* request, | 320 void TranslateDeviceIdToSourceId(DeviceRequest* request, |
318 MediaStreamDevice* device); | 321 MediaStreamDevice* device); |
319 | 322 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 | 366 |
364 bool use_fake_ui_; | 367 bool use_fake_ui_; |
365 scoped_ptr<FakeMediaStreamUIProxy> fake_ui_; | 368 scoped_ptr<FakeMediaStreamUIProxy> fake_ui_; |
366 | 369 |
367 DISALLOW_COPY_AND_ASSIGN(MediaStreamManager); | 370 DISALLOW_COPY_AND_ASSIGN(MediaStreamManager); |
368 }; | 371 }; |
369 | 372 |
370 } // namespace content | 373 } // namespace content |
371 | 374 |
372 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_MANAGER_H_ | 375 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_MANAGER_H_ |
OLD | NEW |