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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 // The pool of shared-memory buffers used for capturing. | 144 // The pool of shared-memory buffers used for capturing. |
145 const scoped_refptr<VideoCaptureBufferPool> buffer_pool_; | 145 const scoped_refptr<VideoCaptureBufferPool> buffer_pool_; |
146 | 146 |
147 // All clients served by this controller. | 147 // All clients served by this controller. |
148 ControllerClients controller_clients_; | 148 ControllerClients controller_clients_; |
149 | 149 |
150 // Takes on only the states 'STARTED' and 'ERROR'. 'ERROR' is an absorbing | 150 // Takes on only the states 'STARTED' and 'ERROR'. 'ERROR' is an absorbing |
151 // state which stops the flow of data to clients. | 151 // state which stops the flow of data to clients. |
152 VideoCaptureState state_; | 152 VideoCaptureState state_; |
153 | 153 |
| 154 // True if the controller has received a video frame from the device. |
| 155 bool frame_received_; |
| 156 |
154 media::VideoCaptureFormat video_capture_format_; | 157 media::VideoCaptureFormat video_capture_format_; |
155 | 158 |
156 base::WeakPtrFactory<VideoCaptureController> weak_ptr_factory_; | 159 base::WeakPtrFactory<VideoCaptureController> weak_ptr_factory_; |
157 | 160 |
158 DISALLOW_COPY_AND_ASSIGN(VideoCaptureController); | 161 DISALLOW_COPY_AND_ASSIGN(VideoCaptureController); |
159 }; | 162 }; |
160 | 163 |
161 } // namespace content | 164 } // namespace content |
162 | 165 |
163 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_H_ | 166 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_H_ |
OLD | NEW |