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

Unified Diff: webrtc/video/replay.cc

Issue 2972423002: Fix video_replay tool to respect RTX stream and fix default parameters. (Closed)
Patch Set: Fix format Created 3 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/test/call_test.cc ('k') | webrtc/video/video_quality_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/replay.cc
diff --git a/webrtc/video/replay.cc b/webrtc/video/replay.cc
index 915f5880f951c3786491016340c040673965a5e7..736db449cc054fba943e6ae12af22e8dae253700 100644
--- a/webrtc/video/replay.cc
+++ b/webrtc/video/replay.cc
@@ -23,6 +23,7 @@
#include "webrtc/rtc_base/checks.h"
#include "webrtc/system_wrappers/include/clock.h"
#include "webrtc/system_wrappers/include/sleep.h"
+#include "webrtc/test/call_test.h"
#include "webrtc/test/encoder_settings.h"
#include "webrtc/test/fake_decoder.h"
#include "webrtc/test/gtest.h"
@@ -43,21 +44,38 @@ namespace flags {
static bool ValidatePayloadType(const char* flagname, int32_t payload_type) {
return payload_type > 0 && payload_type <= 127;
}
-DEFINE_int32(payload_type, 0, "Payload type");
+DEFINE_int32(payload_type, test::CallTest::kPayloadTypeVP8, "Payload type");
static int PayloadType() { return static_cast<int>(FLAGS_payload_type); }
static const bool payload_dummy =
google::RegisterFlagValidator(&FLAGS_payload_type, &ValidatePayloadType);
+DEFINE_int32(payload_type_rtx,
+ test::CallTest::kSendRtxPayloadType,
+ "RTX payload type");
+static int PayloadTypeRtx() {
+ return static_cast<int>(FLAGS_payload_type_rtx);
+}
+static const bool payload_rtx_dummy =
+ google::RegisterFlagValidator(&FLAGS_payload_type_rtx,
+ &ValidatePayloadType);
+
// Flag for SSRC.
static bool ValidateSsrc(const char* flagname, uint64_t ssrc) {
return ssrc > 0 && ssrc <= 0xFFFFFFFFu;
}
-DEFINE_uint64(ssrc, 0, "Incoming SSRC");
+DEFINE_uint64(ssrc, test::CallTest::kVideoSendSsrcs[0], "Incoming SSRC");
static uint32_t Ssrc() { return static_cast<uint32_t>(FLAGS_ssrc); }
static const bool ssrc_dummy =
google::RegisterFlagValidator(&FLAGS_ssrc, &ValidateSsrc);
+DEFINE_uint64(ssrc_rtx, test::CallTest::kSendRtxSsrcs[0], "Incoming RTX SSRC");
+static uint32_t SsrcRtx() {
+ return static_cast<uint32_t>(FLAGS_ssrc_rtx);
+}
+static const bool ssrc_rtx_dummy =
+ google::RegisterFlagValidator(&FLAGS_ssrc_rtx, &ValidateSsrc);
+
static bool ValidateOptionalPayloadType(const char* flagname,
int32_t payload_type) {
return payload_type == -1 || ValidatePayloadType(flagname, payload_type);
@@ -219,6 +237,9 @@ void RtpReplay() {
VideoReceiveStream::Config receive_config(&transport);
receive_config.rtp.remote_ssrc = flags::Ssrc();
receive_config.rtp.local_ssrc = kReceiverLocalSsrc;
+ receive_config.rtp.rtx_ssrc = flags::SsrcRtx();
+ receive_config.rtp.rtx_payload_types[flags::PayloadType()] =
+ flags::PayloadTypeRtx();
receive_config.rtp.ulpfec.ulpfec_payload_type = flags::FecPayloadType();
receive_config.rtp.ulpfec.red_payload_type = flags::RedPayloadType();
receive_config.rtp.nack.rtp_history_ms = 1000;
« no previous file with comments | « webrtc/test/call_test.cc ('k') | webrtc/video/video_quality_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698