Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(144)

Side by Side Diff: content/browser/renderer_host/media/video_capture_controller.h

Issue 2659653002: Fix for issue 684766 Old/erroneous frame feedback during tab capture (Closed)
Patch Set: Exercise ResurrectLastOutputBuffer() and apply git cl format Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/renderer_host/media/video_capture_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/media/video_capture_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698