| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 // | 69 // |
| 70 // If the device is not already started (i.e., no other client is currently | 70 // If the device is not already started (i.e., no other client is currently |
| 71 // capturing from this device), this call will cause a VideoCaptureController | 71 // capturing from this device), this call will cause a VideoCaptureController |
| 72 // and VideoCaptureDevice to be created, possibly asynchronously. | 72 // and VideoCaptureDevice to be created, possibly asynchronously. |
| 73 // | 73 // |
| 74 // On success, the controller is returned via calling |done_cb|, indicating | 74 // On success, the controller is returned via calling |done_cb|, indicating |
| 75 // that the client was successfully added. A NULL controller is passed to | 75 // that the client was successfully added. A NULL controller is passed to |
| 76 // the callback on failure. | 76 // the callback on failure. |
| 77 void StartCaptureForClient(media::VideoCaptureSessionId session_id, | 77 void StartCaptureForClient(media::VideoCaptureSessionId session_id, |
| 78 const media::VideoCaptureParams& capture_params, | 78 const media::VideoCaptureParams& capture_params, |
| 79 base::ProcessHandle client_render_process, | |
| 80 VideoCaptureControllerID client_id, | 79 VideoCaptureControllerID client_id, |
| 81 VideoCaptureControllerEventHandler* client_handler, | 80 VideoCaptureControllerEventHandler* client_handler, |
| 82 const DoneCB& done_cb); | 81 const DoneCB& done_cb); |
| 83 | 82 |
| 84 // Called by VideoCaptureHost to remove |client_handler|. If this is the last | 83 // Called by VideoCaptureHost to remove |client_handler|. If this is the last |
| 85 // client of the device, the |controller| and its VideoCaptureDevice may be | 84 // client of the device, the |controller| and its VideoCaptureDevice may be |
| 86 // destroyed. The client must not access |controller| after calling this | 85 // destroyed. The client must not access |controller| after calling this |
| 87 // function. | 86 // function. |
| 88 void StopCaptureForClient(VideoCaptureController* controller, | 87 void StopCaptureForClient(VideoCaptureController* controller, |
| 89 VideoCaptureControllerID client_id, | 88 VideoCaptureControllerID client_id, |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 // Map used by DesktopCapture. | 353 // Map used by DesktopCapture. |
| 355 std::map<media::VideoCaptureSessionId, gfx::NativeViewId> | 354 std::map<media::VideoCaptureSessionId, gfx::NativeViewId> |
| 356 notification_window_ids_; | 355 notification_window_ids_; |
| 357 | 356 |
| 358 DISALLOW_COPY_AND_ASSIGN(VideoCaptureManager); | 357 DISALLOW_COPY_AND_ASSIGN(VideoCaptureManager); |
| 359 }; | 358 }; |
| 360 | 359 |
| 361 } // namespace content | 360 } // namespace content |
| 362 | 361 |
| 363 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_MANAGER_H_ | 362 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_MANAGER_H_ |
| OLD | NEW |