Chromium Code Reviews| Index: webrtc/video/replay.cc |
| diff --git a/webrtc/video/replay.cc b/webrtc/video/replay.cc |
| index 915f5880f951c3786491016340c040673965a5e7..509b1bcc1113c4436d5e0f71425f81c78c99aab5 100644 |
| --- a/webrtc/video/replay.cc |
| +++ b/webrtc/video/replay.cc |
| @@ -43,21 +43,36 @@ 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, 123, "Payload type"); |
|
sprang_webrtc
2017/07/10 16:00:48
The new default values, do they need to be literal
ilnik
2017/07/10 16:17:49
Done.
|
| 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, 98, "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, 0xC0FFED, "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, 0xBADCAFD, "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 +234,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; |