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

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

Issue 1362303002: Reland "Wire up send-side bandwidth estimation." (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 2 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/video_quality_test.h ('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 <stdio.h> 10 #include <stdio.h>
(...skipping 14 matching lines...) Expand all
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
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 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
819 send_stream_->Stop(); 830 send_stream_->Stop();
820 receive_stream->Stop(); 831 receive_stream->Stop();
821 832
822 call->DestroyVideoReceiveStream(receive_stream); 833 call->DestroyVideoReceiveStream(receive_stream);
823 call->DestroyVideoSendStream(send_stream_); 834 call->DestroyVideoSendStream(send_stream_);
824 835
825 transport.StopSending(); 836 transport.StopSending();
826 } 837 }
827 838
828 } // namespace webrtc 839 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/video/video_quality_test.h ('k') | webrtc/video/video_receive_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698