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

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

Issue 2709483009: Fixed Full stack tests to correctly process selected TL and SL while (Closed)
Patch Set: fixing mistake where important code is inside DCHECK Created 3 years, 10 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 | « no previous file | no next file » | 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) 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 10 matching lines...) Expand all
21 #include "webrtc/base/event.h" 21 #include "webrtc/base/event.h"
22 #include "webrtc/base/format_macros.h" 22 #include "webrtc/base/format_macros.h"
23 #include "webrtc/base/optional.h" 23 #include "webrtc/base/optional.h"
24 #include "webrtc/base/platform_file.h" 24 #include "webrtc/base/platform_file.h"
25 #include "webrtc/base/timeutils.h" 25 #include "webrtc/base/timeutils.h"
26 #include "webrtc/call/call.h" 26 #include "webrtc/call/call.h"
27 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" 27 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
28 #include "webrtc/logging/rtc_event_log/rtc_event_log.h" 28 #include "webrtc/logging/rtc_event_log/rtc_event_log.h"
29 #include "webrtc/modules/audio_mixer/audio_mixer_impl.h" 29 #include "webrtc/modules/audio_mixer/audio_mixer_impl.h"
30 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h" 30 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h"
31 #include "webrtc/modules/rtp_rtcp/source/rtp_format.h"
31 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h" 32 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h"
32 #include "webrtc/modules/video_coding/codecs/h264/include/h264.h" 33 #include "webrtc/modules/video_coding/codecs/h264/include/h264.h"
33 #include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h" 34 #include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h"
34 #include "webrtc/modules/video_coding/codecs/vp9/include/vp9.h" 35 #include "webrtc/modules/video_coding/codecs/vp9/include/vp9.h"
35 #include "webrtc/system_wrappers/include/cpu_info.h" 36 #include "webrtc/system_wrappers/include/cpu_info.h"
36 #include "webrtc/system_wrappers/include/field_trial.h" 37 #include "webrtc/system_wrappers/include/field_trial.h"
37 #include "webrtc/test/gtest.h" 38 #include "webrtc/test/gtest.h"
38 #include "webrtc/test/layer_filtering_transport.h" 39 #include "webrtc/test/layer_filtering_transport.h"
39 #include "webrtc/test/run_loop.h" 40 #include "webrtc/test/run_loop.h"
40 #include "webrtc/test/statistics.h" 41 #include "webrtc/test/statistics.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 const std::string& test_label, 133 const std::string& test_label,
133 double avg_psnr_threshold, 134 double avg_psnr_threshold,
134 double avg_ssim_threshold, 135 double avg_ssim_threshold,
135 int duration_frames, 136 int duration_frames,
136 FILE* graph_data_output_file, 137 FILE* graph_data_output_file,
137 const std::string& graph_title, 138 const std::string& graph_title,
138 uint32_t ssrc_to_analyze, 139 uint32_t ssrc_to_analyze,
139 uint32_t rtx_ssrc_to_analyze, 140 uint32_t rtx_ssrc_to_analyze,
140 uint32_t selected_stream_width, 141 uint32_t selected_stream_width,
141 uint32_t selected_stream_height, 142 uint32_t selected_stream_height,
143 int selected_sl,
144 int selected_tl,
142 bool is_quick_test_enabled) 145 bool is_quick_test_enabled)
143 : transport_(transport), 146 : transport_(transport),
144 receiver_(nullptr), 147 receiver_(nullptr),
145 send_stream_(nullptr), 148 send_stream_(nullptr),
146 receive_stream_(nullptr), 149 receive_stream_(nullptr),
147 captured_frame_forwarder_(this), 150 captured_frame_forwarder_(this),
148 test_label_(test_label), 151 test_label_(test_label),
149 graph_data_output_file_(graph_data_output_file), 152 graph_data_output_file_(graph_data_output_file),
150 graph_title_(graph_title), 153 graph_title_(graph_title),
151 ssrc_to_analyze_(ssrc_to_analyze), 154 ssrc_to_analyze_(ssrc_to_analyze),
152 rtx_ssrc_to_analyze_(rtx_ssrc_to_analyze), 155 rtx_ssrc_to_analyze_(rtx_ssrc_to_analyze),
153 selected_stream_width_(selected_stream_width), 156 selected_stream_width_(selected_stream_width),
154 selected_stream_height_(selected_stream_height), 157 selected_stream_height_(selected_stream_height),
158 selected_sl_(selected_sl),
159 selected_tl_(selected_tl),
155 pre_encode_proxy_(this), 160 pre_encode_proxy_(this),
156 encode_timing_proxy_(this), 161 encode_timing_proxy_(this),
157 frames_to_process_(duration_frames), 162 frames_to_process_(duration_frames),
158 frames_recorded_(0), 163 frames_recorded_(0),
159 frames_processed_(0), 164 frames_processed_(0),
160 dropped_frames_(0), 165 dropped_frames_(0),
161 dropped_frames_before_first_encode_(0), 166 dropped_frames_before_first_encode_(0),
162 dropped_frames_before_rendering_(0), 167 dropped_frames_before_rendering_(0),
163 last_render_time_(0), 168 last_render_time_(0),
164 rtp_timestamp_delta_(0), 169 rtp_timestamp_delta_(0),
170 total_media_bytes_(0),
171 first_sending_time_(0),
172 last_sending_time_(0),
165 avg_psnr_threshold_(avg_psnr_threshold), 173 avg_psnr_threshold_(avg_psnr_threshold),
166 avg_ssim_threshold_(avg_ssim_threshold), 174 avg_ssim_threshold_(avg_ssim_threshold),
167 is_quick_test_enabled_(is_quick_test_enabled), 175 is_quick_test_enabled_(is_quick_test_enabled),
168 stats_polling_thread_(&PollStatsThread, this, "StatsPoller"), 176 stats_polling_thread_(&PollStatsThread, this, "StatsPoller"),
169 comparison_available_event_(false, false), 177 comparison_available_event_(false, false),
170 done_(true, false) { 178 done_(true, false) {
171 // Create thread pool for CPU-expensive PSNR/SSIM calculations. 179 // Create thread pool for CPU-expensive PSNR/SSIM calculations.
172 180
173 // Try to use about as many threads as cores, but leave kMinCoresLeft alone, 181 // Try to use about as many threads as cores, but leave kMinCoresLeft alone,
174 // so that we don't accidentally starve "real" worker threads (codec etc). 182 // so that we don't accidentally starve "real" worker threads (codec etc).
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 } 306 }
299 307
300 if (!IsFlexfec(header.payloadType) && header.ssrc == ssrc_to_analyze_) { 308 if (!IsFlexfec(header.payloadType) && header.ssrc == ssrc_to_analyze_) {
301 // Ignore FlexFEC timestamps, to avoid collisions with media timestamps. 309 // Ignore FlexFEC timestamps, to avoid collisions with media timestamps.
302 // (FlexFEC and media are sent on different SSRCs, which have different 310 // (FlexFEC and media are sent on different SSRCs, which have different
303 // timestamps spaces.) 311 // timestamps spaces.)
304 // Also ignore packets from wrong SSRC and retransmits. 312 // Also ignore packets from wrong SSRC and retransmits.
305 int64_t timestamp = 313 int64_t timestamp =
306 wrap_handler_.Unwrap(header.timestamp - rtp_timestamp_delta_); 314 wrap_handler_.Unwrap(header.timestamp - rtp_timestamp_delta_);
307 send_times_[timestamp] = current_time; 315 send_times_[timestamp] = current_time;
308 if (!transport_->DiscardedLastPacket() && 316
309 header.ssrc == ssrc_to_analyze_) { 317 // Ignore incorrect temporal and spatial layers.
318 bool is_correct_layer = true;
319 if (header.payloadType == kPayloadTypeVP9 ||
320 header.payloadType == kPayloadTypeVP8) {
321 // Get VP8 and VP9 specific header to check layers indexes.
322 const uint8_t* payload = packet + header.headerLength;
323 const size_t payload_length = length - header.headerLength;
324 const size_t payload_data_length =
325 payload_length - header.paddingLength;
326 const bool is_vp8 = header.payloadType == kPayloadTypeVP8;
327 std::unique_ptr<RtpDepacketizer> depacketizer(
328 RtpDepacketizer::Create(is_vp8 ? kRtpVideoVp8 : kRtpVideoVp9));
sprang_webrtc 2017/02/22 16:56:07 Can you extract this to a helper method?
ilnik 2017/02/23 08:58:29 Done.
329 RtpDepacketizer::ParsedPayload parsed_payload;
330 bool result = depacketizer->Parse(&parsed_payload, payload,
331 payload_data_length);
332 RTC_DCHECK(result);
333 const int temporal_idx = static_cast<int>(
334 is_vp8 ? parsed_payload.type.Video.codecHeader.VP8.temporalIdx
335 : parsed_payload.type.Video.codecHeader.VP9.temporal_idx);
336 const int spatial_idx = static_cast<int>(
337 is_vp8 ? kNoSpatialIdx
338 : parsed_payload.type.Video.codecHeader.VP9.spatial_idx);
339 is_correct_layer =
340 (selected_tl_ < 0 || temporal_idx == kNoTemporalIdx ||
341 temporal_idx <= selected_tl_) &&
342 (selected_sl_ < 0 || spatial_idx == kNoSpatialIdx ||
343 spatial_idx <= selected_sl_);
344 }
345 if (is_correct_layer) {
310 encoded_frame_sizes_[timestamp] += 346 encoded_frame_sizes_[timestamp] +=
311 length - (header.headerLength + header.paddingLength); 347 length - (header.headerLength + header.paddingLength);
348 total_media_bytes_ +=
349 length - (header.headerLength + header.paddingLength);
312 } 350 }
351 if (first_sending_time_ == 0)
352 first_sending_time_ = current_time;
353 last_sending_time_ = current_time;
313 } 354 }
314 } 355 }
315 return result; 356 return result;
316 } 357 }
317 358
318 bool SendRtcp(const uint8_t* packet, size_t length) override { 359 bool SendRtcp(const uint8_t* packet, size_t length) override {
319 return transport_->SendRtcp(packet, length); 360 return transport_->SendRtcp(packet, length);
320 } 361 }
321 362
322 void EncodedFrameCallback(const EncodedFrame& frame) override { 363 void EncodedFrameCallback(const EncodedFrame& frame) override { }
sprang_webrtc 2017/02/22 16:56:07 encoded_frame_size_ isn't being populate any more?
ilnik 2017/02/23 08:58:29 No, it is populated in sendRtp to encoded_frame_si
sprang_webrtc 2017/02/23 10:46:54 I see. Then I guess you can remove this method, r
ilnik 2017/02/23 10:55:59 Done.
323 rtc::CritScope lock(&comparison_lock_);
324 if (frames_recorded_ < frames_to_process_)
325 encoded_frame_size_.AddSample(frame.length_);
326 }
327 364
328 void OnFrame(const VideoFrame& video_frame) override { 365 void OnFrame(const VideoFrame& video_frame) override {
329 int64_t render_time_ms = 366 int64_t render_time_ms =
330 Clock::GetRealTimeClock()->CurrentNtpInMilliseconds(); 367 Clock::GetRealTimeClock()->CurrentNtpInMilliseconds();
331 368
332 rtc::CritScope lock(&crit_); 369 rtc::CritScope lock(&crit_);
333 int64_t send_timestamp = 370 int64_t send_timestamp =
334 wrap_handler_.Unwrap(video_frame.timestamp() - rtp_timestamp_delta_); 371 wrap_handler_.Unwrap(video_frame.timestamp() - rtp_timestamp_delta_);
335 372
336 while (wrap_handler_.Unwrap(frames_.front().timestamp()) < send_timestamp) { 373 while (wrap_handler_.Unwrap(frames_.front().timestamp()) < send_timestamp) {
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 PrintResult("sender_time", sender_time_, " ms"); 706 PrintResult("sender_time", sender_time_, " ms");
670 PrintResult("receiver_time", receiver_time_, " ms"); 707 PrintResult("receiver_time", receiver_time_, " ms");
671 PrintResult("total_delay_incl_network", end_to_end_, " ms"); 708 PrintResult("total_delay_incl_network", end_to_end_, " ms");
672 PrintResult("time_between_rendered_frames", rendered_delta_, " ms"); 709 PrintResult("time_between_rendered_frames", rendered_delta_, " ms");
673 PrintResult("encoded_frame_size", encoded_frame_size_, " bytes"); 710 PrintResult("encoded_frame_size", encoded_frame_size_, " bytes");
674 PrintResult("encode_frame_rate", encode_frame_rate_, " fps"); 711 PrintResult("encode_frame_rate", encode_frame_rate_, " fps");
675 PrintResult("encode_time", encode_time_ms_, " ms"); 712 PrintResult("encode_time", encode_time_ms_, " ms");
676 PrintResult("encode_usage_percent", encode_usage_percent_, " percent"); 713 PrintResult("encode_usage_percent", encode_usage_percent_, " percent");
677 PrintResult("media_bitrate", media_bitrate_bps_, " bps"); 714 PrintResult("media_bitrate", media_bitrate_bps_, " bps");
678 715
716 printf("RESULT actual_bitrate: %s = %.6lf bps\n", test_label_.c_str(),
717 GetActualBitrate());
718
679 if (receive_stream_ != nullptr) { 719 if (receive_stream_ != nullptr) {
680 PrintResult("decode_time", decode_time_ms_, " ms"); 720 PrintResult("decode_time", decode_time_ms_, " ms");
681 PrintResult("decode_time_max", decode_time_max_ms_, " ms"); 721 PrintResult("decode_time_max", decode_time_max_ms_, " ms");
682 } 722 }
683 723
684 printf("RESULT dropped_frames: %s = %d frames\n", test_label_.c_str(), 724 printf("RESULT dropped_frames: %s = %d frames\n", test_label_.c_str(),
685 dropped_frames_); 725 dropped_frames_);
686 printf("RESULT dropped_frames_before_first_encode: %s = %d frames\n", 726 printf("RESULT dropped_frames_before_first_encode: %s = %d frames\n",
687 test_label_.c_str(), dropped_frames_before_first_encode_); 727 test_label_.c_str(), dropped_frames_before_first_encode_);
688 printf("RESULT dropped_frames_before_rendering: %s = %d frames\n", 728 printf("RESULT dropped_frames_before_rendering: %s = %d frames\n",
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
793 sample.encoded_frame_size, sample.psnr, sample.ssim, 833 sample.encoded_frame_size, sample.psnr, sample.ssim,
794 encode_time_ms); 834 encode_time_ms);
795 } 835 }
796 if (missing_encode_time_samples) { 836 if (missing_encode_time_samples) {
797 fprintf(stderr, 837 fprintf(stderr,
798 "Warning: Missing encode_time_ms samples for %d frame(s).\n", 838 "Warning: Missing encode_time_ms samples for %d frame(s).\n",
799 missing_encode_time_samples); 839 missing_encode_time_samples);
800 } 840 }
801 } 841 }
802 842
843 double GetActualBitrate() {
sprang_webrtc 2017/02/22 16:56:07 Maybe GetAverageMediaPayloadBitrateBps() ?
ilnik 2017/02/23 08:58:29 Done.
844 return static_cast<double>(total_media_bytes_) * 8 /
845 (last_sending_time_ - first_sending_time_) *
846 rtc::kNumMillisecsPerSec;
sprang_webrtc 2017/02/22 16:56:06 Just to be sure, maybe add a dcheck verifying that
ilnik 2017/02/23 08:58:29 Actually, in quick mode there will be exactly one
847 }
848
803 // Implements VideoSinkInterface to receive captured frames from a 849 // Implements VideoSinkInterface to receive captured frames from a
804 // FrameGeneratorCapturer. Implements VideoSourceInterface to be able to act 850 // FrameGeneratorCapturer. Implements VideoSourceInterface to be able to act
805 // as a source to VideoSendStream. 851 // as a source to VideoSendStream.
806 // It forwards all input frames to the VideoAnalyzer for later comparison and 852 // It forwards all input frames to the VideoAnalyzer for later comparison and
807 // forwards the captured frames to the VideoSendStream. 853 // forwards the captured frames to the VideoSendStream.
808 class CapturedFrameForwarder : public rtc::VideoSinkInterface<VideoFrame>, 854 class CapturedFrameForwarder : public rtc::VideoSinkInterface<VideoFrame>,
809 public rtc::VideoSourceInterface<VideoFrame> { 855 public rtc::VideoSourceInterface<VideoFrame> {
810 public: 856 public:
811 explicit CapturedFrameForwarder(VideoAnalyzer* analyzer) 857 explicit CapturedFrameForwarder(VideoAnalyzer* analyzer)
812 : analyzer_(analyzer), send_stream_input_(nullptr) {} 858 : analyzer_(analyzer), send_stream_input_(nullptr) {}
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
852 VideoSendStream* send_stream_; 898 VideoSendStream* send_stream_;
853 VideoReceiveStream* receive_stream_; 899 VideoReceiveStream* receive_stream_;
854 CapturedFrameForwarder captured_frame_forwarder_; 900 CapturedFrameForwarder captured_frame_forwarder_;
855 const std::string test_label_; 901 const std::string test_label_;
856 FILE* const graph_data_output_file_; 902 FILE* const graph_data_output_file_;
857 const std::string graph_title_; 903 const std::string graph_title_;
858 const uint32_t ssrc_to_analyze_; 904 const uint32_t ssrc_to_analyze_;
859 const uint32_t rtx_ssrc_to_analyze_; 905 const uint32_t rtx_ssrc_to_analyze_;
860 const uint32_t selected_stream_width_; 906 const uint32_t selected_stream_width_;
861 const uint32_t selected_stream_height_; 907 const uint32_t selected_stream_height_;
908 const int selected_sl_;
909 const int selected_tl_;
862 PreEncodeProxy pre_encode_proxy_; 910 PreEncodeProxy pre_encode_proxy_;
863 OnEncodeTimingProxy encode_timing_proxy_; 911 OnEncodeTimingProxy encode_timing_proxy_;
864 std::vector<Sample> samples_ GUARDED_BY(comparison_lock_); 912 std::vector<Sample> samples_ GUARDED_BY(comparison_lock_);
865 std::map<int64_t, int> samples_encode_time_ms_ GUARDED_BY(comparison_lock_); 913 std::map<int64_t, int> samples_encode_time_ms_ GUARDED_BY(comparison_lock_);
866 test::Statistics sender_time_ GUARDED_BY(comparison_lock_); 914 test::Statistics sender_time_ GUARDED_BY(comparison_lock_);
867 test::Statistics receiver_time_ GUARDED_BY(comparison_lock_); 915 test::Statistics receiver_time_ GUARDED_BY(comparison_lock_);
868 test::Statistics psnr_ GUARDED_BY(comparison_lock_); 916 test::Statistics psnr_ GUARDED_BY(comparison_lock_);
869 test::Statistics ssim_ GUARDED_BY(comparison_lock_); 917 test::Statistics ssim_ GUARDED_BY(comparison_lock_);
870 test::Statistics end_to_end_ GUARDED_BY(comparison_lock_); 918 test::Statistics end_to_end_ GUARDED_BY(comparison_lock_);
871 test::Statistics rendered_delta_ GUARDED_BY(comparison_lock_); 919 test::Statistics rendered_delta_ GUARDED_BY(comparison_lock_);
872 test::Statistics encoded_frame_size_ GUARDED_BY(comparison_lock_); 920 test::Statistics encoded_frame_size_ GUARDED_BY(comparison_lock_);
873 test::Statistics encode_frame_rate_ GUARDED_BY(comparison_lock_); 921 test::Statistics encode_frame_rate_ GUARDED_BY(comparison_lock_);
874 test::Statistics encode_time_ms_ GUARDED_BY(comparison_lock_); 922 test::Statistics encode_time_ms_ GUARDED_BY(comparison_lock_);
875 test::Statistics encode_usage_percent_ GUARDED_BY(comparison_lock_); 923 test::Statistics encode_usage_percent_ GUARDED_BY(comparison_lock_);
876 test::Statistics decode_time_ms_ GUARDED_BY(comparison_lock_); 924 test::Statistics decode_time_ms_ GUARDED_BY(comparison_lock_);
877 test::Statistics decode_time_max_ms_ GUARDED_BY(comparison_lock_); 925 test::Statistics decode_time_max_ms_ GUARDED_BY(comparison_lock_);
878 test::Statistics media_bitrate_bps_ GUARDED_BY(comparison_lock_); 926 test::Statistics media_bitrate_bps_ GUARDED_BY(comparison_lock_);
879 927
880 const int frames_to_process_; 928 const int frames_to_process_;
881 int frames_recorded_; 929 int frames_recorded_;
882 int frames_processed_; 930 int frames_processed_;
883 int dropped_frames_; 931 int dropped_frames_;
884 int dropped_frames_before_first_encode_; 932 int dropped_frames_before_first_encode_;
885 int dropped_frames_before_rendering_; 933 int dropped_frames_before_rendering_;
886 int64_t last_render_time_; 934 int64_t last_render_time_;
887 uint32_t rtp_timestamp_delta_; 935 uint32_t rtp_timestamp_delta_;
936 int64_t total_media_bytes_;
937
938 int64_t first_sending_time_;
939 int64_t last_sending_time_;
888 940
889 rtc::CriticalSection crit_; 941 rtc::CriticalSection crit_;
890 std::deque<VideoFrame> frames_ GUARDED_BY(crit_); 942 std::deque<VideoFrame> frames_ GUARDED_BY(crit_);
891 rtc::Optional<VideoFrame> last_rendered_frame_ GUARDED_BY(crit_); 943 rtc::Optional<VideoFrame> last_rendered_frame_ GUARDED_BY(crit_);
892 rtc::TimestampWrapAroundHandler wrap_handler_ GUARDED_BY(crit_); 944 rtc::TimestampWrapAroundHandler wrap_handler_ GUARDED_BY(crit_);
893 std::map<int64_t, int64_t> send_times_ GUARDED_BY(crit_); 945 std::map<int64_t, int64_t> send_times_ GUARDED_BY(crit_);
894 std::map<int64_t, int64_t> recv_times_ GUARDED_BY(crit_); 946 std::map<int64_t, int64_t> recv_times_ GUARDED_BY(crit_);
895 std::map<int64_t, size_t> encoded_frame_sizes_ GUARDED_BY(crit_); 947 std::map<int64_t, size_t> encoded_frame_sizes_ GUARDED_BY(crit_);
896 rtc::Optional<uint32_t> first_encoded_timestamp_ GUARDED_BY(crit_); 948 rtc::Optional<uint32_t> first_encoded_timestamp_ GUARDED_BY(crit_);
897 rtc::Optional<uint32_t> first_sent_timestamp_ GUARDED_BY(crit_); 949 rtc::Optional<uint32_t> first_sent_timestamp_ GUARDED_BY(crit_);
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
1350 &send_transport, params_.analyzer.test_label, 1402 &send_transport, params_.analyzer.test_label,
1351 1403
1352 params_.analyzer.avg_psnr_threshold, params_.analyzer.avg_ssim_threshold, 1404 params_.analyzer.avg_psnr_threshold, params_.analyzer.avg_ssim_threshold,
1353 is_quick_test_enabled 1405 is_quick_test_enabled
1354 ? kFramesSentInQuickTest 1406 ? kFramesSentInQuickTest
1355 : params_.analyzer.test_durations_secs * params_.video.fps, 1407 : params_.analyzer.test_durations_secs * params_.video.fps,
1356 graph_data_output_file, graph_title, 1408 graph_data_output_file, graph_title,
1357 kVideoSendSsrcs[params_.ss.selected_stream], 1409 kVideoSendSsrcs[params_.ss.selected_stream],
1358 kSendRtxSsrcs[params_.ss.selected_stream], 1410 kSendRtxSsrcs[params_.ss.selected_stream],
1359 static_cast<uint32_t>(selected_stream.width), 1411 static_cast<uint32_t>(selected_stream.width),
1360 static_cast<uint32_t>(selected_stream.height), is_quick_test_enabled); 1412 static_cast<uint32_t>(selected_stream.height), params.ss.selected_sl,
1413 params_.video.selected_tl, is_quick_test_enabled);
1361 analyzer.SetReceiver(receiver_call_->Receiver()); 1414 analyzer.SetReceiver(receiver_call_->Receiver());
1362 send_transport.SetReceiver(&analyzer); 1415 send_transport.SetReceiver(&analyzer);
1363 recv_transport.SetReceiver(sender_call_->Receiver()); 1416 recv_transport.SetReceiver(sender_call_->Receiver());
1364 1417
1365 SetupVideo(&analyzer, &recv_transport); 1418 SetupVideo(&analyzer, &recv_transport);
1366 video_receive_configs_[params_.ss.selected_stream].renderer = &analyzer; 1419 video_receive_configs_[params_.ss.selected_stream].renderer = &analyzer;
1367 video_send_config_.pre_encode_callback = analyzer.pre_encode_proxy(); 1420 video_send_config_.pre_encode_callback = analyzer.pre_encode_proxy();
1368 for (auto& config : video_receive_configs_) 1421 for (auto& config : video_receive_configs_)
1369 config.pre_decode_callback = &analyzer; 1422 config.pre_decode_callback = &analyzer;
1370 RTC_DCHECK(!video_send_config_.post_encode_callback); 1423 RTC_DCHECK(!video_send_config_.post_encode_callback);
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
1604 std::ostringstream str; 1657 std::ostringstream str;
1605 str << receive_logs_++; 1658 str << receive_logs_++;
1606 std::string path = 1659 std::string path =
1607 params_.video.encoded_frame_base_path + "." + str.str() + ".recv.ivf"; 1660 params_.video.encoded_frame_base_path + "." + str.str() + ".recv.ivf";
1608 stream->EnableEncodedFrameRecording(rtc::CreatePlatformFile(path), 1661 stream->EnableEncodedFrameRecording(rtc::CreatePlatformFile(path),
1609 10000000); 1662 10000000);
1610 } 1663 }
1611 } 1664 }
1612 1665
1613 } // namespace webrtc 1666 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698