| 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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 int buffer_id, | 146 int buffer_id, |
| 147 int frame_feedback_id, | 147 int frame_feedback_id, |
| 148 media::VideoFrameConsumerFeedbackObserver* consumer_feedback_observer, | 148 media::VideoFrameConsumerFeedbackObserver* consumer_feedback_observer, |
| 149 media::FrameBufferPool* frame_buffer_pool); | 149 media::FrameBufferPool* frame_buffer_pool); |
| 150 ~BufferState(); | 150 ~BufferState(); |
| 151 BufferState(const BufferState& other); | 151 BufferState(const BufferState& other); |
| 152 void RecordConsumerUtilization(double utilization); | 152 void RecordConsumerUtilization(double utilization); |
| 153 void IncreaseConsumerCount(); | 153 void IncreaseConsumerCount(); |
| 154 void DecreaseConsumerCount(); | 154 void DecreaseConsumerCount(); |
| 155 bool HasZeroConsumerHoldCount(); | 155 bool HasZeroConsumerHoldCount(); |
| 156 void SetFrameFeedbackId(int id); |
| 156 void SetConsumerFeedbackObserver( | 157 void SetConsumerFeedbackObserver( |
| 157 media::VideoFrameConsumerFeedbackObserver* consumer_feedback_observer); | 158 media::VideoFrameConsumerFeedbackObserver* consumer_feedback_observer); |
| 158 void SetFrameBufferPool(media::FrameBufferPool* frame_buffer_pool); | 159 void SetFrameBufferPool(media::FrameBufferPool* frame_buffer_pool); |
| 159 | 160 |
| 160 private: | 161 private: |
| 161 const int buffer_id_; | 162 const int buffer_id_; |
| 162 const int frame_feedback_id_; | 163 int frame_feedback_id_; |
| 163 media::VideoFrameConsumerFeedbackObserver* consumer_feedback_observer_; | 164 media::VideoFrameConsumerFeedbackObserver* consumer_feedback_observer_; |
| 164 media::FrameBufferPool* frame_buffer_pool_; | 165 media::FrameBufferPool* frame_buffer_pool_; |
| 165 double max_consumer_utilization_; | 166 double max_consumer_utilization_; |
| 166 int consumer_hold_count_; | 167 int consumer_hold_count_; |
| 167 }; | 168 }; |
| 168 | 169 |
| 169 // Find a client of |id| and |handler| in |clients|. | 170 // Find a client of |id| and |handler| in |clients|. |
| 170 ControllerClient* FindClient(VideoCaptureControllerID id, | 171 ControllerClient* FindClient(VideoCaptureControllerID id, |
| 171 VideoCaptureControllerEventHandler* handler, | 172 VideoCaptureControllerEventHandler* handler, |
| 172 const ControllerClients& clients); | 173 const ControllerClients& clients); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 195 media::VideoCaptureFormat video_capture_format_; | 196 media::VideoCaptureFormat video_capture_format_; |
| 196 | 197 |
| 197 base::WeakPtrFactory<VideoCaptureController> weak_ptr_factory_; | 198 base::WeakPtrFactory<VideoCaptureController> weak_ptr_factory_; |
| 198 | 199 |
| 199 DISALLOW_COPY_AND_ASSIGN(VideoCaptureController); | 200 DISALLOW_COPY_AND_ASSIGN(VideoCaptureController); |
| 200 }; | 201 }; |
| 201 | 202 |
| 202 } // namespace content | 203 } // namespace content |
| 203 | 204 |
| 204 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_H_ | 205 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_H_ |
| OLD | NEW |