| 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 // and it will take a little time to resume. | 105 // and it will take a little time to resume. |
| 106 // Allocating device could failed if other app holds the camera, the error | 106 // Allocating device could failed if other app holds the camera, the error |
| 107 // will be notified through VideoCaptureControllerEventHandler::OnError(). | 107 // will be notified through VideoCaptureControllerEventHandler::OnError(). |
| 108 void ResumeCaptureForClient( | 108 void ResumeCaptureForClient( |
| 109 media::VideoCaptureSessionId session_id, | 109 media::VideoCaptureSessionId session_id, |
| 110 const media::VideoCaptureParams& params, | 110 const media::VideoCaptureParams& params, |
| 111 VideoCaptureController* controller, | 111 VideoCaptureController* controller, |
| 112 VideoCaptureControllerID client_id, | 112 VideoCaptureControllerID client_id, |
| 113 VideoCaptureControllerEventHandler* client_handler); | 113 VideoCaptureControllerEventHandler* client_handler); |
| 114 | 114 |
| 115 // Called by VideoCaptureHost to request a refresh frame from the video |
| 116 // capture device. |
| 117 void RequestRefreshFrameForClient(VideoCaptureController* controller); |
| 118 |
| 115 // Retrieves all capture supported formats for a particular device. Returns | 119 // Retrieves all capture supported formats for a particular device. Returns |
| 116 // false if the |capture_session_id| is not found. The supported formats are | 120 // false if the |capture_session_id| is not found. The supported formats are |
| 117 // cached during device(s) enumeration, and depending on the underlying | 121 // cached during device(s) enumeration, and depending on the underlying |
| 118 // implementation, could be an empty list. | 122 // implementation, could be an empty list. |
| 119 bool GetDeviceSupportedFormats( | 123 bool GetDeviceSupportedFormats( |
| 120 media::VideoCaptureSessionId capture_session_id, | 124 media::VideoCaptureSessionId capture_session_id, |
| 121 media::VideoCaptureFormats* supported_formats); | 125 media::VideoCaptureFormats* supported_formats); |
| 122 | 126 |
| 123 // Retrieves the format(s) currently in use. Returns false if the | 127 // Retrieves the format(s) currently in use. Returns false if the |
| 124 // |capture_session_id| is not found. Returns true and |formats_in_use| | 128 // |capture_session_id| is not found. Returns true and |formats_in_use| |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 // Map used by DesktopCapture. | 358 // Map used by DesktopCapture. |
| 355 std::map<media::VideoCaptureSessionId, gfx::NativeViewId> | 359 std::map<media::VideoCaptureSessionId, gfx::NativeViewId> |
| 356 notification_window_ids_; | 360 notification_window_ids_; |
| 357 | 361 |
| 358 DISALLOW_COPY_AND_ASSIGN(VideoCaptureManager); | 362 DISALLOW_COPY_AND_ASSIGN(VideoCaptureManager); |
| 359 }; | 363 }; |
| 360 | 364 |
| 361 } // namespace content | 365 } // namespace content |
| 362 | 366 |
| 363 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_MANAGER_H_ | 367 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_MANAGER_H_ |
| OLD | NEW |