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

Side by Side Diff: content/renderer/media/capture_video_decoder_unittest.cc

Issue 10108009: Move VideoCapture::VideoCaptureCapability to video_capture_types.h (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 8 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
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 "content/renderer/media/capture_video_decoder.h" 6 #include "content/renderer/media/capture_video_decoder.h"
7 #include "content/renderer/media/video_capture_impl.h" 7 #include "content/renderer/media/video_capture_impl.h"
8 #include "content/renderer/media/video_capture_impl_manager.h" 8 #include "content/renderer/media/video_capture_impl_manager.h"
9 #include "media/base/filters.h" 9 #include "media/base/filters.h"
10 #include "media/base/limits.h" 10 #include "media/base/limits.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 class CaptureVideoDecoderTest : public ::testing::Test { 84 class CaptureVideoDecoderTest : public ::testing::Test {
85 protected: 85 protected:
86 CaptureVideoDecoderTest() { 86 CaptureVideoDecoderTest() {
87 message_loop_.reset(new MessageLoop(MessageLoop::TYPE_IO)); 87 message_loop_.reset(new MessageLoop(MessageLoop::TYPE_IO));
88 message_loop_proxy_ = 88 message_loop_proxy_ =
89 base::MessageLoopProxy::current().get(); 89 base::MessageLoopProxy::current().get();
90 vc_manager_ = new MockVideoCaptureImplManager(); 90 vc_manager_ = new MockVideoCaptureImplManager();
91 media::VideoCapture::VideoCaptureCapability capability; 91 media::VideoCapture::VideoCaptureCapability capability;
92 capability.width = kWidth; 92 capability.width = kWidth;
93 capability.height = kHeight; 93 capability.height = kHeight;
94 capability.max_fps = kFPS; 94 capability.frame_rate = kFPS;
95 capability.expected_capture_delay = 0; 95 capability.expected_capture_delay = 0;
96 capability.raw_type = media::VideoFrame::I420; 96 capability.color = media::VideoFrame::I420;
97 capability.interlaced = false; 97 capability.interlaced = false;
98 98
99 decoder_ = new CaptureVideoDecoder(message_loop_proxy_, 99 decoder_ = new CaptureVideoDecoder(message_loop_proxy_,
100 kVideoStreamId, vc_manager_, capability); 100 kVideoStreamId, vc_manager_, capability);
101 decoder_->set_host(&host_); 101 decoder_->set_host(&host_);
102 EXPECT_CALL(statistics_cb_object_, OnStatistics(_)) 102 EXPECT_CALL(statistics_cb_object_, OnStatistics(_))
103 .Times(AnyNumber()); 103 .Times(AnyNumber());
104 104
105 read_cb_ = base::Bind(&CaptureVideoDecoderTest::FrameReady, 105 read_cb_ = base::Bind(&CaptureVideoDecoderTest::FrameReady,
106 base::Unretained(this)); 106 base::Unretained(this));
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 params.session_id = kVideoStreamId; 210 params.session_id = kVideoStreamId;
211 211
212 decoder_->OnDeviceInfoReceived(vc_impl_.get(), params); 212 decoder_->OnDeviceInfoReceived(vc_impl_.get(), params);
213 message_loop_->RunAllPending(); 213 message_loop_->RunAllPending();
214 214
215 EXPECT_EQ(expected_size.width(), decoder_->natural_size().width()); 215 EXPECT_EQ(expected_size.width(), decoder_->natural_size().width());
216 EXPECT_EQ(expected_size.height(), decoder_->natural_size().height()); 216 EXPECT_EQ(expected_size.height(), decoder_->natural_size().height());
217 217
218 Stop(); 218 Stop();
219 } 219 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698