@@ -101,42 +101,37 @@ int main(int argc, char *argv[]){
101101 uint32_t msDelay = TOPO_DEFAULT_PDELAY;
102102 uint32_t msQDelay = TOPO_DEFAULT_QDELAY;
103103
104- std::string instance=std::string (" 3" );
105- std::string loss_str (" 0" );
104+ double loss_rate = 0 ;
106105
107106 std::string gym_id (" gym" );
108107 std::string trace_path;
109108 std::uint64_t report_interval_ms = 60 ;
110109 std::uint64_t duration_time_ms = 0 ;
110+ std::uint32_t video_height = 1080 ;
111+ std::uint32_t video_width = 1920 ;
111112 bool standalone_test_only = true ;
112113
113114 CommandLine cmd;
114- cmd.AddValue (" it" , " instacne" , instance);
115- cmd.AddValue (" lo" , " loss" ,loss_str);
115+ cmd.AddValue (" lo" , " loss" ,loss_rate);
116116 cmd.AddValue (" gym_id" , " gym id should be unique in global system, the default is gym" , gym_id);
117117 cmd.AddValue (" trace_path" , " trace file path" , trace_path);
118118 cmd.AddValue (" report_interval_ms" , " report interval (ms)" , report_interval_ms);
119119 cmd.AddValue (" duration_time_ms" , " duration time (ms), the default is trace log duration" , duration_time_ms);
120+ cmd.AddValue (" video_height" , " video height" , video_height);
121+ cmd.AddValue (" video_width" , " video width" , video_width);
120122 cmd.AddValue (" standalone_test_only" , " standalone test only mode that don't need gym connect" , standalone_test_only);
121123
122124 cmd.Parse (argc, argv);
123125
124- int loss_integer=std::stoi (loss_str);
125- double loss_rate=loss_integer*1.0 /1000 ;
126-
127126 bool enable_random_loss=false ;
128- if (loss_integer >0 ){
127+ if (loss_rate >0 ){
129128 Config::SetDefault (" ns3::RateErrorModel::ErrorRate" , DoubleValue (loss_rate));
130129 Config::SetDefault (" ns3::RateErrorModel::ErrorUnit" , StringValue (" ERROR_UNIT_PACKET" ));
131130 Config::SetDefault (" ns3::BurstErrorModel::ErrorRate" , DoubleValue (loss_rate));
132131 Config::SetDefault (" ns3::BurstErrorModel::BurstSize" , StringValue (" ns3::UniformRandomVariable[Min=1|Max=3]" ));
133132 enable_random_loss=true ;
134133 }
135134
136- uint32_t min_rate=0 ;
137- uint32_t start_rate=500 ;
138- uint32_t max_rate=linkBw/1000 ;
139-
140135 NodeContainer nodes = BuildExampleTopo (linkBw, msDelay, msQDelay,enable_random_loss);
141136
142137 std::unique_ptr<TracePlayer> trace_player;
@@ -160,8 +155,7 @@ int main(int argc, char *argv[]){
160155 auto cc_factory = std::make_shared<NetworkControllerProxyFactory>(gym_conn);
161156 auto se_factory = std::make_shared<NetworkStateEstimatorProxyFactory>(gym_conn);
162157 auto webrtc_manager = std::make_unique<WebrtcSessionManager>(0 , duration_time_ms, cc_factory, se_factory);
163- webrtc_manager->SetFrameHxW (720 ,1280 );
164- webrtc_manager->SetRate (min_rate,start_rate,max_rate);
158+ webrtc_manager->SetFrameHxW (video_height,video_width);
165159 webrtc_manager->CreateClients ();
166160
167161 uint16_t sendPort=5432 ;
0 commit comments