| 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 // VideoCaptureController is the glue between a VideoCaptureDevice and all | 5 // VideoCaptureController is the glue between a VideoCaptureDevice and all |
| 6 // VideoCaptureHosts that have connected to it. A controller exists on behalf of | 6 // VideoCaptureHosts that have connected to it. A controller exists on behalf of |
| 7 // one (and only one) VideoCaptureDevice; both are owned by the | 7 // one (and only one) VideoCaptureDevice; both are owned by the |
| 8 // VideoCaptureManager. | 8 // VideoCaptureManager. |
| 9 // | 9 // |
| 10 // The VideoCaptureController is responsible for: | 10 // The VideoCaptureController is responsible for: |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 | 74 |
| 75 // Return a new VideoCaptureDeviceClient to forward capture events to this | 75 // Return a new VideoCaptureDeviceClient to forward capture events to this |
| 76 // instance. | 76 // instance. |
| 77 std::unique_ptr<media::VideoCaptureDevice::Client> NewDeviceClient(); | 77 std::unique_ptr<media::VideoCaptureDevice::Client> NewDeviceClient(); |
| 78 | 78 |
| 79 // Start video capturing and try to use the resolution specified in |params|. | 79 // Start video capturing and try to use the resolution specified in |params|. |
| 80 // Buffers will be shared to the client as necessary. The client will continue | 80 // Buffers will be shared to the client as necessary. The client will continue |
| 81 // to receive frames from the device until RemoveClient() is called. | 81 // to receive frames from the device until RemoveClient() is called. |
| 82 void AddClient(VideoCaptureControllerID id, | 82 void AddClient(VideoCaptureControllerID id, |
| 83 VideoCaptureControllerEventHandler* event_handler, | 83 VideoCaptureControllerEventHandler* event_handler, |
| 84 base::ProcessHandle render_process, | |
| 85 media::VideoCaptureSessionId session_id, | 84 media::VideoCaptureSessionId session_id, |
| 86 const media::VideoCaptureParams& params); | 85 const media::VideoCaptureParams& params); |
| 87 | 86 |
| 88 // Stop video capture. This will take back all buffers held by by | 87 // Stop video capture. This will take back all buffers held by by |
| 89 // |event_handler|, and |event_handler| shouldn't use those buffers any more. | 88 // |event_handler|, and |event_handler| shouldn't use those buffers any more. |
| 90 // Returns the session_id of the stopped client, or | 89 // Returns the session_id of the stopped client, or |
| 91 // kInvalidMediaCaptureSessionId if the indicated client was not registered. | 90 // kInvalidMediaCaptureSessionId if the indicated client was not registered. |
| 92 int RemoveClient(VideoCaptureControllerID id, | 91 int RemoveClient(VideoCaptureControllerID id, |
| 93 VideoCaptureControllerEventHandler* event_handler); | 92 VideoCaptureControllerEventHandler* event_handler); |
| 94 | 93 |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 media::VideoCaptureFormat video_capture_format_; | 169 media::VideoCaptureFormat video_capture_format_; |
| 171 | 170 |
| 172 base::WeakPtrFactory<VideoCaptureController> weak_ptr_factory_; | 171 base::WeakPtrFactory<VideoCaptureController> weak_ptr_factory_; |
| 173 | 172 |
| 174 DISALLOW_COPY_AND_ASSIGN(VideoCaptureController); | 173 DISALLOW_COPY_AND_ASSIGN(VideoCaptureController); |
| 175 }; | 174 }; |
| 176 | 175 |
| 177 } // namespace content | 176 } // namespace content |
| 178 | 177 |
| 179 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_H_ | 178 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_H_ |
| OLD | NEW |