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

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

Issue 1273363005: Add send transports to individual webrtc::Call streams. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase+comment Created 5 years, 3 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/transport_adapter.cc ('k') | webrtc/video/video_receive_stream.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 /* 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 const ScopedVector<VideoFrame>& frames2); 47 const ScopedVector<VideoFrame>& frames2);
48 VideoFrame* CreateVideoFrame(uint8_t length); 48 VideoFrame* CreateVideoFrame(uint8_t length);
49 49
50 class VideoCaptureInputTest : public ::testing::Test { 50 class VideoCaptureInputTest : public ::testing::Test {
51 protected: 51 protected:
52 VideoCaptureInputTest() 52 VideoCaptureInputTest()
53 : mock_process_thread_(new NiceMock<MockProcessThread>), 53 : mock_process_thread_(new NiceMock<MockProcessThread>),
54 mock_frame_callback_(new NiceMock<MockVideoCaptureCallback>), 54 mock_frame_callback_(new NiceMock<MockVideoCaptureCallback>),
55 output_frame_event_(EventWrapper::Create()), 55 output_frame_event_(EventWrapper::Create()),
56 stats_proxy_(Clock::GetRealTimeClock(), 56 stats_proxy_(Clock::GetRealTimeClock(),
57 webrtc::VideoSendStream::Config()) {} 57 webrtc::VideoSendStream::Config(nullptr)) {}
58 58
59 virtual void SetUp() { 59 virtual void SetUp() {
60 EXPECT_CALL(*mock_frame_callback_, DeliverFrame(_)) 60 EXPECT_CALL(*mock_frame_callback_, DeliverFrame(_))
61 .WillRepeatedly( 61 .WillRepeatedly(
62 WithArg<0>(Invoke(this, &VideoCaptureInputTest::AddOutputFrame))); 62 WithArg<0>(Invoke(this, &VideoCaptureInputTest::AddOutputFrame)));
63 63
64 Config config; 64 Config config;
65 input_.reset(new internal::VideoCaptureInput( 65 input_.reset(new internal::VideoCaptureInput(
66 mock_process_thread_.get(), mock_frame_callback_.get(), nullptr, 66 mock_process_thread_.get(), mock_frame_callback_.get(), nullptr,
67 &stats_proxy_, nullptr)); 67 &stats_proxy_, nullptr));
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 const int kSizeY = width * height * 2; 297 const int kSizeY = width * height * 2;
298 uint8_t buffer[kSizeY]; 298 uint8_t buffer[kSizeY];
299 memset(buffer, data, kSizeY); 299 memset(buffer, data, kSizeY);
300 frame->CreateFrame(buffer, buffer, buffer, width, height, width, width / 2, 300 frame->CreateFrame(buffer, buffer, buffer, width, height, width, width / 2,
301 width / 2); 301 width / 2);
302 frame->set_render_time_ms(data); 302 frame->set_render_time_ms(data);
303 return frame; 303 return frame;
304 } 304 }
305 305
306 } // namespace webrtc 306 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/video/transport_adapter.cc ('k') | webrtc/video/video_receive_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698