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

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

Issue 2351633002: Let ViEEncoder handle resolution changes. (Closed)
Patch Set: rebased Created 4 years, 2 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/media/engine/webrtcvideoengine2_unittest.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_CALL_TEST_H_ 10 #ifndef WEBRTC_TEST_CALL_TEST_H_
11 #define WEBRTC_TEST_CALL_TEST_H_ 11 #define WEBRTC_TEST_CALL_TEST_H_
12 12
13 #include <memory> 13 #include <memory>
14 #include <vector> 14 #include <vector>
15 15
16 #include "webrtc/call.h" 16 #include "webrtc/call.h"
17 #include "webrtc/test/encoder_settings.h"
17 #include "webrtc/test/fake_audio_device.h" 18 #include "webrtc/test/fake_audio_device.h"
18 #include "webrtc/test/fake_decoder.h" 19 #include "webrtc/test/fake_decoder.h"
19 #include "webrtc/test/fake_encoder.h" 20 #include "webrtc/test/fake_encoder.h"
20 #include "webrtc/test/fake_videorenderer.h" 21 #include "webrtc/test/fake_videorenderer.h"
21 #include "webrtc/test/frame_generator_capturer.h" 22 #include "webrtc/test/frame_generator_capturer.h"
22 #include "webrtc/test/rtp_rtcp_observer.h" 23 #include "webrtc/test/rtp_rtcp_observer.h"
23 24
24 namespace webrtc { 25 namespace webrtc {
25 26
26 class VoEBase; 27 class VoEBase;
27 class VoECodec; 28 class VoECodec;
28 29
29 namespace test { 30 namespace test {
30 31
31 class BaseTest; 32 class BaseTest;
32 33
33 class CallTest : public ::testing::Test { 34 class CallTest : public ::testing::Test {
34 public: 35 public:
35 CallTest(); 36 CallTest();
36 virtual ~CallTest(); 37 virtual ~CallTest();
37 38
38 static const size_t kNumSsrcs = 3; 39 static const size_t kNumSsrcs = 3;
39 40 static const int kDefaultWidth = 320;
41 static const int kDefaultHeight = 180;
42 static const int kDefaultFramerate = 30;
40 static const int kDefaultTimeoutMs; 43 static const int kDefaultTimeoutMs;
41 static const int kLongTimeoutMs; 44 static const int kLongTimeoutMs;
42 static const uint8_t kVideoSendPayloadType; 45 static const uint8_t kVideoSendPayloadType;
43 static const uint8_t kSendRtxPayloadType; 46 static const uint8_t kSendRtxPayloadType;
44 static const uint8_t kFakeVideoSendPayloadType; 47 static const uint8_t kFakeVideoSendPayloadType;
45 static const uint8_t kRedPayloadType; 48 static const uint8_t kRedPayloadType;
46 static const uint8_t kRtxRedPayloadType; 49 static const uint8_t kRtxRedPayloadType;
47 static const uint8_t kUlpfecPayloadType; 50 static const uint8_t kUlpfecPayloadType;
48 static const uint8_t kAudioSendPayloadType; 51 static const uint8_t kAudioSendPayloadType;
49 static const uint32_t kSendRtxSsrcs[kNumSsrcs]; 52 static const uint32_t kSendRtxSsrcs[kNumSsrcs];
(...skipping 13 matching lines...) Expand all
63 const Call::Config& receiver_config); 66 const Call::Config& receiver_config);
64 void CreateSenderCall(const Call::Config& config); 67 void CreateSenderCall(const Call::Config& config);
65 void CreateReceiverCall(const Call::Config& config); 68 void CreateReceiverCall(const Call::Config& config);
66 void DestroyCalls(); 69 void DestroyCalls();
67 70
68 void CreateSendConfig(size_t num_video_streams, 71 void CreateSendConfig(size_t num_video_streams,
69 size_t num_audio_streams, 72 size_t num_audio_streams,
70 Transport* send_transport); 73 Transport* send_transport);
71 void CreateMatchingReceiveConfigs(Transport* rtcp_send_transport); 74 void CreateMatchingReceiveConfigs(Transport* rtcp_send_transport);
72 75
73 void CreateFrameGeneratorCapturerWithDrift(Clock* drift_clock, float speed); 76 void CreateFrameGeneratorCapturerWithDrift(Clock* drift_clock,
74 void CreateFrameGeneratorCapturer(); 77 float speed,
78 int framerate,
79 int width,
80 int height);
81 void CreateFrameGeneratorCapturer(int framerate, int width, int height);
75 void CreateFakeAudioDevices(); 82 void CreateFakeAudioDevices();
76 83
77 void CreateVideoStreams(); 84 void CreateVideoStreams();
78 void CreateAudioStreams(); 85 void CreateAudioStreams();
79 void Start(); 86 void Start();
80 void Stop(); 87 void Stop();
81 void DestroyStreams(); 88 void DestroyStreams();
82 void SetFakeVideoCaptureRotation(VideoRotation rotation); 89 void SetFakeVideoCaptureRotation(VideoRotation rotation);
83 90
84 Clock* const clock_; 91 Clock* const clock_;
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 virtual Call::Config GetReceiverCallConfig(); 156 virtual Call::Config GetReceiverCallConfig();
150 virtual void OnCallsCreated(Call* sender_call, Call* receiver_call); 157 virtual void OnCallsCreated(Call* sender_call, Call* receiver_call);
151 158
152 virtual test::PacketTransport* CreateSendTransport(Call* sender_call); 159 virtual test::PacketTransport* CreateSendTransport(Call* sender_call);
153 virtual test::PacketTransport* CreateReceiveTransport(); 160 virtual test::PacketTransport* CreateReceiveTransport();
154 161
155 virtual void ModifyVideoConfigs( 162 virtual void ModifyVideoConfigs(
156 VideoSendStream::Config* send_config, 163 VideoSendStream::Config* send_config,
157 std::vector<VideoReceiveStream::Config>* receive_configs, 164 std::vector<VideoReceiveStream::Config>* receive_configs,
158 VideoEncoderConfig* encoder_config); 165 VideoEncoderConfig* encoder_config);
166 virtual void ModifyVideoCaptureStartResolution(int* width,
167 int* heigt,
168 int* frame_rate);
159 virtual void OnVideoStreamsCreated( 169 virtual void OnVideoStreamsCreated(
160 VideoSendStream* send_stream, 170 VideoSendStream* send_stream,
161 const std::vector<VideoReceiveStream*>& receive_streams); 171 const std::vector<VideoReceiveStream*>& receive_streams);
162 172
163 virtual void ModifyAudioConfigs( 173 virtual void ModifyAudioConfigs(
164 AudioSendStream::Config* send_config, 174 AudioSendStream::Config* send_config,
165 std::vector<AudioReceiveStream::Config>* receive_configs); 175 std::vector<AudioReceiveStream::Config>* receive_configs);
166 virtual void OnAudioStreamsCreated( 176 virtual void OnAudioStreamsCreated(
167 AudioSendStream* send_stream, 177 AudioSendStream* send_stream,
168 const std::vector<AudioReceiveStream*>& receive_streams); 178 const std::vector<AudioReceiveStream*>& receive_streams);
(...skipping 13 matching lines...) Expand all
182 public: 192 public:
183 explicit EndToEndTest(unsigned int timeout_ms); 193 explicit EndToEndTest(unsigned int timeout_ms);
184 194
185 bool ShouldCreateReceivers() const override; 195 bool ShouldCreateReceivers() const override;
186 }; 196 };
187 197
188 } // namespace test 198 } // namespace test
189 } // namespace webrtc 199 } // namespace webrtc
190 200
191 #endif // WEBRTC_TEST_CALL_TEST_H_ 201 #endif // WEBRTC_TEST_CALL_TEST_H_
OLDNEW
« no previous file with comments | « webrtc/media/engine/webrtcvideoengine2_unittest.cc ('k') | webrtc/test/call_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698