Commit 78afd4fb authored by Christian Fremerey's avatar Christian Fremerey Committed by Commit Bot

[Video Capture] Simplify VideoCaptureBufferPool

Since desktop capture has moved to using its own buffer pool implementation,
method ResurrectLastForProducer() in media::VideoCaptureBufferPool is no
longer used. This CL removes the method.

Bug: 879264
Change-Id: Ia24c683c8e63bc5b0d1bdc800e8c7d491f7c7c89
Reviewed-on: https://chromium-review.googlesource.com/1208952Reviewed-by: default avatarEmircan Uysaler <emircan@chromium.org>
Reviewed-by: default avatarWeiyong Yao <braveyao@chromium.org>
Commit-Queue: Christian Fremerey <chfremer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#589367}
parent 092e716b
......@@ -236,12 +236,6 @@ class DesktopCaptureDeviceTest : public testing::Test {
EXPECT_TRUE(format == media::PIXEL_FORMAT_I420);
return media::VideoCaptureDevice::Client::Buffer();
}));
ON_CALL(*result, ResurrectLastOutputBuffer(_, _, _))
.WillByDefault(
Invoke([](const gfx::Size&, media::VideoPixelFormat format, int) {
EXPECT_TRUE(format == media::PIXEL_FORMAT_I420);
return media::VideoCaptureDevice::Client::Buffer();
}));
return result;
}
......
......@@ -67,13 +67,6 @@ class MockDeviceClient : public media::VideoCaptureDevice::Client {
const media::VideoFrameMetadata& additional_metadata) override {
DoOnIncomingCapturedVideoFrame();
}
Buffer ResurrectLastOutputBuffer(const gfx::Size& dimensions,
media::VideoPixelFormat format,
int frame_feedback_id) override {
EXPECT_EQ(media::PIXEL_FORMAT_I420, format);
DoResurrectLastOutputBuffer();
return Buffer();
}
};
class ScreenCaptureDeviceAndroidTest : public testing::Test {
......
......@@ -90,17 +90,6 @@ class VideoCaptureBufferPoolTest
new Buffer(pool_, std::move(buffer_handle), buffer_id));
}
std::unique_ptr<Buffer> ResurrectLastBuffer(
const gfx::Size& dimensions,
media::VideoPixelFormat pixel_format) {
const int buffer_id =
pool_->ResurrectLastForProducer(dimensions, pixel_format);
if (buffer_id == media::VideoCaptureBufferPool::kInvalidId)
return std::unique_ptr<Buffer>();
return std::unique_ptr<Buffer>(new Buffer(
pool_, pool_->GetHandleForInProcessAccess(buffer_id), buffer_id));
}
base::MessageLoop loop_;
int expected_dropped_id_;
scoped_refptr<media::VideoCaptureBufferPool> pool_;
......@@ -273,125 +262,6 @@ TEST_P(VideoCaptureBufferPoolTest, BufferPool) {
buffer4.reset();
}
// Tests that a previously-released buffer can be immediately resurrected under
// normal conditions.
TEST_P(VideoCaptureBufferPoolTest, ResurrectsLastBuffer) {
ExpectDroppedId(media::VideoCaptureBufferPool::kInvalidId);
// At the start, there should be nothing to resurrect.
std::unique_ptr<Buffer> resurrected =
ResurrectLastBuffer(gfx::Size(10, 10), GetParam());
ASSERT_EQ(nullptr, resurrected.get());
// Reserve a 10x10 buffer and fill it with 0xab values.
std::unique_ptr<Buffer> original =
ReserveBuffer(gfx::Size(10, 10), GetParam());
ASSERT_NE(nullptr, original.get());
const size_t original_mapped_size = original->mapped_size();
memset(original->data(), 0xab, original_mapped_size);
// Try to resurrect a buffer BEFORE releasing |original|. This should fail.
resurrected = ResurrectLastBuffer(gfx::Size(10, 10), GetParam());
ASSERT_EQ(nullptr, resurrected.get());
// Release |original| and then try to resurrect it. Confirm the content of
// the resurrected buffer is a fill of 0xab values.
original.reset();
resurrected = ResurrectLastBuffer(gfx::Size(10, 10), GetParam());
ASSERT_NE(nullptr, resurrected.get());
ASSERT_EQ(original_mapped_size, resurrected->mapped_size());
uint8_t* resurrected_memory = reinterpret_cast<uint8_t*>(resurrected->data());
for (size_t i = 0; i < original_mapped_size; ++i)
EXPECT_EQ(0xab, resurrected_memory[i]) << "Mismatch at byte offset: " << i;
// Now, fill the resurrected buffer with 0xbc values and release it.
memset(resurrected_memory, 0xbc, original_mapped_size);
resurrected.reset();
// Finally, resurrect the buffer again, and confirm it contains a fill of 0xbc
// values.
resurrected = ResurrectLastBuffer(gfx::Size(10, 10), GetParam());
ASSERT_NE(nullptr, resurrected.get());
ASSERT_EQ(original_mapped_size, resurrected->mapped_size());
resurrected_memory = reinterpret_cast<uint8_t*>(resurrected->data());
for (size_t i = 0; i < original_mapped_size; ++i)
EXPECT_EQ(0xbc, resurrected_memory[i]) << "Mismatch at byte offset: " << i;
}
// Tests that a buffer cannot be resurrected if its properties do not match.
TEST_P(VideoCaptureBufferPoolTest, DoesNotResurrectIfPropertiesNotMatched) {
ExpectDroppedId(media::VideoCaptureBufferPool::kInvalidId);
// Reserve a 10x10 buffer, fill it with 0xcd values, and release it.
std::unique_ptr<Buffer> original =
ReserveBuffer(gfx::Size(10, 10), GetParam());
ASSERT_NE(nullptr, original.get());
const size_t original_mapped_size = original->mapped_size();
memset(original->data(), 0xcd, original_mapped_size);
original.reset();
// Expect that the buffer cannot be resurrected if the dimensions do not
// match.
std::unique_ptr<Buffer> resurrected =
ResurrectLastBuffer(gfx::Size(8, 8), GetParam());
ASSERT_EQ(nullptr, resurrected.get());
// Expect that the buffer cannot be resurrected if the pixel format does not
// match.
media::VideoPixelFormat altered_format = GetParam();
altered_format =
(altered_format == media::PIXEL_FORMAT_I420 ? media::PIXEL_FORMAT_ARGB
: media::PIXEL_FORMAT_I420);
resurrected = ResurrectLastBuffer(gfx::Size(10, 10), altered_format);
ASSERT_EQ(nullptr, resurrected.get());
// Finally, check that the buffer CAN be resurrected if all properties match.
resurrected = ResurrectLastBuffer(gfx::Size(10, 10), GetParam());
ASSERT_NE(nullptr, resurrected.get());
ASSERT_EQ(original_mapped_size, resurrected->mapped_size());
uint8_t* resurrected_memory = reinterpret_cast<uint8_t*>(resurrected->data());
for (size_t i = 0; i < original_mapped_size; ++i)
EXPECT_EQ(0xcd, resurrected_memory[i]) << "Mismatch at byte offset: " << i;
}
// Tests that the buffers are managed by the pool such that the last-released
// buffer is kept around as long as possible (for successful resurrection).
TEST_P(VideoCaptureBufferPoolTest, AvoidsClobberingForResurrectingLastBuffer) {
ExpectDroppedId(media::VideoCaptureBufferPool::kInvalidId);
// Reserve a 10x10 buffer, fill it with 0xde values, and release it.
std::unique_ptr<Buffer> original =
ReserveBuffer(gfx::Size(10, 10), GetParam());
ASSERT_NE(nullptr, original.get());
const size_t original_mapped_size = original->mapped_size();
memset(original->data(), 0xde, original_mapped_size);
original.reset();
// Reserve all but one of the pool's buffers.
std::vector<std::unique_ptr<Buffer>> held_buffers;
for (int i = 0; i < kTestBufferPoolSize - 1; ++i) {
held_buffers.push_back(ReserveBuffer(gfx::Size(10, 10), GetParam()));
ASSERT_NE(nullptr, held_buffers.back().get());
}
// Now, attempt to resurrect the original buffer. This should succeed.
std::unique_ptr<Buffer> resurrected =
ResurrectLastBuffer(gfx::Size(10, 10), GetParam());
ASSERT_NE(nullptr, resurrected.get());
ASSERT_EQ(original_mapped_size, resurrected->mapped_size());
uint8_t* resurrected_memory = reinterpret_cast<uint8_t*>(resurrected->data());
for (size_t i = 0; i < original_mapped_size; ++i)
EXPECT_EQ(0xde, resurrected_memory[i]) << "Mismatch at byte offset: " << i;
resurrected.reset();
// Reserve the final buffer in the pool, and then confirm resurrection does
// not succeed.
held_buffers.push_back(ReserveBuffer(gfx::Size(10, 10), GetParam()));
ASSERT_NE(nullptr, held_buffers.back().get());
resurrected = ResurrectLastBuffer(gfx::Size(10, 10), GetParam());
ASSERT_EQ(nullptr, resurrected.get());
}
INSTANTIATE_TEST_CASE_P(,
VideoCaptureBufferPoolTest,
testing::ValuesIn(kCapturePixelFormats));
......
......@@ -380,25 +380,13 @@ TEST_P(VideoCaptureControllerTest, NormalCaptureMultipleClients) {
arbitrary_reference_time_,
arbitrary_timestamp_);
// The buffer should be delivered to the clients in any order.
{
InSequence s;
EXPECT_CALL(*client_a_, DoBufferCreated(client_a_route_1, _));
EXPECT_CALL(*client_a_,
DoBufferReady(client_a_route_1, device_format.frame_size));
}
{
InSequence s;
EXPECT_CALL(*client_b_, DoBufferCreated(client_b_route_1, _));
EXPECT_CALL(*client_b_,
DoBufferReady(client_b_route_1, device_format.frame_size));
}
{
InSequence s;
EXPECT_CALL(*client_a_, DoBufferCreated(client_a_route_2, _));
EXPECT_CALL(*client_a_,
DoBufferReady(client_a_route_2, device_format.frame_size));
}
// The frame should be delivered to the clients in any order.
EXPECT_CALL(*client_a_,
DoBufferReady(client_a_route_1, device_format.frame_size));
EXPECT_CALL(*client_b_,
DoBufferReady(client_b_route_1, device_format.frame_size));
EXPECT_CALL(*client_a_,
DoBufferReady(client_a_route_2, device_format.frame_size));
base::RunLoop().RunUntilIdle();
Mock::VerifyAndClearExpectations(client_a_.get());
Mock::VerifyAndClearExpectations(client_b_.get());
......@@ -430,24 +418,24 @@ TEST_P(VideoCaptureControllerTest, NormalCaptureMultipleClients) {
.is_valid());
// The new client needs to be notified of the creation of |kPoolSize| buffers;
// the old clients only |kPoolSize - 2|.
// the old clients only |kPoolSize - 1|.
EXPECT_CALL(*client_b_, DoBufferCreated(client_b_route_2, _))
.Times(kPoolSize);
EXPECT_CALL(*client_b_,
DoBufferReady(client_b_route_2, device_format.frame_size))
.Times(kPoolSize);
EXPECT_CALL(*client_a_, DoBufferCreated(client_a_route_1, _))
.Times(kPoolSize - 2);
.Times(kPoolSize - 1);
EXPECT_CALL(*client_a_,
DoBufferReady(client_a_route_1, device_format.frame_size))
.Times(kPoolSize);
EXPECT_CALL(*client_a_, DoBufferCreated(client_a_route_2, _))
.Times(kPoolSize - 2);
.Times(kPoolSize - 1);
EXPECT_CALL(*client_a_,
DoBufferReady(client_a_route_2, device_format.frame_size))
.Times(kPoolSize);
EXPECT_CALL(*client_b_, DoBufferCreated(client_b_route_1, _))
.Times(kPoolSize - 2);
.Times(kPoolSize - 1);
EXPECT_CALL(*client_b_,
DoBufferReady(client_b_route_1, device_format.frame_size))
.Times(kPoolSize);
......@@ -643,20 +631,12 @@ TEST_F(VideoCaptureControllerTest, FrameFeedbackIsReportedForSequenceOfFrames) {
.Times(1);
// Device prepares and pushes a frame.
// For the first half of the frames we exercise ReserveOutputBuffer() while
// for the second half we exercise ResurrectLastOutputBuffer().
// The frame is expected to arrive at |client_a_|.DoBufferReady(), which
// automatically notifies |controller_| that it has finished consuming it.
media::VideoCaptureDevice::Client::Buffer buffer;
if (frame_index < kTestFrameSequenceLength / 2) {
buffer = device_client_->ReserveOutputBuffer(
arbitrary_format.frame_size, arbitrary_format.pixel_format,
stub_frame_feedback_id);
} else {
buffer = device_client_->ResurrectLastOutputBuffer(
arbitrary_format.frame_size, arbitrary_format.pixel_format,
stub_frame_feedback_id);
}
buffer = device_client_->ReserveOutputBuffer(arbitrary_format.frame_size,
arbitrary_format.pixel_format,
stub_frame_feedback_id);
ASSERT_TRUE(buffer.is_valid());
device_client_->OnIncomingCapturedBuffer(
std::move(buffer), arbitrary_format, arbitrary_reference_time_,
......
......@@ -95,14 +95,5 @@ void MockVideoCaptureClient::OnIncomingCapturedBufferExt(
DoOnIncomingCapturedVideoFrame();
}
VideoCaptureDevice::Client::Buffer
MockVideoCaptureClient::ResurrectLastOutputBuffer(const gfx::Size& dimensions,
VideoPixelFormat format,
int frame_feedback_id) {
DoResurrectLastOutputBuffer();
NOTREACHED() << "This should never be called";
return Buffer();
}
} // namespace unittest_internal
} // namespace media
......@@ -19,7 +19,6 @@ class MockVideoCaptureClient : public VideoCaptureDevice::Client {
MOCK_METHOD0(DoReserveOutputBuffer, void(void));
MOCK_METHOD0(DoOnIncomingCapturedBuffer, void(void));
MOCK_METHOD0(DoOnIncomingCapturedVideoFrame, void(void));
MOCK_METHOD0(DoResurrectLastOutputBuffer, void(void));
MOCK_METHOD3(OnError,
void(media::VideoCaptureError error,
const base::Location& from_here,
......@@ -68,9 +67,6 @@ class MockVideoCaptureClient : public VideoCaptureDevice::Client {
base::TimeDelta timestamp,
gfx::Rect visible_rect,
const VideoFrameMetadata& additional_metadata) override;
Buffer ResurrectLastOutputBuffer(const gfx::Size& dimensions,
VideoPixelFormat format,
int frame_feedback_id) override;
private:
base::OnceClosure frame_cb_;
......
......@@ -32,8 +32,6 @@ class MockVideoCaptureDeviceClient : public VideoCaptureDevice::Client {
int frame_feedback_id));
MOCK_METHOD3(ReserveOutputBuffer,
Buffer(const gfx::Size&, VideoPixelFormat, int));
MOCK_METHOD3(ResurrectLastOutputBuffer,
Buffer(const gfx::Size&, VideoPixelFormat, int));
MOCK_METHOD3(OnError,
void(media::VideoCaptureError error,
const base::Location& from_here,
......
......@@ -81,17 +81,6 @@ class CAPTURE_EXPORT VideoCaptureBufferPool
// of ReserveForProducer().
virtual void RelinquishProducerReservation(int buffer_id) = 0;
// Attempt to reserve the same buffer that was relinquished in the last call
// to RelinquishProducerReservation(). If the buffer is not still being
// consumed, and has not yet been re-used since being consumed, and the
// specified |dimensions|, |format|, and |storage| agree with its last
// reservation, this will succeed. Otherwise, |kInvalidId| will be returned.
//
// A producer may assume the content of the buffer has been preserved and may
// also make modifications.
virtual int ResurrectLastForProducer(const gfx::Size& dimensions,
VideoPixelFormat format) = 0;
// Returns a snapshot of the current number of buffers in-use divided by the
// maximum |count_|.
virtual double GetBufferPoolUtilization() const = 0;
......
......@@ -21,7 +21,6 @@ VideoCaptureBufferPoolImpl::VideoCaptureBufferPoolImpl(
int count)
: count_(count),
next_buffer_id_(0),
last_relinquished_buffer_id_(kInvalidId),
buffer_tracker_factory_(std::move(buffer_tracker_factory)) {
DCHECK_GT(count, 0);
}
......@@ -112,7 +111,6 @@ void VideoCaptureBufferPoolImpl::RelinquishProducerReservation(int buffer_id) {
}
DCHECK(tracker->held_by_producer());
tracker->set_held_by_producer(false);
last_relinquished_buffer_id_ = buffer_id;
}
void VideoCaptureBufferPoolImpl::HoldForConsumers(int buffer_id,
......@@ -146,34 +144,6 @@ void VideoCaptureBufferPoolImpl::RelinquishConsumerHold(int buffer_id,
num_clients);
}
int VideoCaptureBufferPoolImpl::ResurrectLastForProducer(
const gfx::Size& dimensions,
VideoPixelFormat format) {
base::AutoLock lock(lock_);
// Return early if the last relinquished buffer has been re-used already.
if (last_relinquished_buffer_id_ == kInvalidId)
return kInvalidId;
// If there are no consumers reading from this buffer, then it's safe to
// provide this buffer back to the producer (because the producer may
// potentially modify the content). Check that the expected dimensions,
// and format match.
auto it = trackers_.find(last_relinquished_buffer_id_);
DCHECK(it != trackers_.end());
DCHECK(!it->second->held_by_producer());
if (it->second->consumer_hold_count() == 0 &&
it->second->dimensions() == dimensions &&
it->second->pixel_format() == format) {
it->second->set_held_by_producer(true);
const int resurrected_buffer_id = last_relinquished_buffer_id_;
last_relinquished_buffer_id_ = kInvalidId;
return resurrected_buffer_id;
}
return kInvalidId;
}
double VideoCaptureBufferPoolImpl::GetBufferPoolUtilization() const {
base::AutoLock lock(lock_);
int num_buffers_held = 0;
......@@ -197,20 +167,12 @@ int VideoCaptureBufferPoolImpl::ReserveForProducerInternal(
// largest one that's not big enough, in case we have to reallocate a tracker.
*buffer_id_to_drop = kInvalidId;
size_t largest_size_in_pixels = 0;
auto tracker_of_last_resort = trackers_.end();
auto tracker_to_drop = trackers_.end();
for (auto it = trackers_.begin(); it != trackers_.end(); ++it) {
VideoCaptureBufferTracker* const tracker = it->second.get();
if (!tracker->consumer_hold_count() && !tracker->held_by_producer()) {
if (tracker->max_pixel_count() >= size_in_pixels &&
(tracker->pixel_format() == pixel_format)) {
if (it->first == last_relinquished_buffer_id_) {
// This buffer would do just fine, but avoid returning it because the
// client may want to resurrect it. It will be returned perforce if
// the pool has reached it's maximum limit (see code below).
tracker_of_last_resort = it;
continue;
}
// Existing tracker is big enough and has correct format. Reuse it.
tracker->set_dimensions(dimensions);
tracker->set_held_by_producer(true);
......@@ -225,22 +187,12 @@ int VideoCaptureBufferPoolImpl::ReserveForProducerInternal(
}
// Preferably grow the pool by creating a new tracker. If we're at maximum
// size, then try using |tracker_of_last_resort| or reallocate by deleting an
// existing one instead.
// size, reallocate by deleting an existing one.
if (trackers_.size() == static_cast<size_t>(count_)) {
if (tracker_of_last_resort != trackers_.end()) {
last_relinquished_buffer_id_ = kInvalidId;
tracker_of_last_resort->second->set_dimensions(dimensions);
tracker_of_last_resort->second->set_held_by_producer(true);
tracker_of_last_resort->second->set_frame_feedback_id(frame_feedback_id);
return tracker_of_last_resort->first;
}
if (tracker_to_drop == trackers_.end()) {
// We're out of space, and can't find an unused tracker to reallocate.
return kInvalidId;
}
if (tracker_to_drop->first == last_relinquished_buffer_id_)
last_relinquished_buffer_id_ = kInvalidId;
*buffer_id_to_drop = tracker_to_drop->first;
trackers_.erase(tracker_to_drop);
}
......
......@@ -49,8 +49,6 @@ class CAPTURE_EXPORT VideoCaptureBufferPoolImpl
int frame_feedback_id,
int* buffer_id_to_drop) override;
void RelinquishProducerReservation(int buffer_id) override;
int ResurrectLastForProducer(const gfx::Size& dimensions,
VideoPixelFormat format) override;
double GetBufferPoolUtilization() const override;
void HoldForConsumers(int buffer_id, int num_clients) override;
void RelinquishConsumerHold(int buffer_id, int num_clients) override;
......@@ -75,10 +73,6 @@ class CAPTURE_EXPORT VideoCaptureBufferPoolImpl
// The ID of the next buffer.
int next_buffer_id_;
// The ID of the buffer last relinquished by the producer (a candidate for
// resurrection).
int last_relinquished_buffer_id_;
// The buffers, indexed by the first parameter, a buffer id.
std::map<int, std::unique_ptr<VideoCaptureBufferTracker>> trackers_;
......
......@@ -197,15 +197,6 @@ class CAPTURE_EXPORT VideoCaptureDevice
gfx::Rect visible_rect,
const VideoFrameMetadata& additional_metadata) = 0;
// Attempts to reserve the same Buffer provided in the last call to one of
// the OnIncomingCapturedBufferXXX() methods. This will fail if the content
// of the Buffer has not been preserved, or if the |dimensions|, |format|,
// or |storage| disagree with how it was reserved via ReserveOutputBuffer().
// When this operation fails, nullptr will be returned.
virtual Buffer ResurrectLastOutputBuffer(const gfx::Size& dimensions,
VideoPixelFormat format,
int new_frame_feedback_id) = 0;
// An error has occurred that cannot be handled and VideoCaptureDevice must
// be StopAndDeAllocate()-ed. |reason| is a text description of the error.
virtual void OnError(VideoCaptureError error,
......
......@@ -474,18 +474,6 @@ void VideoCaptureDeviceClient::OnIncomingCapturedBufferExt(
std::move(info));
}
VideoCaptureDevice::Client::Buffer
VideoCaptureDeviceClient::ResurrectLastOutputBuffer(const gfx::Size& dimensions,
VideoPixelFormat format,
int new_frame_feedback_id) {
DFAKE_SCOPED_RECURSIVE_LOCK(call_from_producer_);
const int buffer_id =
buffer_pool_->ResurrectLastForProducer(dimensions, format);
if (buffer_id == VideoCaptureBufferPool::kInvalidId)
return Buffer();
return MakeBufferStruct(buffer_pool_, buffer_id, new_frame_feedback_id);
}
void VideoCaptureDeviceClient::OnError(VideoCaptureError error,
const base::Location& from_here,
const std::string& reason) {
......
......@@ -83,9 +83,6 @@ class CAPTURE_EXPORT VideoCaptureDeviceClient
base::TimeDelta timestamp,
gfx::Rect visible_rect,
const VideoFrameMetadata& additional_metadata) override;
Buffer ResurrectLastOutputBuffer(const gfx::Size& dimensions,
VideoPixelFormat format,
int new_frame_feedback_id) override;
void OnError(VideoCaptureError error,
const base::Location& from_here,
const std::string& reason) override;
......
......@@ -84,7 +84,6 @@ TEST_F(VideoCaptureDeviceClientTest, Minimal) {
EXPECT_CALL(*receiver_, OnLog(_));
EXPECT_CALL(*receiver_, MockOnNewBufferHandle(expected_buffer_id));
EXPECT_CALL(*receiver_, MockOnFrameReadyInBuffer(expected_buffer_id, _, _));
EXPECT_CALL(*receiver_, OnBufferRetired(expected_buffer_id));
}
device_client_->OnIncomingCapturedData(data, kScratchpadSizeInBytes,
kFrameFormat, 0 /*clockwise rotation*/,
......@@ -99,9 +98,8 @@ TEST_F(VideoCaptureDeviceClientTest, Minimal) {
gfx::BufferUsage::SCANOUT_CAMERA_READ_WRITE, gpu::kNullSurfaceHandle);
{
InSequence s;
const int expected_buffer_id = 1;
const int expected_buffer_id = 0;
EXPECT_CALL(*receiver_, OnLog(_));
EXPECT_CALL(*receiver_, MockOnNewBufferHandle(expected_buffer_id));
EXPECT_CALL(*receiver_, MockOnFrameReadyInBuffer(expected_buffer_id, _, _));
EXPECT_CALL(*receiver_, OnBufferRetired(expected_buffer_id));
}
......
......@@ -258,7 +258,6 @@ class VideoCaptureDeviceTest
auto result = std::make_unique<MockVideoCaptureDeviceClient>();
ON_CALL(*result, OnError(_, _, _)).WillByDefault(Invoke(DumpError));
EXPECT_CALL(*result, ReserveOutputBuffer(_, _, _)).Times(0);
EXPECT_CALL(*result, ResurrectLastOutputBuffer(_, _, _)).Times(0);
EXPECT_CALL(*result, DoOnIncomingCapturedBuffer(_, _, _, _)).Times(0);
EXPECT_CALL(*result, DoOnIncomingCapturedBufferExt(_, _, _, _, _, _))
.Times(0);
......
......@@ -57,9 +57,6 @@ class MockClient : public VideoCaptureDevice::Client {
gfx::Rect visible_rect,
const VideoFrameMetadata& additional_metadata) override {}
MOCK_METHOD3(ResurrectLastOutputBuffer,
Buffer(const gfx::Size&, VideoPixelFormat, int));
MOCK_METHOD3(OnError,
void(VideoCaptureError,
const base::Location&,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment