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

Side by Side Diff: webrtc/test/call_test.h

Issue 1537273003: Step 1 to prepare call_test.* for combined audio/video tests. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Cleanups 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/call/rampup_tests.cc ('k') | webrtc/test/call_test.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 #ifndef WEBRTC_TEST_COMMON_CALL_TEST_H_ 10 #ifndef WEBRTC_TEST_COMMON_CALL_TEST_H_
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 60
61 void CreateStreams(); 61 void CreateStreams();
62 void Start(); 62 void Start();
63 void Stop(); 63 void Stop();
64 void DestroyStreams(); 64 void DestroyStreams();
65 65
66 Clock* const clock_; 66 Clock* const clock_;
67 67
68 rtc::scoped_ptr<Call> sender_call_; 68 rtc::scoped_ptr<Call> sender_call_;
69 rtc::scoped_ptr<PacketTransport> send_transport_; 69 rtc::scoped_ptr<PacketTransport> send_transport_;
70 VideoSendStream::Config send_config_; 70 VideoSendStream::Config video_send_config_;
71 VideoEncoderConfig encoder_config_; 71 VideoEncoderConfig video_encoder_config_;
72 VideoSendStream* send_stream_; 72 VideoSendStream* video_send_stream_;
73 73
74 rtc::scoped_ptr<Call> receiver_call_; 74 rtc::scoped_ptr<Call> receiver_call_;
75 rtc::scoped_ptr<PacketTransport> receive_transport_; 75 rtc::scoped_ptr<PacketTransport> receive_transport_;
76 std::vector<VideoReceiveStream::Config> receive_configs_; 76 std::vector<VideoReceiveStream::Config> video_receive_configs_;
77 std::vector<VideoReceiveStream*> receive_streams_; 77 std::vector<VideoReceiveStream*> video_receive_streams_;
78 78
79 rtc::scoped_ptr<test::FrameGeneratorCapturer> frame_generator_capturer_; 79 rtc::scoped_ptr<test::FrameGeneratorCapturer> frame_generator_capturer_;
80 test::FakeEncoder fake_encoder_; 80 test::FakeEncoder fake_encoder_;
81 ScopedVector<VideoDecoder> allocated_decoders_; 81 ScopedVector<VideoDecoder> allocated_decoders_;
82 }; 82 };
83 83
84 class BaseTest : public RtpRtcpObserver { 84 class BaseTest : public RtpRtcpObserver {
85 public: 85 public:
86 explicit BaseTest(unsigned int timeout_ms); 86 explicit BaseTest(unsigned int timeout_ms);
87 virtual ~BaseTest(); 87 virtual ~BaseTest();
88 88
89 virtual void PerformTest() = 0; 89 virtual void PerformTest() = 0;
90 virtual bool ShouldCreateReceivers() const = 0; 90 virtual bool ShouldCreateReceivers() const = 0;
91 91
92 virtual size_t GetNumStreams() const; 92 virtual size_t GetNumStreams() const;
93 93
94 virtual Call::Config GetSenderCallConfig(); 94 virtual Call::Config GetSenderCallConfig();
95 virtual Call::Config GetReceiverCallConfig(); 95 virtual Call::Config GetReceiverCallConfig();
96 virtual void OnCallsCreated(Call* sender_call, Call* receiver_call); 96 virtual void OnCallsCreated(Call* sender_call, Call* receiver_call);
97 virtual void OnTransportsCreated(PacketTransport* send_transport, 97 virtual void OnTransportsCreated(PacketTransport* send_transport,
98 PacketTransport* receive_transport); 98 PacketTransport* receive_transport);
99 99
100 virtual void ModifyConfigs( 100 virtual void ModifyVideoConfigs(
101 VideoSendStream::Config* send_config, 101 VideoSendStream::Config* send_config,
102 std::vector<VideoReceiveStream::Config>* receive_configs, 102 std::vector<VideoReceiveStream::Config>* receive_configs,
103 VideoEncoderConfig* encoder_config); 103 VideoEncoderConfig* encoder_config);
104 virtual void OnStreamsCreated( 104 virtual void OnVideoStreamsCreated(
105 VideoSendStream* send_stream, 105 VideoSendStream* send_stream,
106 const std::vector<VideoReceiveStream*>& receive_streams); 106 const std::vector<VideoReceiveStream*>& receive_streams);
107 107
108 virtual void OnFrameGeneratorCapturerCreated( 108 virtual void OnFrameGeneratorCapturerCreated(
109 FrameGeneratorCapturer* frame_generator_capturer); 109 FrameGeneratorCapturer* frame_generator_capturer);
110 }; 110 };
111 111
112 class SendTest : public BaseTest { 112 class SendTest : public BaseTest {
113 public: 113 public:
114 explicit SendTest(unsigned int timeout_ms); 114 explicit SendTest(unsigned int timeout_ms);
115 115
116 bool ShouldCreateReceivers() const override; 116 bool ShouldCreateReceivers() const override;
117 }; 117 };
118 118
119 class EndToEndTest : public BaseTest { 119 class EndToEndTest : public BaseTest {
120 public: 120 public:
121 explicit EndToEndTest(unsigned int timeout_ms); 121 explicit EndToEndTest(unsigned int timeout_ms);
122 122
123 bool ShouldCreateReceivers() const override; 123 bool ShouldCreateReceivers() const override;
124 }; 124 };
125 125
126 } // namespace test 126 } // namespace test
127 } // namespace webrtc 127 } // namespace webrtc
128 128
129 #endif // WEBRTC_TEST_COMMON_CALL_TEST_H_ 129 #endif // WEBRTC_TEST_COMMON_CALL_TEST_H_
OLDNEW
« no previous file with comments | « webrtc/call/rampup_tests.cc ('k') | webrtc/test/call_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698