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

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

Issue 1433393002: Add separate send-side UMA stats for screenshare and video. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fixed compile error Created 5 years 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/send_statistics_proxy_unittest.cc ('k') | webrtc/video/video_send_stream.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"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « webrtc/video/send_statistics_proxy_unittest.cc ('k') | webrtc/video/video_send_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698