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

Side by Side Diff: media/video/capture/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: fixes from bbudge Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/video/capture/video_capture_device.h ('k') | media/video/capture/video_capture_proxy.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/bind.h" 5 #include "base/bind.h"
6 #include "base/bind_helpers.h" 6 #include "base/bind_helpers.h"
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/message_loop/message_loop_proxy.h" 9 #include "base/message_loop/message_loop_proxy.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 using ::testing::_; 57 using ::testing::_;
58 using ::testing::AnyNumber; 58 using ::testing::AnyNumber;
59 using ::testing::Return; 59 using ::testing::Return;
60 using ::testing::AtLeast; 60 using ::testing::AtLeast;
61 using ::testing::SaveArg; 61 using ::testing::SaveArg;
62 62
63 namespace media { 63 namespace media {
64 64
65 class MockClient : public media::VideoCaptureDevice::Client { 65 class MockClient : public media::VideoCaptureDevice::Client {
66 public: 66 public:
67 MOCK_METHOD0(ReserveOutputBuffer, scoped_refptr<media::VideoFrame>()); 67 MOCK_METHOD1(ReserveOutputBuffer,
68 scoped_refptr<media::VideoFrame>(const gfx::Size&));
68 MOCK_METHOD0(OnErr, void()); 69 MOCK_METHOD0(OnErr, void());
69 MOCK_METHOD1(OnFrameInfo, void(const VideoCaptureCapability&)); 70 MOCK_METHOD1(OnFrameInfo, void(const VideoCaptureCapability&));
70 MOCK_METHOD1(OnFrameInfoChanged, void(const VideoCaptureCapability&)); 71 MOCK_METHOD1(OnFrameInfoChanged, void(const VideoCaptureCapability&));
71 72
72 explicit MockClient( 73 explicit MockClient(
73 base::Closure frame_cb) 74 base::Closure frame_cb)
74 : main_thread_(base::MessageLoopProxy::current()), 75 : main_thread_(base::MessageLoopProxy::current()),
75 frame_cb_(frame_cb) {} 76 frame_cb_(frame_cb) {}
76 77
77 virtual void OnError() OVERRIDE { 78 virtual void OnError() OVERRIDE {
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 &capture_formats); 477 &capture_formats);
477 EXPECT_GE(capture_formats.size(), 1u); 478 EXPECT_GE(capture_formats.size(), 1u);
478 EXPECT_EQ(capture_formats[0].width, 640); 479 EXPECT_EQ(capture_formats[0].width, 640);
479 EXPECT_EQ(capture_formats[0].height, 480); 480 EXPECT_EQ(capture_formats[0].height, 480);
480 EXPECT_EQ(capture_formats[0].color, media::PIXEL_FORMAT_I420); 481 EXPECT_EQ(capture_formats[0].color, media::PIXEL_FORMAT_I420);
481 EXPECT_GE(capture_formats[0].frame_rate, 20); 482 EXPECT_GE(capture_formats[0].frame_rate, 20);
482 } 483 }
483 } 484 }
484 485
485 }; // namespace media 486 }; // namespace media
OLDNEW
« no previous file with comments | « media/video/capture/video_capture_device.h ('k') | media/video/capture/video_capture_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698