diff options
author | miu <miu@chromium.org> | 2016-03-25 17:57:21 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-26 00:58:38 +0000 |
commit | e4a406a55b1fb94080258f5801338ff63b8dcbed (patch) | |
tree | b26b94aaf2d348cda45b193e9e79dcd97b7c5886 /content/browser/media/capture/desktop_capture_device_aura_unittest.cc | |
parent | a4581858f57e20724f9b8a3166ef9c864f79a758 (diff) | |
download | chromium_src-e4a406a55b1fb94080258f5801338ff63b8dcbed.zip chromium_src-e4a406a55b1fb94080258f5801338ff63b8dcbed.tar.gz chromium_src-e4a406a55b1fb94080258f5801338ff63b8dcbed.tar.bz2 |
Add frame refresh to VideoCaptureDevice, and buffer pool resurrection.
This is the first in a series of changes to solve the problems related
to VideoCaptureDevices that can pause (i.e., basically, screen capture
devices). This introduces new optional-to-implement methods to the
media::VideoCaptureDevice interface, and the supporting functionality in
content::VideoCaptureBufferPool.
This change should not result in any end-user-visible differences, as it
is just laying the groundwork for future changes. For more details on
the overall plan, please see the crbug.
BUG=486274
Review URL: https://codereview.chromium.org/1826643003
Cr-Commit-Position: refs/heads/master@{#383426}
Diffstat (limited to 'content/browser/media/capture/desktop_capture_device_aura_unittest.cc')
-rw-r--r-- | content/browser/media/capture/desktop_capture_device_aura_unittest.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/content/browser/media/capture/desktop_capture_device_aura_unittest.cc b/content/browser/media/capture/desktop_capture_device_aura_unittest.cc index 984b661..0bcb066 100644 --- a/content/browser/media/capture/desktop_capture_device_aura_unittest.cc +++ b/content/browser/media/capture/desktop_capture_device_aura_unittest.cc @@ -60,6 +60,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)); @@ -85,7 +86,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_EQ(media::PIXEL_FORMAT_I420, format); + EXPECT_EQ(media::PIXEL_STORAGE_CPU, storage); + DoResurrectLastOutputBuffer(); + return scoped_ptr<Buffer>(); + } double GetBufferPoolUtilization() const override { return 0.0; } }; |