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

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

Issue 2668763004: Added VP8 simulcast tests. Fixed analyzer to correctly infer timestamps. (Closed)
Patch Set: reapplyting patch to clean branch 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 | « webrtc/video/full_stack_tests.cc ('k') | webrtc/video/video_receive_stream.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) 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 public rtc::VideoSinkInterface<VideoFrame>, 126 public rtc::VideoSinkInterface<VideoFrame>,
127 public EncodedFrameObserver { 127 public EncodedFrameObserver {
128 public: 128 public:
129 VideoAnalyzer(test::LayerFilteringTransport* transport, 129 VideoAnalyzer(test::LayerFilteringTransport* transport,
130 const std::string& test_label, 130 const std::string& test_label,
131 double avg_psnr_threshold, 131 double avg_psnr_threshold,
132 double avg_ssim_threshold, 132 double avg_ssim_threshold,
133 int duration_frames, 133 int duration_frames,
134 FILE* graph_data_output_file, 134 FILE* graph_data_output_file,
135 const std::string& graph_title, 135 const std::string& graph_title,
136 uint32_t ssrc_to_analyze) 136 uint32_t ssrc_to_analyze,
137 uint32_t selected_width,
138 uint32_t selected_height)
137 : transport_(transport), 139 : transport_(transport),
138 receiver_(nullptr), 140 receiver_(nullptr),
139 send_stream_(nullptr), 141 send_stream_(nullptr),
140 receive_stream_(nullptr), 142 receive_stream_(nullptr),
141 captured_frame_forwarder_(this), 143 captured_frame_forwarder_(this),
142 test_label_(test_label), 144 test_label_(test_label),
143 graph_data_output_file_(graph_data_output_file), 145 graph_data_output_file_(graph_data_output_file),
144 graph_title_(graph_title), 146 graph_title_(graph_title),
145 ssrc_to_analyze_(ssrc_to_analyze), 147 ssrc_to_analyze_(ssrc_to_analyze),
148 selected_width_(selected_width),
149 selected_height_(selected_height),
146 pre_encode_proxy_(this), 150 pre_encode_proxy_(this),
147 encode_timing_proxy_(this), 151 encode_timing_proxy_(this),
148 frames_to_process_(duration_frames), 152 frames_to_process_(duration_frames),
149 frames_recorded_(0), 153 frames_recorded_(0),
150 frames_processed_(0), 154 frames_processed_(0),
151 dropped_frames_(0), 155 dropped_frames_(0),
152 dropped_frames_before_first_encode_(0), 156 dropped_frames_before_first_encode_(0),
153 dropped_frames_before_rendering_(0), 157 dropped_frames_before_rendering_(0),
154 last_render_time_(0), 158 last_render_time_(0),
155 rtp_timestamp_delta_(0), 159 rtp_timestamp_delta_(0),
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 const PacketTime& packet_time) override { 223 const PacketTime& packet_time) override {
220 // Ignore timestamps of RTCP packets. They're not synchronized with 224 // Ignore timestamps of RTCP packets. They're not synchronized with
221 // RTP packet timestamps and so they would confuse wrap_handler_. 225 // RTP packet timestamps and so they would confuse wrap_handler_.
222 if (RtpHeaderParser::IsRtcp(packet, length)) { 226 if (RtpHeaderParser::IsRtcp(packet, length)) {
223 return receiver_->DeliverPacket(media_type, packet, length, packet_time); 227 return receiver_->DeliverPacket(media_type, packet, length, packet_time);
224 } 228 }
225 229
226 RtpUtility::RtpHeaderParser parser(packet, length); 230 RtpUtility::RtpHeaderParser parser(packet, length);
227 RTPHeader header; 231 RTPHeader header;
228 parser.Parse(&header); 232 parser.Parse(&header);
229 if (!IsFlexfec(header.payloadType)) { 233 if (!IsFlexfec(header.payloadType) && header.ssrc != ssrc_to_analyze_) {
230 // Ignore FlexFEC timestamps, to avoid collisions with media timestamps. 234 // Ignore FlexFEC timestamps, to avoid collisions with media timestamps.
231 // (FlexFEC and media are sent on different SSRCs, which have different 235 // (FlexFEC and media are sent on different SSRCs, which have different
232 // timestamps spaces.) 236 // timestamps spaces.)
237 // Also ignore packets from wrong SSRC.
233 rtc::CritScope lock(&crit_); 238 rtc::CritScope lock(&crit_);
234 int64_t timestamp = 239 int64_t timestamp =
235 wrap_handler_.Unwrap(header.timestamp - rtp_timestamp_delta_); 240 wrap_handler_.Unwrap(header.timestamp - rtp_timestamp_delta_);
236 recv_times_[timestamp] = 241 recv_times_[timestamp] =
237 Clock::GetRealTimeClock()->CurrentNtpInMilliseconds(); 242 Clock::GetRealTimeClock()->CurrentNtpInMilliseconds();
238 } 243 }
239 244
240 return receiver_->DeliverPacket(media_type, packet, length, packet_time); 245 return receiver_->DeliverPacket(media_type, packet, length, packet_time);
241 } 246 }
242 247
243 void MeasuredEncodeTiming(int64_t ntp_time_ms, int encode_time_ms) { 248 void MeasuredEncodeTiming(int64_t ntp_time_ms, int encode_time_ms) {
244 rtc::CritScope crit(&comparison_lock_); 249 rtc::CritScope crit(&comparison_lock_);
245 samples_encode_time_ms_[ntp_time_ms] = encode_time_ms; 250 samples_encode_time_ms_[ntp_time_ms] = encode_time_ms;
246 } 251 }
247 252
248 void PreEncodeOnFrame(const VideoFrame& video_frame) { 253 void PreEncodeOnFrame(const VideoFrame& video_frame) {
249 rtc::CritScope lock(&crit_); 254 rtc::CritScope lock(&crit_);
250 if (!first_send_timestamp_ && rtp_timestamp_delta_ == 0) { 255 if (!first_encoded_timestamp_) {
251 while (frames_.front().timestamp() != video_frame.timestamp()) { 256 while (frames_.front().timestamp() != video_frame.timestamp()) {
252 ++dropped_frames_before_first_encode_; 257 ++dropped_frames_before_first_encode_;
253 frames_.pop_front(); 258 frames_.pop_front();
254 RTC_CHECK(!frames_.empty()); 259 RTC_CHECK(!frames_.empty());
255 } 260 }
256 first_send_timestamp_ = rtc::Optional<uint32_t>(video_frame.timestamp()); 261 first_encoded_timestamp_ =
262 rtc::Optional<uint32_t>(video_frame.timestamp());
257 } 263 }
258 } 264 }
259 265
266 void PostEncodeFrameCallback(const EncodedFrame& encoded_frame) {
267 rtc::CritScope lock(&crit_);
268 if (!first_sent_timestamp_ &&
269 encoded_frame.encoded_width_ == selected_width_ &&
270 encoded_frame.encoded_height_ == selected_height_) {
271 first_sent_timestamp_ = rtc::Optional<uint32_t>(encoded_frame.timestamp_);
272 }
273 }
274
260 bool SendRtp(const uint8_t* packet, 275 bool SendRtp(const uint8_t* packet,
261 size_t length, 276 size_t length,
262 const PacketOptions& options) override { 277 const PacketOptions& options) override {
263 RtpUtility::RtpHeaderParser parser(packet, length); 278 RtpUtility::RtpHeaderParser parser(packet, length);
264 RTPHeader header; 279 RTPHeader header;
265 parser.Parse(&header); 280 parser.Parse(&header);
266 281
267 int64_t current_time = 282 int64_t current_time =
268 Clock::GetRealTimeClock()->CurrentNtpInMilliseconds(); 283 Clock::GetRealTimeClock()->CurrentNtpInMilliseconds();
269 bool result = transport_->SendRtp(packet, length, options); 284 bool result = transport_->SendRtp(packet, length, options);
270 { 285 {
271 rtc::CritScope lock(&crit_); 286 rtc::CritScope lock(&crit_);
287 if (rtp_timestamp_delta_ == 0 && header.ssrc == ssrc_to_analyze_) {
288 rtp_timestamp_delta_ = header.timestamp - *first_sent_timestamp_;
289 }
272 290
273 if (rtp_timestamp_delta_ == 0) { 291 if (!IsFlexfec(header.payloadType) && header.ssrc == ssrc_to_analyze_) {
274 rtp_timestamp_delta_ = header.timestamp - *first_send_timestamp_;
275 first_send_timestamp_ = rtc::Optional<uint32_t>();
276 }
277 if (!IsFlexfec(header.payloadType)) {
278 // Ignore FlexFEC timestamps, to avoid collisions with media timestamps. 292 // Ignore FlexFEC timestamps, to avoid collisions with media timestamps.
279 // (FlexFEC and media are sent on different SSRCs, which have different 293 // (FlexFEC and media are sent on different SSRCs, which have different
280 // timestamps spaces.) 294 // timestamps spaces.)
295 // Also ignore packets from wrong SSRC.
281 int64_t timestamp = 296 int64_t timestamp =
282 wrap_handler_.Unwrap(header.timestamp - rtp_timestamp_delta_); 297 wrap_handler_.Unwrap(header.timestamp - rtp_timestamp_delta_);
283 send_times_[timestamp] = current_time; 298 send_times_[timestamp] = current_time;
284 if (!transport_->DiscardedLastPacket() && 299 if (!transport_->DiscardedLastPacket() &&
285 header.ssrc == ssrc_to_analyze_) { 300 header.ssrc == ssrc_to_analyze_) {
286 encoded_frame_sizes_[timestamp] += 301 encoded_frame_sizes_[timestamp] +=
287 length - (header.headerLength + header.paddingLength); 302 length - (header.headerLength + header.paddingLength);
288 } 303 }
289 } 304 }
290 } 305 }
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 485
471 // This class receives the send-side OnEncodeTiming and is provided to not 486 // This class receives the send-side OnEncodeTiming and is provided to not
472 // conflict with the receiver-side pre_decode_callback. 487 // conflict with the receiver-side pre_decode_callback.
473 class OnEncodeTimingProxy : public EncodedFrameObserver { 488 class OnEncodeTimingProxy : public EncodedFrameObserver {
474 public: 489 public:
475 explicit OnEncodeTimingProxy(VideoAnalyzer* parent) : parent_(parent) {} 490 explicit OnEncodeTimingProxy(VideoAnalyzer* parent) : parent_(parent) {}
476 491
477 void OnEncodeTiming(int64_t ntp_time_ms, int encode_time_ms) override { 492 void OnEncodeTiming(int64_t ntp_time_ms, int encode_time_ms) override {
478 parent_->MeasuredEncodeTiming(ntp_time_ms, encode_time_ms); 493 parent_->MeasuredEncodeTiming(ntp_time_ms, encode_time_ms);
479 } 494 }
480 void EncodedFrameCallback(const EncodedFrame& frame) override {} 495 void EncodedFrameCallback(const EncodedFrame& frame) override {
496 parent_->PostEncodeFrameCallback(frame);
497 }
481 498
482 private: 499 private:
483 VideoAnalyzer* const parent_; 500 VideoAnalyzer* const parent_;
484 }; 501 };
485 502
486 // This class receives the send-side OnFrame callback and is provided to not 503 // This class receives the send-side OnFrame callback and is provided to not
487 // conflict with the receiver-side renderer callback. 504 // conflict with the receiver-side renderer callback.
488 class PreEncodeProxy : public rtc::VideoSinkInterface<VideoFrame> { 505 class PreEncodeProxy : public rtc::VideoSinkInterface<VideoFrame> {
489 public: 506 public:
490 explicit PreEncodeProxy(VideoAnalyzer* parent) : parent_(parent) {} 507 explicit PreEncodeProxy(VideoAnalyzer* parent) : parent_(parent) {}
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
780 // forwards the captured frames to the VideoSendStream. 797 // forwards the captured frames to the VideoSendStream.
781 class CapturedFrameForwarder : public rtc::VideoSinkInterface<VideoFrame>, 798 class CapturedFrameForwarder : public rtc::VideoSinkInterface<VideoFrame>,
782 public rtc::VideoSourceInterface<VideoFrame> { 799 public rtc::VideoSourceInterface<VideoFrame> {
783 public: 800 public:
784 explicit CapturedFrameForwarder(VideoAnalyzer* analyzer) 801 explicit CapturedFrameForwarder(VideoAnalyzer* analyzer)
785 : analyzer_(analyzer), send_stream_input_(nullptr) {} 802 : analyzer_(analyzer), send_stream_input_(nullptr) {}
786 803
787 private: 804 private:
788 void OnFrame(const VideoFrame& video_frame) override { 805 void OnFrame(const VideoFrame& video_frame) override {
789 VideoFrame copy = video_frame; 806 VideoFrame copy = video_frame;
807 // Frames from the capturer does not have a rtp timestamp.
808 // Create one so it can be used for comparison.
809 RTC_DCHECK_EQ(0, video_frame.timestamp());
790 copy.set_timestamp(copy.ntp_time_ms() * 90); 810 copy.set_timestamp(copy.ntp_time_ms() * 90);
791 811 analyzer_->AddCapturedFrameForComparison(copy);
792 analyzer_->AddCapturedFrameForComparison(video_frame);
793 rtc::CritScope lock(&crit_); 812 rtc::CritScope lock(&crit_);
794 if (send_stream_input_) 813 if (send_stream_input_)
795 send_stream_input_->OnFrame(video_frame); 814 send_stream_input_->OnFrame(video_frame);
796 } 815 }
797 816
798 // Called when |send_stream_.SetSource()| is called. 817 // Called when |send_stream_.SetSource()| is called.
799 void AddOrUpdateSink(rtc::VideoSinkInterface<VideoFrame>* sink, 818 void AddOrUpdateSink(rtc::VideoSinkInterface<VideoFrame>* sink,
800 const rtc::VideoSinkWants& wants) override { 819 const rtc::VideoSinkWants& wants) override {
801 rtc::CritScope lock(&crit_); 820 rtc::CritScope lock(&crit_);
802 RTC_DCHECK(!send_stream_input_ || send_stream_input_ == sink); 821 RTC_DCHECK(!send_stream_input_ || send_stream_input_ == sink);
803 send_stream_input_ = sink; 822 send_stream_input_ = sink;
804 } 823 }
805 824
806 // Called by |send_stream_| when |send_stream_.SetSource()| is called. 825 // Called by |send_stream_| when |send_stream_.SetSource()| is called.
807 void RemoveSink(rtc::VideoSinkInterface<VideoFrame>* sink) override { 826 void RemoveSink(rtc::VideoSinkInterface<VideoFrame>* sink) override {
808 rtc::CritScope lock(&crit_); 827 rtc::CritScope lock(&crit_);
809 RTC_DCHECK(sink == send_stream_input_); 828 RTC_DCHECK(sink == send_stream_input_);
810 send_stream_input_ = nullptr; 829 send_stream_input_ = nullptr;
811 } 830 }
812 831
813 VideoAnalyzer* const analyzer_; 832 VideoAnalyzer* const analyzer_;
814 rtc::CriticalSection crit_; 833 rtc::CriticalSection crit_;
815 rtc::VideoSinkInterface<VideoFrame>* send_stream_input_ GUARDED_BY(crit_); 834 rtc::VideoSinkInterface<VideoFrame>* send_stream_input_ GUARDED_BY(crit_);
816 }; 835 };
817 836
818 void AddCapturedFrameForComparison(const VideoFrame& video_frame) { 837 void AddCapturedFrameForComparison(const VideoFrame& video_frame) {
819 rtc::CritScope lock(&crit_); 838 rtc::CritScope lock(&crit_);
820 RTC_DCHECK_EQ(0, video_frame.timestamp()); 839 frames_.push_back(video_frame);
821 // Frames from the capturer does not have a rtp timestamp. Create one so it
822 // can be used for comparison.
823 VideoFrame copy = video_frame;
824 copy.set_timestamp(copy.ntp_time_ms() * 90);
825 frames_.push_back(copy);
826 } 840 }
827 841
828 VideoSendStream* send_stream_; 842 VideoSendStream* send_stream_;
829 VideoReceiveStream* receive_stream_; 843 VideoReceiveStream* receive_stream_;
830 CapturedFrameForwarder captured_frame_forwarder_; 844 CapturedFrameForwarder captured_frame_forwarder_;
831 const std::string test_label_; 845 const std::string test_label_;
832 FILE* const graph_data_output_file_; 846 FILE* const graph_data_output_file_;
833 const std::string graph_title_; 847 const std::string graph_title_;
834 const uint32_t ssrc_to_analyze_; 848 const uint32_t ssrc_to_analyze_;
849 const uint32_t selected_width_;
850 const uint32_t selected_height_;
835 PreEncodeProxy pre_encode_proxy_; 851 PreEncodeProxy pre_encode_proxy_;
836 OnEncodeTimingProxy encode_timing_proxy_; 852 OnEncodeTimingProxy encode_timing_proxy_;
837 std::vector<Sample> samples_ GUARDED_BY(comparison_lock_); 853 std::vector<Sample> samples_ GUARDED_BY(comparison_lock_);
838 std::map<int64_t, int> samples_encode_time_ms_ GUARDED_BY(comparison_lock_); 854 std::map<int64_t, int> samples_encode_time_ms_ GUARDED_BY(comparison_lock_);
839 test::Statistics sender_time_ GUARDED_BY(comparison_lock_); 855 test::Statistics sender_time_ GUARDED_BY(comparison_lock_);
840 test::Statistics receiver_time_ GUARDED_BY(comparison_lock_); 856 test::Statistics receiver_time_ GUARDED_BY(comparison_lock_);
841 test::Statistics psnr_ GUARDED_BY(comparison_lock_); 857 test::Statistics psnr_ GUARDED_BY(comparison_lock_);
842 test::Statistics ssim_ GUARDED_BY(comparison_lock_); 858 test::Statistics ssim_ GUARDED_BY(comparison_lock_);
843 test::Statistics end_to_end_ GUARDED_BY(comparison_lock_); 859 test::Statistics end_to_end_ GUARDED_BY(comparison_lock_);
844 test::Statistics rendered_delta_ GUARDED_BY(comparison_lock_); 860 test::Statistics rendered_delta_ GUARDED_BY(comparison_lock_);
(...skipping 14 matching lines...) Expand all
859 int64_t last_render_time_; 875 int64_t last_render_time_;
860 uint32_t rtp_timestamp_delta_; 876 uint32_t rtp_timestamp_delta_;
861 877
862 rtc::CriticalSection crit_; 878 rtc::CriticalSection crit_;
863 std::deque<VideoFrame> frames_ GUARDED_BY(crit_); 879 std::deque<VideoFrame> frames_ GUARDED_BY(crit_);
864 rtc::Optional<VideoFrame> last_rendered_frame_ GUARDED_BY(crit_); 880 rtc::Optional<VideoFrame> last_rendered_frame_ GUARDED_BY(crit_);
865 rtc::TimestampWrapAroundHandler wrap_handler_ GUARDED_BY(crit_); 881 rtc::TimestampWrapAroundHandler wrap_handler_ GUARDED_BY(crit_);
866 std::map<int64_t, int64_t> send_times_ GUARDED_BY(crit_); 882 std::map<int64_t, int64_t> send_times_ GUARDED_BY(crit_);
867 std::map<int64_t, int64_t> recv_times_ GUARDED_BY(crit_); 883 std::map<int64_t, int64_t> recv_times_ GUARDED_BY(crit_);
868 std::map<int64_t, size_t> encoded_frame_sizes_ GUARDED_BY(crit_); 884 std::map<int64_t, size_t> encoded_frame_sizes_ GUARDED_BY(crit_);
869 rtc::Optional<uint32_t> first_send_timestamp_ GUARDED_BY(crit_); 885 rtc::Optional<uint32_t> first_encoded_timestamp_ GUARDED_BY(crit_);
886 rtc::Optional<uint32_t> first_sent_timestamp_ GUARDED_BY(crit_);
870 const double avg_psnr_threshold_; 887 const double avg_psnr_threshold_;
871 const double avg_ssim_threshold_; 888 const double avg_ssim_threshold_;
872 889
873 rtc::CriticalSection comparison_lock_; 890 rtc::CriticalSection comparison_lock_;
874 std::vector<rtc::PlatformThread*> comparison_thread_pool_; 891 std::vector<rtc::PlatformThread*> comparison_thread_pool_;
875 rtc::PlatformThread stats_polling_thread_; 892 rtc::PlatformThread stats_polling_thread_;
876 rtc::Event comparison_available_event_; 893 rtc::Event comparison_available_event_;
877 std::deque<FrameComparison> comparisons_ GUARDED_BY(comparison_lock_); 894 std::deque<FrameComparison> comparisons_ GUARDED_BY(comparison_lock_);
878 rtc::Event done_; 895 rtc::Event done_;
879 }; 896 };
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
1303 : params_.ss.num_spatial_layers - 1; 1320 : params_.ss.num_spatial_layers - 1;
1304 bool disable_quality_check = 1321 bool disable_quality_check =
1305 selected_stream.width != params_.video.width || 1322 selected_stream.width != params_.video.width ||
1306 selected_stream.height != params_.video.height || 1323 selected_stream.height != params_.video.height ||
1307 (!params_.ss.spatial_layers.empty() && 1324 (!params_.ss.spatial_layers.empty() &&
1308 params_.ss.spatial_layers[selected_sl].scaling_factor_num != 1325 params_.ss.spatial_layers[selected_sl].scaling_factor_num !=
1309 params_.ss.spatial_layers[selected_sl].scaling_factor_den); 1326 params_.ss.spatial_layers[selected_sl].scaling_factor_den);
1310 if (disable_quality_check) { 1327 if (disable_quality_check) {
1311 fprintf(stderr, 1328 fprintf(stderr,
1312 "Warning: Calculating PSNR and SSIM for downsized resolution " 1329 "Warning: Calculating PSNR and SSIM for downsized resolution "
1313 "not implemented yet! Skipping PSNR and SSIM calculations!"); 1330 "not implemented yet! Skipping PSNR and SSIM calculations!\n");
1314 } 1331 }
1315 1332
1316 VideoAnalyzer analyzer( 1333 VideoAnalyzer analyzer(
1317 &send_transport, params_.analyzer.test_label, 1334 &send_transport, params_.analyzer.test_label,
1318 disable_quality_check ? -1.1 : params_.analyzer.avg_psnr_threshold, 1335 disable_quality_check ? -1.1 : params_.analyzer.avg_psnr_threshold,
1319 disable_quality_check ? -1.1 : params_.analyzer.avg_ssim_threshold, 1336 disable_quality_check ? -1.1 : params_.analyzer.avg_ssim_threshold,
1320 params_.analyzer.test_durations_secs * params_.video.fps, 1337 params_.analyzer.test_durations_secs * params_.video.fps,
1321 graph_data_output_file, graph_title, 1338 graph_data_output_file, graph_title,
1322 kVideoSendSsrcs[params_.ss.selected_stream]); 1339 kVideoSendSsrcs[params_.ss.selected_stream],
1340 static_cast<uint32_t>(selected_stream.width),
1341 static_cast<uint32_t>(selected_stream.height));
1323 1342
1324 analyzer.SetReceiver(receiver_call_->Receiver()); 1343 analyzer.SetReceiver(receiver_call_->Receiver());
1325 send_transport.SetReceiver(&analyzer); 1344 send_transport.SetReceiver(&analyzer);
1326 recv_transport.SetReceiver(sender_call_->Receiver()); 1345 recv_transport.SetReceiver(sender_call_->Receiver());
1327 1346
1328 SetupVideo(&analyzer, &recv_transport); 1347 SetupVideo(&analyzer, &recv_transport);
1329 video_receive_configs_[params_.ss.selected_stream].renderer = &analyzer; 1348 video_receive_configs_[params_.ss.selected_stream].renderer = &analyzer;
1330 video_send_config_.pre_encode_callback = analyzer.pre_encode_proxy(); 1349 video_send_config_.pre_encode_callback = analyzer.pre_encode_proxy();
1331 for (auto& config : video_receive_configs_) 1350 for (auto& config : video_receive_configs_)
1332 config.pre_decode_callback = &analyzer; 1351 config.pre_decode_callback = &analyzer;
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
1569 std::ostringstream str; 1588 std::ostringstream str;
1570 str << receive_logs_++; 1589 str << receive_logs_++;
1571 std::string path = 1590 std::string path =
1572 params_.video.encoded_frame_base_path + "." + str.str() + ".recv.ivf"; 1591 params_.video.encoded_frame_base_path + "." + str.str() + ".recv.ivf";
1573 stream->EnableEncodedFrameRecording(rtc::CreatePlatformFile(path), 1592 stream->EnableEncodedFrameRecording(rtc::CreatePlatformFile(path),
1574 10000000); 1593 10000000);
1575 } 1594 }
1576 } 1595 }
1577 1596
1578 } // namespace webrtc 1597 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/video/full_stack_tests.cc ('k') | webrtc/video/video_receive_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698