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

Side by Side Diff: webrtc/video/rampup_tests.h

Issue 1419193002: Call OnSentPacket for all packets sent in the test framework. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Comments addresded. Created 5 years, 1 month 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/end_to_end_tests.cc ('k') | webrtc/video/rampup_tests.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 10
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 size_t* padding_sent, 56 size_t* padding_sent,
57 size_t* media_sent) const; 57 size_t* media_sent) const;
58 58
59 void ReportResult(const std::string& measurement, 59 void ReportResult(const std::string& measurement,
60 size_t value, 60 size_t value,
61 const std::string& units) const; 61 const std::string& units) const;
62 void TriggerTestDone(); 62 void TriggerTestDone();
63 63
64 rtc::Event event_; 64 rtc::Event event_;
65 Clock* const clock_; 65 Clock* const clock_;
66 FakeNetworkPipe::Config forward_transport_config_;
66 const size_t num_streams_; 67 const size_t num_streams_;
67 const bool rtx_; 68 const bool rtx_;
68 const bool red_; 69 const bool red_;
69 VideoSendStream* send_stream_; 70 VideoSendStream* send_stream_;
71 test::PacketTransport* send_transport_;
70 72
71 private: 73 private:
72 typedef std::map<uint32_t, uint32_t> SsrcMap; 74 typedef std::map<uint32_t, uint32_t> SsrcMap;
73 75
74 Call::Config GetSenderCallConfig() override; 76 Call::Config GetSenderCallConfig() override;
75 void OnStreamsCreated( 77 void OnStreamsCreated(
76 VideoSendStream* send_stream, 78 VideoSendStream* send_stream,
77 const std::vector<VideoReceiveStream*>& receive_streams) override; 79 const std::vector<VideoReceiveStream*>& receive_streams) override;
80 void OnTransportsCreated(test::PacketTransport* send_transport,
81 test::PacketTransport* receive_transport) override;
78 size_t GetNumStreams() const; 82 size_t GetNumStreams() const;
79 void ModifyConfigs(VideoSendStream::Config* send_config, 83 void ModifyConfigs(VideoSendStream::Config* send_config,
80 std::vector<VideoReceiveStream::Config>* receive_configs, 84 std::vector<VideoReceiveStream::Config>* receive_configs,
81 VideoEncoderConfig* encoder_config) override; 85 VideoEncoderConfig* encoder_config) override;
82 void OnCallsCreated(Call* sender_call, Call* receiver_call) override; 86 void OnCallsCreated(Call* sender_call, Call* receiver_call) override;
83 87
84 static bool BitrateStatsPollingThread(void* obj); 88 static bool BitrateStatsPollingThread(void* obj);
85 89
86 const int start_bitrate_bps_; 90 const int start_bitrate_bps_;
87 bool start_bitrate_verified_; 91 bool start_bitrate_verified_;
(...skipping 27 matching lines...) Expand all
115 static const int kExpectedHighBitrateBps = 60000; 119 static const int kExpectedHighBitrateBps = 60000;
116 static const int kLowBandwidthLimitBps = 20000; 120 static const int kLowBandwidthLimitBps = 20000;
117 static const int kExpectedLowBitrateBps = 20000; 121 static const int kExpectedLowBitrateBps = 20000;
118 enum TestStates { kFirstRampup, kLowRate, kSecondRampup }; 122 enum TestStates { kFirstRampup, kLowRate, kSecondRampup };
119 123
120 Call::Config GetReceiverCallConfig() override; 124 Call::Config GetReceiverCallConfig() override;
121 125
122 std::string GetModifierString() const; 126 std::string GetModifierString() const;
123 void EvolveTestState(int bitrate_bps, bool suspended); 127 void EvolveTestState(int bitrate_bps, bool suspended);
124 128
125 FakeNetworkPipe::Config forward_transport_config_;
126 TestStates test_state_; 129 TestStates test_state_;
127 int64_t state_start_ms_; 130 int64_t state_start_ms_;
128 int64_t interval_start_ms_; 131 int64_t interval_start_ms_;
129 int sent_bytes_; 132 int sent_bytes_;
130 }; 133 };
131 } // namespace webrtc 134 } // namespace webrtc
132 #endif // WEBRTC_VIDEO_RAMPUP_TESTS_H_ 135 #endif // WEBRTC_VIDEO_RAMPUP_TESTS_H_
OLDNEW
« no previous file with comments | « webrtc/video/end_to_end_tests.cc ('k') | webrtc/video/rampup_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698