Skip to content

Commit

Permalink
test with throttler disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
wangyu- committed Nov 2, 2022
1 parent a8606af commit 4a230bc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions protocol/whist/network/congestion_control/cc_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,8 @@ class CongestionCongrollerImpl:CongestionCongrollerInterface
cc_shared_state.current_bitrate = loss_based_target_rate;
//whist_plotter_insert_sample("current_bitrate_ratio", get_timestamp_sec(), cc_shared_state.current_bitrate_ratio*100);

output.bandwitdth_saturation = false;
/*
if(current_time - cc_shared_state.first_process_time > webrtc::TimeDelta::Seconds(10)){
int sec= (current_time - cc_shared_state.first_process_time).seconds();
if(sec%10==0||sec%10==1)
Expand All @@ -309,11 +311,12 @@ class CongestionCongrollerImpl:CongestionCongrollerInterface
else output.bandwitdth_saturation = false;
} else{
output.bandwitdth_saturation = true;
}
}*/

output.target_bitrate = (cc_shared_state.max_bitrate.bps()*1.0 - cc_shared_state.min_bitrate.bps()*1.0) * (current_time -cc_shared_state.first_process_time).ms()/1000.0/300.0 + cc_shared_state.min_bitrate.bps();

whist_plotter_insert_sample("saturate", get_timestamp_sec(), output.bandwitdth_saturation *-5);

//output.bandwitdth_saturation = true;

return output;
}
};
Expand Down
2 changes: 1 addition & 1 deletion protocol/whist/network/udp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2259,7 +2259,7 @@ void udp_handle_network_settings(void* raw_context, NetworkSettings network_sett
LOG_ERROR("Tried to set the burst bitrate, but there's no network throttler!");
} else {
// Subtract audio bitrate from burst bitrate as audio is not throttled
network_throttler_set_burst_bitrate(context->network_throttler, burst_bitrate);
network_throttler_set_burst_bitrate(context->network_throttler, burst_bitrate*100);
}

// Set FEC Packet Ratios
Expand Down

0 comments on commit 4a230bc

Please sign in to comment.