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

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

Issue 2974903002: Add rtpdump and rtc log functionality to screenshare_loopback and video_loopback (Closed)
Patch Set: Cleanup Created 3 years, 5 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 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_quality_test.h" 10 #include "webrtc/video/video_quality_test.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 #include "webrtc/system_wrappers/include/field_trial.h" 42 #include "webrtc/system_wrappers/include/field_trial.h"
43 #include "webrtc/test/gtest.h" 43 #include "webrtc/test/gtest.h"
44 #include "webrtc/test/layer_filtering_transport.h" 44 #include "webrtc/test/layer_filtering_transport.h"
45 #include "webrtc/test/run_loop.h" 45 #include "webrtc/test/run_loop.h"
46 #include "webrtc/test/statistics.h" 46 #include "webrtc/test/statistics.h"
47 #include "webrtc/test/testsupport/fileutils.h" 47 #include "webrtc/test/testsupport/fileutils.h"
48 #include "webrtc/test/vcm_capturer.h" 48 #include "webrtc/test/vcm_capturer.h"
49 #include "webrtc/test/video_renderer.h" 49 #include "webrtc/test/video_renderer.h"
50 #include "webrtc/voice_engine/include/voe_base.h" 50 #include "webrtc/voice_engine/include/voe_base.h"
51 51
52 #include "webrtc/test/rtp_file_writer.h"
53
52 namespace { 54 namespace {
53 55
54 constexpr int kSendStatsPollingIntervalMs = 1000; 56 constexpr int kSendStatsPollingIntervalMs = 1000;
55 constexpr int kPayloadTypeH264 = 122; 57 constexpr int kPayloadTypeH264 = 122;
56 constexpr int kPayloadTypeVP8 = 123; 58 constexpr int kPayloadTypeVP8 = 123;
57 constexpr int kPayloadTypeVP9 = 124; 59 constexpr int kPayloadTypeVP9 = 124;
58 60
59 constexpr size_t kMaxComparisons = 10; 61 constexpr size_t kMaxComparisons = 10;
60 constexpr char kSyncGroup[] = "av_sync"; 62 constexpr char kSyncGroup[] = "av_sync";
61 constexpr int kOpusMinBitrateBps = 6000; 63 constexpr int kOpusMinBitrateBps = 6000;
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 double avg_ssim_threshold, 147 double avg_ssim_threshold,
146 int duration_frames, 148 int duration_frames,
147 FILE* graph_data_output_file, 149 FILE* graph_data_output_file,
148 const std::string& graph_title, 150 const std::string& graph_title,
149 uint32_t ssrc_to_analyze, 151 uint32_t ssrc_to_analyze,
150 uint32_t rtx_ssrc_to_analyze, 152 uint32_t rtx_ssrc_to_analyze,
151 size_t selected_stream, 153 size_t selected_stream,
152 int selected_sl, 154 int selected_sl,
153 int selected_tl, 155 int selected_tl,
154 bool is_quick_test_enabled, 156 bool is_quick_test_enabled,
155 Clock* clock) 157 Clock* clock,
158 std::string rtp_dump_name)
156 : transport_(transport), 159 : transport_(transport),
157 receiver_(nullptr), 160 receiver_(nullptr),
158 call_(nullptr), 161 call_(nullptr),
159 send_stream_(nullptr), 162 send_stream_(nullptr),
160 receive_stream_(nullptr), 163 receive_stream_(nullptr),
161 captured_frame_forwarder_(this, clock), 164 captured_frame_forwarder_(this, clock),
162 test_label_(test_label), 165 test_label_(test_label),
163 graph_data_output_file_(graph_data_output_file), 166 graph_data_output_file_(graph_data_output_file),
164 graph_title_(graph_title), 167 graph_title_(graph_title),
165 ssrc_to_analyze_(ssrc_to_analyze), 168 ssrc_to_analyze_(ssrc_to_analyze),
(...skipping 15 matching lines...) Expand all
181 total_media_bytes_(0), 184 total_media_bytes_(0),
182 first_sending_time_(0), 185 first_sending_time_(0),
183 last_sending_time_(0), 186 last_sending_time_(0),
184 cpu_time_(0), 187 cpu_time_(0),
185 wallclock_time_(0), 188 wallclock_time_(0),
186 avg_psnr_threshold_(avg_psnr_threshold), 189 avg_psnr_threshold_(avg_psnr_threshold),
187 avg_ssim_threshold_(avg_ssim_threshold), 190 avg_ssim_threshold_(avg_ssim_threshold),
188 is_quick_test_enabled_(is_quick_test_enabled), 191 is_quick_test_enabled_(is_quick_test_enabled),
189 stats_polling_thread_(&PollStatsThread, this, "StatsPoller"), 192 stats_polling_thread_(&PollStatsThread, this, "StatsPoller"),
190 comparison_available_event_(false, false), 193 comparison_available_event_(false, false),
191 done_(true, false) { 194 done_(true, false),
195 clock_(clock),
196 start_ms_(clock->TimeInMilliseconds()) {
192 // Create thread pool for CPU-expensive PSNR/SSIM calculations. 197 // Create thread pool for CPU-expensive PSNR/SSIM calculations.
193 198
194 // Try to use about as many threads as cores, but leave kMinCoresLeft alone, 199 // Try to use about as many threads as cores, but leave kMinCoresLeft alone,
195 // so that we don't accidentally starve "real" worker threads (codec etc). 200 // so that we don't accidentally starve "real" worker threads (codec etc).
196 // Also, don't allocate more than kMaxComparisonThreads, even if there are 201 // Also, don't allocate more than kMaxComparisonThreads, even if there are
197 // spare cores. 202 // spare cores.
198 203
199 uint32_t num_cores = CpuInfo::DetectNumberOfCores(); 204 uint32_t num_cores = CpuInfo::DetectNumberOfCores();
200 RTC_DCHECK_GE(num_cores, 1); 205 RTC_DCHECK_GE(num_cores, 1);
201 static const uint32_t kMinCoresLeft = 4; 206 static const uint32_t kMinCoresLeft = 4;
202 static const uint32_t kMaxComparisonThreads = 8; 207 static const uint32_t kMaxComparisonThreads = 8;
203 208
204 if (num_cores <= kMinCoresLeft) { 209 if (num_cores <= kMinCoresLeft) {
205 num_cores = 1; 210 num_cores = 1;
206 } else { 211 } else {
207 num_cores -= kMinCoresLeft; 212 num_cores -= kMinCoresLeft;
208 num_cores = std::min(num_cores, kMaxComparisonThreads); 213 num_cores = std::min(num_cores, kMaxComparisonThreads);
209 } 214 }
210 215
211 for (uint32_t i = 0; i < num_cores; ++i) { 216 for (uint32_t i = 0; i < num_cores; ++i) {
212 rtc::PlatformThread* thread = 217 rtc::PlatformThread* thread =
213 new rtc::PlatformThread(&FrameComparisonThread, this, "Analyzer"); 218 new rtc::PlatformThread(&FrameComparisonThread, this, "Analyzer");
214 thread->Start(); 219 thread->Start();
215 comparison_thread_pool_.push_back(thread); 220 comparison_thread_pool_.push_back(thread);
216 } 221 }
222
223 if (rtp_dump_name.length() > 0) {
sprang_webrtc 2017/07/12 13:27:05 nit: if (!rtp_dump_name.empty()) ...
ilnik 2017/07/12 13:58:53 Done.
224 fprintf(stdout, "Writing rtp dump to %s\n", rtp_dump_name.c_str());
225 rtp_file_writer_.reset(test::RtpFileWriter::Create(
226 test::RtpFileWriter::kRtpDump, rtp_dump_name));
227 }
217 } 228 }
218 229
219 ~VideoAnalyzer() { 230 ~VideoAnalyzer() {
220 for (rtc::PlatformThread* thread : comparison_thread_pool_) { 231 for (rtc::PlatformThread* thread : comparison_thread_pool_) {
221 thread->Stop(); 232 thread->Stop();
222 delete thread; 233 delete thread;
223 } 234 }
224 } 235 }
225 236
226 virtual void SetReceiver(PacketReceiver* receiver) { receiver_ = receiver; } 237 virtual void SetReceiver(PacketReceiver* receiver) { receiver_ = receiver; }
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 270
260 DeliveryStatus DeliverPacket(MediaType media_type, 271 DeliveryStatus DeliverPacket(MediaType media_type,
261 const uint8_t* packet, 272 const uint8_t* packet,
262 size_t length, 273 size_t length,
263 const PacketTime& packet_time) override { 274 const PacketTime& packet_time) override {
264 // Ignore timestamps of RTCP packets. They're not synchronized with 275 // Ignore timestamps of RTCP packets. They're not synchronized with
265 // RTP packet timestamps and so they would confuse wrap_handler_. 276 // RTP packet timestamps and so they would confuse wrap_handler_.
266 if (RtpHeaderParser::IsRtcp(packet, length)) { 277 if (RtpHeaderParser::IsRtcp(packet, length)) {
267 return receiver_->DeliverPacket(media_type, packet, length, packet_time); 278 return receiver_->DeliverPacket(media_type, packet, length, packet_time);
268 } 279 }
280
281 if (rtp_file_writer_) {
282 std::unique_ptr<test::RtpPacket> p(new test::RtpPacket());
sprang_webrtc 2017/07/12 13:27:05 Just stack allocate it instead.
ilnik 2017/07/12 13:58:52 Done.
283 memcpy(p->data, packet, length);
284 p->length = length;
285 p->original_length = length;
286 p->time_ms = clock_->TimeInMilliseconds() - start_ms_;
287 rtp_file_writer_->WritePacket(p.get());
288 }
289
269 RtpUtility::RtpHeaderParser parser(packet, length); 290 RtpUtility::RtpHeaderParser parser(packet, length);
270 RTPHeader header; 291 RTPHeader header;
271 parser.Parse(&header); 292 parser.Parse(&header);
272 if (!IsFlexfec(header.payloadType) && 293 if (!IsFlexfec(header.payloadType) &&
273 (header.ssrc == ssrc_to_analyze_ || 294 (header.ssrc == ssrc_to_analyze_ ||
274 header.ssrc == rtx_ssrc_to_analyze_)) { 295 header.ssrc == rtx_ssrc_to_analyze_)) {
275 // Ignore FlexFEC timestamps, to avoid collisions with media timestamps. 296 // Ignore FlexFEC timestamps, to avoid collisions with media timestamps.
276 // (FlexFEC and media are sent on different SSRCs, which have different 297 // (FlexFEC and media are sent on different SSRCs, which have different
277 // timestamps spaces.) 298 // timestamps spaces.)
278 // Also ignore packets from wrong SSRC, but include retransmits. 299 // Also ignore packets from wrong SSRC, but include retransmits.
(...skipping 773 matching lines...) Expand 10 before | Expand all | Expand 10 after
1052 const double avg_psnr_threshold_; 1073 const double avg_psnr_threshold_;
1053 const double avg_ssim_threshold_; 1074 const double avg_ssim_threshold_;
1054 bool is_quick_test_enabled_; 1075 bool is_quick_test_enabled_;
1055 1076
1056 rtc::CriticalSection comparison_lock_; 1077 rtc::CriticalSection comparison_lock_;
1057 std::vector<rtc::PlatformThread*> comparison_thread_pool_; 1078 std::vector<rtc::PlatformThread*> comparison_thread_pool_;
1058 rtc::PlatformThread stats_polling_thread_; 1079 rtc::PlatformThread stats_polling_thread_;
1059 rtc::Event comparison_available_event_; 1080 rtc::Event comparison_available_event_;
1060 std::deque<FrameComparison> comparisons_ GUARDED_BY(comparison_lock_); 1081 std::deque<FrameComparison> comparisons_ GUARDED_BY(comparison_lock_);
1061 rtc::Event done_; 1082 rtc::Event done_;
1083
1084 std::unique_ptr<test::RtpFileWriter> rtp_file_writer_;
1085 Clock* clock_;
sprang_webrtc 2017/07/12 13:27:05 Clock* const clock_;
ilnik 2017/07/12 13:58:52 Done.
1086 const int64_t start_ms_;
1062 }; 1087 };
1063 1088
1064 class Vp8EncoderFactory : public VideoEncoderFactory { 1089 class Vp8EncoderFactory : public VideoEncoderFactory {
1065 public: 1090 public:
1066 Vp8EncoderFactory() = default; 1091 Vp8EncoderFactory() = default;
1067 ~Vp8EncoderFactory() override { RTC_CHECK(live_encoders_.empty()); } 1092 ~Vp8EncoderFactory() override { RTC_CHECK(live_encoders_.empty()); }
1068 1093
1069 VideoEncoder* Create() override { 1094 VideoEncoder* Create() override {
1070 VideoEncoder* encoder = VP8Encoder::Create(); 1095 VideoEncoder* encoder = VP8Encoder::Create();
1071 live_encoders_.insert(encoder); 1096 live_encoders_.insert(encoder);
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after
1707 1732
1708 FILE* graph_data_output_file = nullptr; 1733 FILE* graph_data_output_file = nullptr;
1709 if (!params_.analyzer.graph_data_output_filename.empty()) { 1734 if (!params_.analyzer.graph_data_output_filename.empty()) {
1710 graph_data_output_file = 1735 graph_data_output_file =
1711 fopen(params_.analyzer.graph_data_output_filename.c_str(), "w"); 1736 fopen(params_.analyzer.graph_data_output_filename.c_str(), "w");
1712 RTC_CHECK(graph_data_output_file) 1737 RTC_CHECK(graph_data_output_file)
1713 << "Can't open the file " << params_.analyzer.graph_data_output_filename 1738 << "Can't open the file " << params_.analyzer.graph_data_output_filename
1714 << "!"; 1739 << "!";
1715 } 1740 }
1716 1741
1742 bool event_log_started = false;
sprang_webrtc 2017/07/12 13:27:05 nit: git cl format?
ilnik 2017/07/12 13:58:52 Done.
1743 if (params.rtc_event_log_name.length() > 0) {
sprang_webrtc 2017/07/12 13:27:05 .empty()
ilnik 2017/07/12 13:58:52 Done.
1744 event_log_ = RtcEventLog::Create(clock_);
1745 event_log_started = event_log_->StartLogging(params.rtc_event_log_name, -1);
sprang_webrtc 2017/07/12 13:27:05 Why would StartLogging() fail? Can you just DCHECK
ilnik 2017/07/12 13:58:52 Done.
1746 }
1747
1717 Call::Config call_config(event_log_.get()); 1748 Call::Config call_config(event_log_.get());
1718 call_config.bitrate_config = params.call.call_bitrate_config; 1749 call_config.bitrate_config = params.call.call_bitrate_config;
1719 CreateCalls(call_config, call_config); 1750 CreateCalls(call_config, call_config);
1720 1751
1721 test::LayerFilteringTransport send_transport( 1752 test::LayerFilteringTransport send_transport(
1722 params_.pipe, sender_call_.get(), kPayloadTypeVP8, kPayloadTypeVP9, 1753 params_.pipe, sender_call_.get(), kPayloadTypeVP8, kPayloadTypeVP9,
1723 params_.video.selected_tl, params_.ss.selected_sl, payload_type_map_); 1754 params_.video.selected_tl, params_.ss.selected_sl, payload_type_map_);
1724 1755
1725 test::DirectTransport recv_transport(params_.pipe, receiver_call_.get(), 1756 test::DirectTransport recv_transport(params_.pipe, receiver_call_.get(),
1726 payload_type_map_); 1757 payload_type_map_);
1727 1758
1728 std::string graph_title = params_.analyzer.graph_title; 1759 std::string graph_title = params_.analyzer.graph_title;
1729 if (graph_title.empty()) 1760 if (graph_title.empty())
1730 graph_title = VideoQualityTest::GenerateGraphTitle(); 1761 graph_title = VideoQualityTest::GenerateGraphTitle();
1731 1762
1732 bool is_quick_test_enabled = field_trial::IsEnabled("WebRTC-QuickPerfTest"); 1763 bool is_quick_test_enabled = field_trial::IsEnabled("WebRTC-QuickPerfTest");
1733 VideoAnalyzer analyzer( 1764 VideoAnalyzer analyzer(
1734 &send_transport, params_.analyzer.test_label, 1765 &send_transport, params_.analyzer.test_label,
1735 params_.analyzer.avg_psnr_threshold, params_.analyzer.avg_ssim_threshold, 1766 params_.analyzer.avg_psnr_threshold, params_.analyzer.avg_ssim_threshold,
1736 is_quick_test_enabled 1767 is_quick_test_enabled
1737 ? kFramesSentInQuickTest 1768 ? kFramesSentInQuickTest
1738 : params_.analyzer.test_durations_secs * params_.video.fps, 1769 : params_.analyzer.test_durations_secs * params_.video.fps,
1739 graph_data_output_file, graph_title, 1770 graph_data_output_file, graph_title,
1740 kVideoSendSsrcs[params_.ss.selected_stream], 1771 kVideoSendSsrcs[params_.ss.selected_stream],
1741 kSendRtxSsrcs[params_.ss.selected_stream], 1772 kSendRtxSsrcs[params_.ss.selected_stream],
1742 static_cast<size_t>(params_.ss.selected_stream), params.ss.selected_sl, 1773 static_cast<size_t>(params_.ss.selected_stream), params.ss.selected_sl,
1743 params_.video.selected_tl, is_quick_test_enabled, clock_); 1774 params_.video.selected_tl, is_quick_test_enabled, clock_,
1775 params_.rtp_dump_name);
1744 analyzer.SetCall(sender_call_.get()); 1776 analyzer.SetCall(sender_call_.get());
1745 analyzer.SetReceiver(receiver_call_->Receiver()); 1777 analyzer.SetReceiver(receiver_call_->Receiver());
1746 send_transport.SetReceiver(&analyzer); 1778 send_transport.SetReceiver(&analyzer);
1747 recv_transport.SetReceiver(sender_call_->Receiver()); 1779 recv_transport.SetReceiver(sender_call_->Receiver());
1748 1780
1749 SetupVideo(&analyzer, &recv_transport); 1781 SetupVideo(&analyzer, &recv_transport);
1750 SetupThumbnails(&analyzer, &recv_transport); 1782 SetupThumbnails(&analyzer, &recv_transport);
1751 video_receive_configs_[params_.ss.selected_stream].renderer = &analyzer; 1783 video_receive_configs_[params_.ss.selected_stream].renderer = &analyzer;
1752 video_send_config_.pre_encode_callback = analyzer.pre_encode_proxy(); 1784 video_send_config_.pre_encode_callback = analyzer.pre_encode_proxy();
1753 RTC_DCHECK(!video_send_config_.post_encode_callback); 1785 RTC_DCHECK(!video_send_config_.post_encode_callback);
(...skipping 14 matching lines...) Expand all
1768 for (size_t i = 0; i < thumbnail_send_streams_.size(); ++i) { 1800 for (size_t i = 0; i < thumbnail_send_streams_.size(); ++i) {
1769 thumbnail_send_streams_[i]->SetSource(thumbnail_capturers_[i].get(), 1801 thumbnail_send_streams_[i]->SetSource(thumbnail_capturers_[i].get(),
1770 degradation_preference_); 1802 degradation_preference_);
1771 } 1803 }
1772 1804
1773 CreateCapturer(); 1805 CreateCapturer();
1774 1806
1775 analyzer.SetSource(video_capturer_.get(), params_.ss.infer_streams); 1807 analyzer.SetSource(video_capturer_.get(), params_.ss.infer_streams);
1776 1808
1777 StartEncodedFrameLogs(video_send_stream_); 1809 StartEncodedFrameLogs(video_send_stream_);
1778 StartEncodedFrameLogs(video_receive_streams_[0]); 1810 StartEncodedFrameLogs(video_receive_streams_[params_.ss.selected_stream]);
1779 video_send_stream_->Start(); 1811 video_send_stream_->Start();
1780 for (VideoSendStream* thumbnail_send_stream : thumbnail_send_streams_) 1812 for (VideoSendStream* thumbnail_send_stream : thumbnail_send_streams_)
1781 thumbnail_send_stream->Start(); 1813 thumbnail_send_stream->Start();
1782 for (VideoReceiveStream* receive_stream : video_receive_streams_) 1814 for (VideoReceiveStream* receive_stream : video_receive_streams_)
1783 receive_stream->Start(); 1815 receive_stream->Start();
1784 for (FlexfecReceiveStream* receive_stream : flexfec_receive_streams_) 1816 for (FlexfecReceiveStream* receive_stream : flexfec_receive_streams_)
1785 receive_stream->Start(); 1817 receive_stream->Start();
1786 for (VideoReceiveStream* thumbnail_receive_stream : 1818 for (VideoReceiveStream* thumbnail_receive_stream :
1787 thumbnail_receive_streams_) 1819 thumbnail_receive_streams_)
1788 thumbnail_receive_stream->Start(); 1820 thumbnail_receive_stream->Start();
(...skipping 22 matching lines...) Expand all
1811 receive_stream->Stop(); 1843 receive_stream->Stop();
1812 for (VideoReceiveStream* receive_stream : video_receive_streams_) 1844 for (VideoReceiveStream* receive_stream : video_receive_streams_)
1813 receive_stream->Stop(); 1845 receive_stream->Stop();
1814 for (VideoSendStream* thumbnail_send_stream : thumbnail_send_streams_) 1846 for (VideoSendStream* thumbnail_send_stream : thumbnail_send_streams_)
1815 thumbnail_send_stream->Stop(); 1847 thumbnail_send_stream->Stop();
1816 video_send_stream_->Stop(); 1848 video_send_stream_->Stop();
1817 1849
1818 DestroyStreams(); 1850 DestroyStreams();
1819 DestroyThumbnailStreams(); 1851 DestroyThumbnailStreams();
1820 1852
1853 if (event_log_started) {
1854 event_log_->StopLogging();
1855 }
1821 if (graph_data_output_file) 1856 if (graph_data_output_file)
1822 fclose(graph_data_output_file); 1857 fclose(graph_data_output_file);
1823 } 1858 }
1824 1859
1825 void VideoQualityTest::SetupAudio(int send_channel_id, 1860 void VideoQualityTest::SetupAudio(int send_channel_id,
1826 int receive_channel_id, 1861 int receive_channel_id,
1827 Transport* transport, 1862 Transport* transport,
1828 AudioReceiveStream** audio_receive_stream) { 1863 AudioReceiveStream** audio_receive_stream) {
1829 audio_send_config_ = AudioSendStream::Config(transport); 1864 audio_send_config_ = AudioSendStream::Config(transport);
1830 audio_send_config_.voe_channel_id = send_channel_id; 1865 audio_send_config_.voe_channel_id = send_channel_id;
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
2029 if (!params_.video.encoded_frame_base_path.empty()) { 2064 if (!params_.video.encoded_frame_base_path.empty()) {
2030 std::ostringstream str; 2065 std::ostringstream str;
2031 str << send_logs_++; 2066 str << send_logs_++;
2032 std::string prefix = 2067 std::string prefix =
2033 params_.video.encoded_frame_base_path + "." + str.str() + ".send."; 2068 params_.video.encoded_frame_base_path + "." + str.str() + ".send.";
2034 stream->EnableEncodedFrameRecording( 2069 stream->EnableEncodedFrameRecording(
2035 std::vector<rtc::PlatformFile>( 2070 std::vector<rtc::PlatformFile>(
2036 {rtc::CreatePlatformFile(prefix + "1.ivf"), 2071 {rtc::CreatePlatformFile(prefix + "1.ivf"),
2037 rtc::CreatePlatformFile(prefix + "2.ivf"), 2072 rtc::CreatePlatformFile(prefix + "2.ivf"),
2038 rtc::CreatePlatformFile(prefix + "3.ivf")}), 2073 rtc::CreatePlatformFile(prefix + "3.ivf")}),
2039 10000000); 2074 100000000);
2040 } 2075 }
2041 } 2076 }
2042 2077
2043 void VideoQualityTest::StartEncodedFrameLogs(VideoReceiveStream* stream) { 2078 void VideoQualityTest::StartEncodedFrameLogs(VideoReceiveStream* stream) {
2044 if (!params_.video.encoded_frame_base_path.empty()) { 2079 if (!params_.video.encoded_frame_base_path.empty()) {
2045 std::ostringstream str; 2080 std::ostringstream str;
2046 str << receive_logs_++; 2081 str << receive_logs_++;
2047 std::string path = 2082 std::string path =
2048 params_.video.encoded_frame_base_path + "." + str.str() + ".recv.ivf"; 2083 params_.video.encoded_frame_base_path + "." + str.str() + ".recv.ivf";
2049 stream->EnableEncodedFrameRecording(rtc::CreatePlatformFile(path), 2084 stream->EnableEncodedFrameRecording(rtc::CreatePlatformFile(path),
2050 10000000); 2085 100000000);
2051 } 2086 }
2052 } 2087 }
2053 } // namespace webrtc 2088 } // namespace webrtc
OLDNEW
« webrtc/video/video_quality_test.h ('K') | « webrtc/video/video_quality_test.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698