| 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 // VideoCaptureManager is used to open/close, start/stop, enumerate available | 5 // VideoCaptureManager is used to open/close, start/stop, enumerate available |
| 6 // video capture devices, and manage VideoCaptureController's. | 6 // video capture devices, and manage VideoCaptureController's. |
| 7 // All functions are expected to be called from Browser::IO thread. Some helper | 7 // All functions are expected to be called from Browser::IO thread. Some helper |
| 8 // functions (*OnDeviceThread) will dispatch operations to the device thread. | 8 // functions (*OnDeviceThread) will dispatch operations to the device thread. |
| 9 // VideoCaptureManager will open OS dependent instances of VideoCaptureDevice. | 9 // VideoCaptureManager will open OS dependent instances of VideoCaptureDevice. |
| 10 // A device can only be opened once. | 10 // A device can only be opened once. |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 | 113 |
| 114 // Queries and returns the available device IDs. | 114 // Queries and returns the available device IDs. |
| 115 media::VideoCaptureDevice::Names GetAvailableDevicesOnDeviceThread( | 115 media::VideoCaptureDevice::Names GetAvailableDevicesOnDeviceThread( |
| 116 MediaStreamType stream_type); | 116 MediaStreamType stream_type); |
| 117 | 117 |
| 118 // Create and Start a new VideoCaptureDevice, storing the result in | 118 // Create and Start a new VideoCaptureDevice, storing the result in |
| 119 // |entry->video_capture_device|. Ownership of |client| passes to | 119 // |entry->video_capture_device|. Ownership of |client| passes to |
| 120 // the device. | 120 // the device. |
| 121 void DoStartDeviceOnDeviceThread( | 121 void DoStartDeviceOnDeviceThread( |
| 122 DeviceEntry* entry, | 122 DeviceEntry* entry, |
| 123 const media::VideoCaptureCapability& capture_params, | 123 const media::VideoCaptureParams& params, |
| 124 scoped_ptr<media::VideoCaptureDevice::Client> client); | 124 scoped_ptr<media::VideoCaptureDevice::Client> client); |
| 125 | 125 |
| 126 // Stop and destroy the VideoCaptureDevice held in | 126 // Stop and destroy the VideoCaptureDevice held in |
| 127 // |entry->video_capture_device|. | 127 // |entry->video_capture_device|. |
| 128 void DoStopDeviceOnDeviceThread(DeviceEntry* entry); | 128 void DoStopDeviceOnDeviceThread(DeviceEntry* entry); |
| 129 | 129 |
| 130 // The message loop of media stream device thread, where VCD's live. | 130 // The message loop of media stream device thread, where VCD's live. |
| 131 scoped_refptr<base::MessageLoopProxy> device_loop_; | 131 scoped_refptr<base::MessageLoopProxy> device_loop_; |
| 132 | 132 |
| 133 // Only accessed on Browser::IO thread. | 133 // Only accessed on Browser::IO thread. |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 // when a device is created in DoStartDeviceOnDeviceThread(). Used only on the | 176 // when a device is created in DoStartDeviceOnDeviceThread(). Used only on the |
| 177 // device thread. | 177 // device thread. |
| 178 media::VideoCaptureDevice::Names video_capture_devices_; | 178 media::VideoCaptureDevice::Names video_capture_devices_; |
| 179 | 179 |
| 180 DISALLOW_COPY_AND_ASSIGN(VideoCaptureManager); | 180 DISALLOW_COPY_AND_ASSIGN(VideoCaptureManager); |
| 181 }; | 181 }; |
| 182 | 182 |
| 183 } // namespace content | 183 } // namespace content |
| 184 | 184 |
| 185 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_MANAGER_H_ | 185 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_MANAGER_H_ |
| OLD | NEW |