OLD | NEW |
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" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 const ScopedVector<VideoFrame>& frames2); | 46 const ScopedVector<VideoFrame>& frames2); |
47 VideoFrame* CreateVideoFrame(uint8_t length); | 47 VideoFrame* CreateVideoFrame(uint8_t length); |
48 | 48 |
49 class VideoCaptureInputTest : public ::testing::Test { | 49 class VideoCaptureInputTest : public ::testing::Test { |
50 protected: | 50 protected: |
51 VideoCaptureInputTest() | 51 VideoCaptureInputTest() |
52 : mock_process_thread_(new NiceMock<MockProcessThread>), | 52 : mock_process_thread_(new NiceMock<MockProcessThread>), |
53 mock_frame_callback_(new NiceMock<MockVideoCaptureCallback>), | 53 mock_frame_callback_(new NiceMock<MockVideoCaptureCallback>), |
54 output_frame_event_(EventWrapper::Create()), | 54 output_frame_event_(EventWrapper::Create()), |
55 stats_proxy_(Clock::GetRealTimeClock(), | 55 stats_proxy_(Clock::GetRealTimeClock(), |
56 webrtc::VideoSendStream::Config(nullptr)) {} | 56 webrtc::VideoSendStream::Config(nullptr), |
| 57 webrtc::VideoEncoderConfig::ContentType::kRealtimeVideo) {} |
57 | 58 |
58 virtual void SetUp() { | 59 virtual void SetUp() { |
59 EXPECT_CALL(*mock_frame_callback_, DeliverFrame(_)) | 60 EXPECT_CALL(*mock_frame_callback_, DeliverFrame(_)) |
60 .WillRepeatedly( | 61 .WillRepeatedly( |
61 WithArg<0>(Invoke(this, &VideoCaptureInputTest::AddOutputFrame))); | 62 WithArg<0>(Invoke(this, &VideoCaptureInputTest::AddOutputFrame))); |
62 | 63 |
63 Config config; | 64 Config config; |
64 input_.reset(new internal::VideoCaptureInput( | 65 input_.reset(new internal::VideoCaptureInput( |
65 mock_process_thread_.get(), mock_frame_callback_.get(), nullptr, | 66 mock_process_thread_.get(), mock_frame_callback_.get(), nullptr, |
66 &stats_proxy_, nullptr, nullptr)); | 67 &stats_proxy_, nullptr, nullptr)); |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 const int kSizeY = width * height * 2; | 297 const int kSizeY = width * height * 2; |
297 uint8_t buffer[kSizeY]; | 298 uint8_t buffer[kSizeY]; |
298 memset(buffer, data, kSizeY); | 299 memset(buffer, data, kSizeY); |
299 frame->CreateFrame(buffer, buffer, buffer, width, height, width, width / 2, | 300 frame->CreateFrame(buffer, buffer, buffer, width, height, width, width / 2, |
300 width / 2); | 301 width / 2); |
301 frame->set_render_time_ms(data); | 302 frame->set_render_time_ms(data); |
302 return frame; | 303 return frame; |
303 } | 304 } |
304 | 305 |
305 } // namespace webrtc | 306 } // namespace webrtc |
OLD | NEW |