Minor change to the Json Config format for the replay file.

See: test/fuzzers/configs/replay_packet_fuzzer for example configurations.

Bug: webrtc:10117
Change-Id: Ife2bf7d053bc4feb4d7e6e38ff31280236c962b6
Reviewed-on: https://webrtc-review.googlesource.com/c/116764
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26204}
This commit is contained in:
Benjamin Wright 2019-01-10 09:49:02 -08:00 committed by Commit Bot
parent 53eae87bf8
commit e9bece37ae

View File

@ -259,29 +259,30 @@ class VideoReceiveStreamConfigDeserializer final {
}
receive_config.render_delay_ms = json["render_delay_ms"].asInt64();
receive_config.target_delay_ms = json["target_delay_ms"].asInt64();
receive_config.rtp.remote_ssrc = json["remote_ssrc"].asInt64();
receive_config.rtp.local_ssrc = json["local_ssrc"].asInt64();
receive_config.rtp.remote_ssrc = json["rtp"]["remote_ssrc"].asInt64();
receive_config.rtp.local_ssrc = json["rtp"]["local_ssrc"].asInt64();
receive_config.rtp.rtcp_mode =
json["rtcp_mode"].asString() == "RtcpMode::kCompound"
json["rtp"]["rtcp_mode"].asString() == "RtcpMode::kCompound"
? RtcpMode::kCompound
: RtcpMode::kReducedSize;
receive_config.rtp.remb = json["remb"].asBool();
receive_config.rtp.transport_cc = json["transport_cc"].asBool();
receive_config.rtp.remb = json["rtp"]["remb"].asBool();
receive_config.rtp.transport_cc = json["rtp"]["transport_cc"].asBool();
receive_config.rtp.nack.rtp_history_ms =
json["nack"]["rtp_history_ms"].asInt64();
json["rtp"]["nack"]["rtp_history_ms"].asInt64();
receive_config.rtp.ulpfec_payload_type =
json["ulpfec_payload_type"].asInt64();
receive_config.rtp.red_payload_type = json["red_payload_type"].asInt64();
receive_config.rtp.rtx_ssrc = json["rtx_ssrc"].asInt64();
json["rtp"]["ulpfec_payload_type"].asInt64();
receive_config.rtp.red_payload_type =
json["rtp"]["red_payload_type"].asInt64();
receive_config.rtp.rtx_ssrc = json["rtp"]["rtx_ssrc"].asInt64();
for (const auto& pl_json : json["rtx_payload_types"]) {
for (const auto& pl_json : json["rtp"]["rtx_payload_types"]) {
std::vector<std::string> members = pl_json.getMemberNames();
RTC_CHECK_EQ(members.size(), 1);
Json::Value rtx_payload_type = pl_json[members[0]];
receive_config.rtp.rtx_associated_payload_types[std::stoi(members[0])] =
rtx_payload_type.asInt64();
}
for (const auto& ext_json : json["extensions"]) {
for (const auto& ext_json : json["rtp"]["extensions"]) {
receive_config.rtp.extensions.emplace_back(ext_json["uri"].asString(),
ext_json["id"].asInt64(),
ext_json["encrypt"].asBool());