OLD | NEW |
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 <stdio.h> | 10 #include <stdio.h> |
(...skipping 14 matching lines...) Expand all Loading... |
25 #include "webrtc/system_wrappers/include/cpu_info.h" | 25 #include "webrtc/system_wrappers/include/cpu_info.h" |
26 #include "webrtc/test/layer_filtering_transport.h" | 26 #include "webrtc/test/layer_filtering_transport.h" |
27 #include "webrtc/test/run_loop.h" | 27 #include "webrtc/test/run_loop.h" |
28 #include "webrtc/test/statistics.h" | 28 #include "webrtc/test/statistics.h" |
29 #include "webrtc/test/testsupport/fileutils.h" | 29 #include "webrtc/test/testsupport/fileutils.h" |
30 #include "webrtc/test/video_renderer.h" | 30 #include "webrtc/test/video_renderer.h" |
31 #include "webrtc/video/video_quality_test.h" | 31 #include "webrtc/video/video_quality_test.h" |
32 | 32 |
33 namespace webrtc { | 33 namespace webrtc { |
34 | 34 |
35 static const int kTransportSeqExtensionId = | |
36 VideoQualityTest::kAbsSendTimeExtensionId + 1; | |
37 static const int kSendStatsPollingIntervalMs = 1000; | 35 static const int kSendStatsPollingIntervalMs = 1000; |
38 static const int kPayloadTypeVP8 = 123; | 36 static const int kPayloadTypeVP8 = 123; |
39 static const int kPayloadTypeVP9 = 124; | 37 static const int kPayloadTypeVP9 = 124; |
40 | 38 |
41 class VideoAnalyzer : public PacketReceiver, | 39 class VideoAnalyzer : public PacketReceiver, |
42 public Transport, | 40 public Transport, |
43 public VideoRenderer, | 41 public VideoRenderer, |
44 public VideoCaptureInput, | 42 public VideoCaptureInput, |
45 public EncodedFrameObserver, | 43 public EncodedFrameObserver, |
46 public EncodingTimeObserver { | 44 public EncodingTimeObserver { |
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
621 send_config_.encoder_settings.encoder = encoder_.get(); | 619 send_config_.encoder_settings.encoder = encoder_.get(); |
622 send_config_.encoder_settings.payload_name = params.common.codec; | 620 send_config_.encoder_settings.payload_name = params.common.codec; |
623 send_config_.encoder_settings.payload_type = payload_type; | 621 send_config_.encoder_settings.payload_type = payload_type; |
624 | 622 |
625 send_config_.rtp.nack.rtp_history_ms = kNackRtpHistoryMs; | 623 send_config_.rtp.nack.rtp_history_ms = kNackRtpHistoryMs; |
626 send_config_.rtp.rtx.ssrcs.push_back(kSendRtxSsrcs[0]); | 624 send_config_.rtp.rtx.ssrcs.push_back(kSendRtxSsrcs[0]); |
627 send_config_.rtp.rtx.payload_type = kSendRtxPayloadType; | 625 send_config_.rtp.rtx.payload_type = kSendRtxPayloadType; |
628 | 626 |
629 send_config_.rtp.extensions.clear(); | 627 send_config_.rtp.extensions.clear(); |
630 if (params.common.send_side_bwe) { | 628 if (params.common.send_side_bwe) { |
| 629 send_config_.rtp.extensions.push_back( |
| 630 RtpExtension(RtpExtension::kTransportSequenceNumber, |
| 631 test::kTransportSequenceNumberExtensionId)); |
| 632 } else { |
631 send_config_.rtp.extensions.push_back(RtpExtension( | 633 send_config_.rtp.extensions.push_back(RtpExtension( |
632 RtpExtension::kTransportSequenceNumber, kTransportSeqExtensionId)); | 634 RtpExtension::kAbsSendTime, test::kAbsSendTimeExtensionId)); |
633 } else { | |
634 send_config_.rtp.extensions.push_back( | |
635 RtpExtension(RtpExtension::kAbsSendTime, kAbsSendTimeExtensionId)); | |
636 } | 635 } |
637 | 636 |
638 // Automatically fill out streams[0] with params. | 637 // Automatically fill out streams[0] with params. |
639 VideoStream* stream = &encoder_config_.streams[0]; | 638 VideoStream* stream = &encoder_config_.streams[0]; |
640 stream->width = params.common.width; | 639 stream->width = params.common.width; |
641 stream->height = params.common.height; | 640 stream->height = params.common.height; |
642 stream->min_bitrate_bps = params.common.min_bitrate_bps; | 641 stream->min_bitrate_bps = params.common.min_bitrate_bps; |
643 stream->target_bitrate_bps = params.common.target_bitrate_bps; | 642 stream->target_bitrate_bps = params.common.target_bitrate_bps; |
644 stream->max_bitrate_bps = params.common.max_bitrate_bps; | 643 stream->max_bitrate_bps = params.common.max_bitrate_bps; |
645 stream->max_framerate = static_cast<int>(params.common.fps); | 644 stream->max_framerate = static_cast<int>(params.common.fps); |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
857 send_stream_->Stop(); | 856 send_stream_->Stop(); |
858 receive_stream->Stop(); | 857 receive_stream->Stop(); |
859 | 858 |
860 call->DestroyVideoReceiveStream(receive_stream); | 859 call->DestroyVideoReceiveStream(receive_stream); |
861 call->DestroyVideoSendStream(send_stream_); | 860 call->DestroyVideoSendStream(send_stream_); |
862 | 861 |
863 transport.StopSending(); | 862 transport.StopSending(); |
864 } | 863 } |
865 | 864 |
866 } // namespace webrtc | 865 } // namespace webrtc |
OLD | NEW |