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

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

Issue 100313002: Fix screen capture slowness in Chrome OS feedback report. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add OWNERS for video_capture_device_impl* which got refactored from web_contents_*. Created 7 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_device_impl.h
diff --git a/content/browser/renderer_host/media/video_capture_device_impl.h b/content/browser/renderer_host/media/video_capture_device_impl.h
index ec771e8485a6c24c41cf7b3897c7544fb3154007..259cf47bc3535213c3ca2a55b706b7696d5644f8 100644
--- a/content/browser/renderer_host/media/video_capture_device_impl.h
+++ b/content/browser/renderer_host/media/video_capture_device_impl.h
@@ -45,7 +45,7 @@ class ThreadSafeCaptureOracle
public:
ThreadSafeCaptureOracle(scoped_ptr<media::VideoCaptureDevice::Client> client,
scoped_ptr<VideoCaptureOracle> oracle,
- const gfx::Size& capture_size,
+ const gfx::Size& max_frame_size,
int frame_rate);
// Called when a captured frame is available or an error has occurred.
@@ -64,6 +64,10 @@ class ThreadSafeCaptureOracle
return oracle_->capture_period();
}
+ // Updates capture resolution based on the supplied source size and the
+ // maximum frame size.
+ void UpdateCaptureSize(const gfx::Size& source_size);
+
// Stop new captures from happening (but doesn't forget the client).
void Stop();
@@ -89,8 +93,11 @@ class ThreadSafeCaptureOracle
// Makes the decision to capture a frame.
const scoped_ptr<VideoCaptureOracle> oracle_;
+ // The maximum frame size.
+ const gfx::Size max_frame_size_;
+
// The current capturing resolution and frame rate.
- const gfx::Size capture_size_;
+ gfx::Size capture_size_;
const int frame_rate_;
};

Powered by Google App Engine
This is Rietveld 408576698