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

Side by Side Diff: media/video/capture/video_capture_device_unittest.cc

Issue 10035054: Merge VideoCaptureDevice::Capability with media::VideoCaptureCapability (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fix a namespace issue Created 8 years, 7 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 unified diff | Download patch
« no previous file with comments | « media/video/capture/video_capture_device.h ('k') | media/video/capture/video_capture_types.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/memory/scoped_ptr.h" 5 #include "base/memory/scoped_ptr.h"
6 #include "base/message_loop.h" 6 #include "base/message_loop.h"
7 #include "base/synchronization/waitable_event.h" 7 #include "base/synchronization/waitable_event.h"
8 #include "base/test/test_timeouts.h" 8 #include "base/test/test_timeouts.h"
9 #include "base/threading/thread.h" 9 #include "base/threading/thread.h"
10 #include "media/video/capture/fake_video_capture_device.h" 10 #include "media/video/capture/fake_video_capture_device.h"
(...skipping 21 matching lines...) Expand all
32 MOCK_METHOD3(OnFrameInfo, void(int width, int height, int frame_rate)); 32 MOCK_METHOD3(OnFrameInfo, void(int width, int height, int frame_rate));
33 33
34 explicit MockFrameObserver(base::WaitableEvent* wait_event) 34 explicit MockFrameObserver(base::WaitableEvent* wait_event)
35 : wait_event_(wait_event) {} 35 : wait_event_(wait_event) {}
36 36
37 virtual void OnError() OVERRIDE { 37 virtual void OnError() OVERRIDE {
38 OnErr(); 38 OnErr();
39 } 39 }
40 40
41 virtual void OnFrameInfo( 41 virtual void OnFrameInfo(
42 const VideoCaptureDevice::Capability& info) OVERRIDE { 42 const VideoCaptureCapability& info) OVERRIDE {
43 OnFrameInfo(info.width, info.height, info.frame_rate); 43 OnFrameInfo(info.width, info.height, info.frame_rate);
44 } 44 }
45 45
46 virtual void OnIncomingCapturedFrame(const uint8* data, int length, 46 virtual void OnIncomingCapturedFrame(const uint8* data, int length,
47 base::Time timestamp) OVERRIDE { 47 base::Time timestamp) OVERRIDE {
48 wait_event_->Signal(); 48 wait_event_->Signal();
49 } 49 }
50 50
51 private: 51 private:
52 base::WaitableEvent* wait_event_; 52 base::WaitableEvent* wait_event_;
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 device->Allocate(640, 480, 30, frame_observer_.get()); 242 device->Allocate(640, 480, 30, frame_observer_.get());
243 243
244 device->Start(); 244 device->Start();
245 EXPECT_TRUE(wait_event_.TimedWait(base::TimeDelta::FromMilliseconds( 245 EXPECT_TRUE(wait_event_.TimedWait(base::TimeDelta::FromMilliseconds(
246 TestTimeouts::action_max_timeout_ms()))); 246 TestTimeouts::action_max_timeout_ms())));
247 device->Stop(); 247 device->Stop();
248 device->DeAllocate(); 248 device->DeAllocate();
249 } 249 }
250 250
251 }; // namespace media 251 }; // namespace media
OLDNEW
« no previous file with comments | « media/video/capture/video_capture_device.h ('k') | media/video/capture/video_capture_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698