| 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 | 100 |
| 101 // Return the number of clients that aren't paused. | 101 // Return the number of clients that aren't paused. |
| 102 int GetActiveClientCount() const; | 102 int GetActiveClientCount() const; |
| 103 | 103 |
| 104 // API called directly by VideoCaptureManager in case the device is | 104 // API called directly by VideoCaptureManager in case the device is |
| 105 // prematurely closed. | 105 // prematurely closed. |
| 106 void StopSession(int session_id); | 106 void StopSession(int session_id); |
| 107 | 107 |
| 108 // Return a buffer with id |buffer_id| previously given in | 108 // Return a buffer with id |buffer_id| previously given in |
| 109 // VideoCaptureControllerEventHandler::OnBufferReady. In the case that the | 109 // VideoCaptureControllerEventHandler::OnBufferReady. In the case that the |
| 110 // buffer was backed by a texture, |sync_point| will be waited on before | 110 // buffer was backed by a texture, |sync_token| will be waited on before |
| 111 // destroying or recycling the texture, to synchronize with texture users in | 111 // destroying or recycling the texture, to synchronize with texture users in |
| 112 // the renderer process. If the consumer provided resource utilization | 112 // the renderer process. If the consumer provided resource utilization |
| 113 // feedback, this will be passed here (-1.0 indicates no feedback). | 113 // feedback, this will be passed here (-1.0 indicates no feedback). |
| 114 void ReturnBuffer(VideoCaptureControllerID id, | 114 void ReturnBuffer(VideoCaptureControllerID id, |
| 115 VideoCaptureControllerEventHandler* event_handler, | 115 VideoCaptureControllerEventHandler* event_handler, |
| 116 int buffer_id, | 116 int buffer_id, |
| 117 const gpu::SyncToken& sync_token, | 117 const gpu::SyncToken& sync_token, |
| 118 double consumer_resource_utilization); | 118 double consumer_resource_utilization); |
| 119 | 119 |
| 120 const media::VideoCaptureFormat& GetVideoCaptureFormat() const; | 120 const media::VideoCaptureFormat& GetVideoCaptureFormat() const; |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 media::VideoCaptureFormat video_capture_format_; | 164 media::VideoCaptureFormat video_capture_format_; |
| 165 | 165 |
| 166 base::WeakPtrFactory<VideoCaptureController> weak_ptr_factory_; | 166 base::WeakPtrFactory<VideoCaptureController> weak_ptr_factory_; |
| 167 | 167 |
| 168 DISALLOW_COPY_AND_ASSIGN(VideoCaptureController); | 168 DISALLOW_COPY_AND_ASSIGN(VideoCaptureController); |
| 169 }; | 169 }; |
| 170 | 170 |
| 171 } // namespace content | 171 } // namespace content |
| 172 | 172 |
| 173 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_H_ | 173 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_H_ |
| OLD | NEW |