Index: content/browser/renderer_host/media/video_capture_controller.h |
diff --git a/content/browser/renderer_host/media/video_capture_controller.h b/content/browser/renderer_host/media/video_capture_controller.h |
index e429e1d23bbae90dc6ef675ca4c36714525eddb1..4be8085bbf67c870971c272da674c7e897691234 100644 |
--- a/content/browser/renderer_host/media/video_capture_controller.h |
+++ b/content/browser/renderer_host/media/video_capture_controller.h |
@@ -67,10 +67,12 @@ |
base::WeakPtr<VideoCaptureController> GetWeakPtrForIOThread(); |
- // Factory code creating instances of VideoCaptureController may optionally |
- // set a FrameBufferPool. Setting the host is done in this method separate |
- // from the constructor to allow clients to create and use instances before |
- // they can provide the observer. (This is the case with VideoCaptureManager). |
+ // Factory code creating instances of VideoCaptureController must set a |
+ // FrameBufferPool before any of the media::VideoFrameReceiver are used. |
+ // Setting the observer is done in this method separate from the constructor |
+ // in order to allow use the media::VideoFrameReceiver methods |
+ // before the observer can be provided. (This is the case with |
+ // VideoCaptureManager). |
void SetFrameBufferPool( |
std::unique_ptr<media::FrameBufferPool> frame_buffer_pool); |
@@ -132,7 +134,7 @@ |
// Implementation of media::VideoFrameReceiver interface: |
void OnIncomingCapturedVideoFrame( |
- media::VideoCaptureDevice::Client::Buffer buffer, |
+ std::unique_ptr<media::VideoCaptureDevice::Client::Buffer> buffer, |
scoped_refptr<media::VideoFrame> frame) override; |
void OnError() override; |
void OnLog(const std::string& message) override; |
@@ -148,7 +150,8 @@ |
int buffer_id, |
int frame_feedback_id, |
media::VideoFrameConsumerFeedbackObserver* consumer_feedback_observer, |
- media::FrameBufferPool* frame_buffer_pool); |
+ media::FrameBufferPool* frame_buffer_pool, |
+ scoped_refptr<media::VideoFrame> frame); |
~BufferState(); |
BufferState(const BufferState& other); |
void RecordConsumerUtilization(double utilization); |
@@ -164,9 +167,15 @@ |
const int frame_feedback_id_; |
media::VideoFrameConsumerFeedbackObserver* consumer_feedback_observer_; |
media::FrameBufferPool* frame_buffer_pool_; |
+ const scoped_refptr<media::VideoFrame> frame_; |
double max_consumer_utilization_; |
int consumer_hold_count_; |
}; |
+ |
+ // Notify renderer that a new buffer has been created. |
+ void DoNewBufferOnIOThread(ControllerClient* client, |
+ media::VideoCaptureDevice::Client::Buffer* buffer, |
+ const scoped_refptr<media::VideoFrame>& frame); |
// Find a client of |id| and |handler| in |clients|. |
ControllerClient* FindClient(VideoCaptureControllerID id, |