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 /media/capture/video/video_capture_device_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 'media/capture/video/video_capture_device_unittest.cc')
-rw-r--r-- | media/capture/video/video_capture_device_unittest.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/media/capture/video/video_capture_device_unittest.cc b/media/capture/video/video_capture_device_unittest.cc index 97b4835..ae34068 100644 --- a/media/capture/video/video_capture_device_unittest.cc +++ b/media/capture/video/video_capture_device_unittest.cc @@ -85,6 +85,7 @@ class MockClient : public 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)); @@ -123,6 +124,14 @@ class MockClient : public VideoCaptureDevice::Client { const base::TimeTicks& timestamp) override { DoOnIncomingCapturedVideoFrame(); } + scoped_ptr<Buffer> ResurrectLastOutputBuffer( + const gfx::Size& dimensions, + media::VideoPixelFormat format, + media::VideoPixelStorage storage) { + DoResurrectLastOutputBuffer(); + NOTREACHED() << "This should never be called"; + return scoped_ptr<Buffer>(); + } private: scoped_refptr<base::SingleThreadTaskRunner> main_thread_; |