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/interface/cpu_info.h" | 25 #include "webrtc/system_wrappers/interface/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; |
35 static const int kSendStatsPollingIntervalMs = 1000; | 37 static const int kSendStatsPollingIntervalMs = 1000; |
36 static const int kPayloadTypeVP8 = 123; | 38 static const int kPayloadTypeVP8 = 123; |
37 static const int kPayloadTypeVP9 = 124; | 39 static const int kPayloadTypeVP9 = 124; |
38 | 40 |
39 class VideoAnalyzer : public PacketReceiver, | 41 class VideoAnalyzer : public PacketReceiver, |
40 public newapi::Transport, | 42 public newapi::Transport, |
41 public VideoRenderer, | 43 public VideoRenderer, |
42 public VideoCaptureInput, | 44 public VideoCaptureInput, |
43 public EncodedFrameObserver { | 45 public EncodedFrameObserver { |
44 public: | 46 public: |
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
591 return; | 593 return; |
592 } | 594 } |
593 send_config_.encoder_settings.encoder = encoder_.get(); | 595 send_config_.encoder_settings.encoder = encoder_.get(); |
594 send_config_.encoder_settings.payload_name = params.common.codec; | 596 send_config_.encoder_settings.payload_name = params.common.codec; |
595 send_config_.encoder_settings.payload_type = payload_type; | 597 send_config_.encoder_settings.payload_type = payload_type; |
596 | 598 |
597 send_config_.rtp.nack.rtp_history_ms = kNackRtpHistoryMs; | 599 send_config_.rtp.nack.rtp_history_ms = kNackRtpHistoryMs; |
598 send_config_.rtp.rtx.ssrcs.push_back(kSendRtxSsrcs[0]); | 600 send_config_.rtp.rtx.ssrcs.push_back(kSendRtxSsrcs[0]); |
599 send_config_.rtp.rtx.payload_type = kSendRtxPayloadType; | 601 send_config_.rtp.rtx.payload_type = kSendRtxPayloadType; |
600 | 602 |
| 603 send_config_.rtp.extensions.clear(); |
| 604 if (params.common.send_side_bwe) { |
| 605 send_config_.rtp.extensions.push_back(RtpExtension( |
| 606 RtpExtension::kTransportSequenceNumber, kTransportSeqExtensionId)); |
| 607 } else { |
| 608 send_config_.rtp.extensions.push_back( |
| 609 RtpExtension(RtpExtension::kAbsSendTime, kAbsSendTimeExtensionId)); |
| 610 } |
| 611 |
601 // Automatically fill out streams[0] with params. | 612 // Automatically fill out streams[0] with params. |
602 VideoStream* stream = &encoder_config_.streams[0]; | 613 VideoStream* stream = &encoder_config_.streams[0]; |
603 stream->width = params.common.width; | 614 stream->width = params.common.width; |
604 stream->height = params.common.height; | 615 stream->height = params.common.height; |
605 stream->min_bitrate_bps = params.common.min_bitrate_bps; | 616 stream->min_bitrate_bps = params.common.min_bitrate_bps; |
606 stream->target_bitrate_bps = params.common.target_bitrate_bps; | 617 stream->target_bitrate_bps = params.common.target_bitrate_bps; |
607 stream->max_bitrate_bps = params.common.max_bitrate_bps; | 618 stream->max_bitrate_bps = params.common.max_bitrate_bps; |
608 stream->max_framerate = static_cast<int>(params.common.fps); | 619 stream->max_framerate = static_cast<int>(params.common.fps); |
609 | 620 |
610 stream->temporal_layer_thresholds_bps.clear(); | 621 stream->temporal_layer_thresholds_bps.clear(); |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
807 send_stream_->Stop(); | 818 send_stream_->Stop(); |
808 receive_stream->Stop(); | 819 receive_stream->Stop(); |
809 | 820 |
810 call->DestroyVideoReceiveStream(receive_stream); | 821 call->DestroyVideoReceiveStream(receive_stream); |
811 call->DestroyVideoSendStream(send_stream_); | 822 call->DestroyVideoSendStream(send_stream_); |
812 | 823 |
813 transport.StopSending(); | 824 transport.StopSending(); |
814 } | 825 } |
815 | 826 |
816 } // namespace webrtc | 827 } // namespace webrtc |
OLD | NEW |