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

Unified Diff: content/browser/media/capture/desktop_capture_device_unittest.cc

Issue 1826643003: Add frame refresh to VideoCaptureDevice, and buffer pool resurrection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: REBASE before commit Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/media/capture/desktop_capture_device_unittest.cc
diff --git a/content/browser/media/capture/desktop_capture_device_unittest.cc b/content/browser/media/capture/desktop_capture_device_unittest.cc
index ec10e73926a1f03dcdcdfea49b3798c61a0c25d6..3dd6bbcb1e10510cc67fddbda43b4fb2a8fe3ba1 100644
--- a/content/browser/media/capture/desktop_capture_device_unittest.cc
+++ b/content/browser/media/capture/desktop_capture_device_unittest.cc
@@ -79,6 +79,7 @@ class MockDeviceClient : public media::VideoCaptureDevice::Client {
MOCK_METHOD0(DoReserveOutputBuffer, void(void));
MOCK_METHOD0(DoOnIncomingCapturedBuffer, void(void));
MOCK_METHOD0(DoOnIncomingCapturedVideoFrame, void(void));
+ MOCK_METHOD0(DoResurrectLastOutputBuffer, void(void));
MOCK_METHOD2(OnError,
void(const tracked_objects::Location& from_here,
const std::string& reason));
@@ -104,7 +105,15 @@ class MockDeviceClient : public media::VideoCaptureDevice::Client {
const base::TimeTicks& timestamp) override {
DoOnIncomingCapturedVideoFrame();
}
-
+ scoped_ptr<Buffer> ResurrectLastOutputBuffer(
+ const gfx::Size& dimensions,
+ media::VideoPixelFormat format,
+ media::VideoPixelStorage storage) override {
+ EXPECT_TRUE(format == media::PIXEL_FORMAT_I420 &&
+ storage == media::PIXEL_STORAGE_CPU);
+ DoResurrectLastOutputBuffer();
+ return scoped_ptr<Buffer>();
+ }
double GetBufferPoolUtilization() const override { return 0.0; }
};

Powered by Google App Engine
This is Rietveld 408576698