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

Unified Diff: content/browser/renderer_host/media/web_contents_video_capture_device_unittest.cc

Issue 23551011: From Video Capture, abolish OnFrameInfo and enable resolution changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix constant declaration issue. Created 7 years, 2 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/renderer_host/media/web_contents_video_capture_device_unittest.cc
diff --git a/content/browser/renderer_host/media/web_contents_video_capture_device_unittest.cc b/content/browser/renderer_host/media/web_contents_video_capture_device_unittest.cc
index d56fb3cab4c2a1dacac660bb8fab9cbcf1b88534..d430b677b4fd2ce7d9bce0095658d262568c04ab 100644
--- a/content/browser/renderer_host/media/web_contents_video_capture_device_unittest.cc
+++ b/content/browser/renderer_host/media/web_contents_video_capture_device_unittest.cc
@@ -311,18 +311,14 @@ class StubClient : public media::VideoCaptureDevice::Client {
const base::Closure& error_callback)
: color_callback_(color_callback),
error_callback_(error_callback) {
- buffer_pool_ = new VideoCaptureBufferPool(
- media::VideoFrame::AllocationSize(media::VideoFrame::I420,
- gfx::Size(kTestWidth, kTestHeight)),
- 2);
- EXPECT_TRUE(buffer_pool_->Allocate());
+ buffer_pool_ = new VideoCaptureBufferPool(2);
}
virtual ~StubClient() {}
- virtual scoped_refptr<media::VideoFrame> ReserveOutputBuffer() OVERRIDE {
- return buffer_pool_->ReserveI420VideoFrame(gfx::Size(kTestWidth,
- kTestHeight),
- 0);
+ virtual scoped_refptr<media::VideoFrame> ReserveOutputBuffer(
+ const gfx::Size& size) OVERRIDE {
+ int buffer_id_to_drop = VideoCaptureBufferPool::kInvalidId;
+ return buffer_pool_->ReserveI420VideoFrame(size, 0, &buffer_id_to_drop);
}
virtual void OnIncomingCapturedFrame(
@@ -358,10 +354,7 @@ class StubClient : public media::VideoCaptureDevice::Client {
}
virtual void OnFrameInfo(const media::VideoCaptureCapability& info) OVERRIDE {
- EXPECT_EQ(kTestWidth, info.width);
- EXPECT_EQ(kTestHeight, info.height);
EXPECT_EQ(kTestFramesPerSecond, info.frame_rate);
- EXPECT_EQ(media::PIXEL_FORMAT_I420, info.color);
}
private:

Powered by Google App Engine
This is Rietveld 408576698