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

Side by Side Diff: webrtc/video/video_capture_input_unittest.cc

Issue 1606613003: Remove extra_options from VideoCodec. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: compile Created 4 years, 11 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 | « webrtc/video/encoder_state_feedback_unittest.cc ('k') | webrtc/video/vie_channel.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 #include "webrtc/video/video_capture_input.h" 10 #include "webrtc/video/video_capture_input.h"
11 11
12 #include <vector> 12 #include <vector>
13 13
14 #include "testing/gmock/include/gmock/gmock.h" 14 #include "testing/gmock/include/gmock/gmock.h"
15 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
16 #include "webrtc/base/event.h" 16 #include "webrtc/base/event.h"
17 #include "webrtc/base/scoped_ptr.h" 17 #include "webrtc/base/scoped_ptr.h"
18 #include "webrtc/common.h"
19 #include "webrtc/modules/utility/include/mock/mock_process_thread.h" 18 #include "webrtc/modules/utility/include/mock/mock_process_thread.h"
20 #include "webrtc/system_wrappers/include/critical_section_wrapper.h" 19 #include "webrtc/system_wrappers/include/critical_section_wrapper.h"
21 #include "webrtc/system_wrappers/include/ref_count.h" 20 #include "webrtc/system_wrappers/include/ref_count.h"
22 #include "webrtc/system_wrappers/include/scoped_vector.h" 21 #include "webrtc/system_wrappers/include/scoped_vector.h"
23 #include "webrtc/test/fake_texture_frame.h" 22 #include "webrtc/test/fake_texture_frame.h"
24 #include "webrtc/video/send_statistics_proxy.h" 23 #include "webrtc/video/send_statistics_proxy.h"
25 24
26 using ::testing::_; 25 using ::testing::_;
27 using ::testing::Invoke; 26 using ::testing::Invoke;
28 using ::testing::NiceMock; 27 using ::testing::NiceMock;
(...skipping 25 matching lines...) Expand all
54 output_frame_event_(false, false), 53 output_frame_event_(false, false),
55 stats_proxy_(Clock::GetRealTimeClock(), 54 stats_proxy_(Clock::GetRealTimeClock(),
56 webrtc::VideoSendStream::Config(nullptr), 55 webrtc::VideoSendStream::Config(nullptr),
57 webrtc::VideoEncoderConfig::ContentType::kRealtimeVideo) {} 56 webrtc::VideoEncoderConfig::ContentType::kRealtimeVideo) {}
58 57
59 virtual void SetUp() { 58 virtual void SetUp() {
60 EXPECT_CALL(*mock_frame_callback_, DeliverFrame(_)) 59 EXPECT_CALL(*mock_frame_callback_, DeliverFrame(_))
61 .WillRepeatedly( 60 .WillRepeatedly(
62 WithArg<0>(Invoke(this, &VideoCaptureInputTest::AddOutputFrame))); 61 WithArg<0>(Invoke(this, &VideoCaptureInputTest::AddOutputFrame)));
63 62
64 Config config;
65 input_.reset(new internal::VideoCaptureInput( 63 input_.reset(new internal::VideoCaptureInput(
66 mock_process_thread_.get(), mock_frame_callback_.get(), nullptr, 64 mock_process_thread_.get(), mock_frame_callback_.get(), nullptr,
67 &stats_proxy_, nullptr, nullptr)); 65 &stats_proxy_, nullptr, nullptr));
68 } 66 }
69 67
70 virtual void TearDown() { 68 virtual void TearDown() {
71 // VideoCaptureInput accesses |mock_process_thread_| in destructor and 69 // VideoCaptureInput accesses |mock_process_thread_| in destructor and
72 // should 70 // should
73 // be deleted first. 71 // be deleted first.
74 input_.reset(); 72 input_.reset();
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 const int kSizeY = width * height * 2; 294 const int kSizeY = width * height * 2;
297 uint8_t buffer[kSizeY]; 295 uint8_t buffer[kSizeY];
298 memset(buffer, data, kSizeY); 296 memset(buffer, data, kSizeY);
299 frame->CreateFrame(buffer, buffer, buffer, width, height, width, width / 2, 297 frame->CreateFrame(buffer, buffer, buffer, width, height, width, width / 2,
300 width / 2); 298 width / 2);
301 frame->set_render_time_ms(data); 299 frame->set_render_time_ms(data);
302 return frame; 300 return frame;
303 } 301 }
304 302
305 } // namespace webrtc 303 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/video/encoder_state_feedback_unittest.cc ('k') | webrtc/video/vie_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698