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

Unified Diff: content/browser/renderer_host/media/video_capture_controller.h

Issue 2573223002: [Mojo Video Capture] Simplify media::VideoCaptureDevice::Client:Buffer to a struct (Closed)
Patch Set: Merge Ownership into BufferAccessProvider. Created 4 years 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 side-by-side diff with in-line comments
Download patch
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 0e54c740b69b66e12e01114112a4aac2b2437491..c59a3d5dcf82f8fd0262d07d16c7bdf27e9a4d4d 100644
--- a/content/browser/renderer_host/media/video_capture_controller.h
+++ b/content/browser/renderer_host/media/video_capture_controller.h
@@ -67,11 +67,10 @@ class CONTENT_EXPORT VideoCaptureController : public media::VideoFrameReceiver {
base::WeakPtr<VideoCaptureController> GetWeakPtrForIOThread();
- // 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
+ // 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).
void SetFrameBufferPool(
std::unique_ptr<media::FrameBufferPool> frame_buffer_pool);
@@ -137,7 +136,7 @@ class CONTENT_EXPORT VideoCaptureController : public media::VideoFrameReceiver {
// Implementation of media::VideoFrameReceiver interface:
void OnIncomingCapturedVideoFrame(
- std::unique_ptr<media::VideoCaptureDevice::Client::Buffer> buffer,
+ media::VideoCaptureDevice::Client::Buffer buffer,
scoped_refptr<media::VideoFrame> frame) override;
void OnError() override;
void OnLog(const std::string& message) override;
@@ -153,8 +152,7 @@ class CONTENT_EXPORT VideoCaptureController : public media::VideoFrameReceiver {
int buffer_id,
int frame_feedback_id,
media::VideoFrameConsumerFeedbackObserver* consumer_feedback_observer,
- media::FrameBufferPool* frame_buffer_pool,
- scoped_refptr<media::VideoFrame> frame);
+ media::FrameBufferPool* frame_buffer_pool);
~BufferState();
BufferState(const BufferState& other);
void RecordConsumerUtilization(double utilization);
@@ -170,16 +168,10 @@ class CONTENT_EXPORT VideoCaptureController : public media::VideoFrameReceiver {
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,
VideoCaptureControllerEventHandler* handler,

Powered by Google App Engine
This is Rietveld 408576698