mirror of
https://github.com/wangyu-/UDPspeeder.git
synced 2025-01-19 06:19:34 +08:00
add fec_done in fec_group_t
This commit is contained in:
parent
8db00a87f4
commit
f0a7b28a63
@ -594,6 +594,12 @@ int fec_decode_manager_t::input(char *s,int len)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(mp[seq].fec_done!=0)
|
||||||
|
{
|
||||||
|
mylog(log_debug,"fec already done, ignore\n");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
if(mp[seq].group_mp.find(inner_index)!=mp[seq].group_mp.end() )
|
if(mp[seq].group_mp.find(inner_index)!=mp[seq].group_mp.end() )
|
||||||
{
|
{
|
||||||
mylog(log_debug,"dup fec index\n");//duplicate can happen on a normal network, so its just log_debug
|
mylog(log_debug,"dup fec index\n");//duplicate can happen on a normal network, so its just log_debug
|
||||||
@ -730,6 +736,7 @@ int fec_decode_manager_t::input(char *s,int len)
|
|||||||
}
|
}
|
||||||
assert(rs_decode2(group_data_num,group_data_num+group_redundant_num,fec_tmp_arr,len)==0); //the input data has been modified in-place
|
assert(rs_decode2(group_data_num,group_data_num+group_redundant_num,fec_tmp_arr,len)==0); //the input data has been modified in-place
|
||||||
//this line should always succeed
|
//this line should always succeed
|
||||||
|
mp[seq].fec_done=1;
|
||||||
|
|
||||||
if(debug_fec_dec)
|
if(debug_fec_dec)
|
||||||
mylog(log_debug,"[dec]seq=%08x x=%d y=%d len=%d cnt=%d X=%d Y=%d\n",seq,group_data_num,group_redundant_num,len,int(inner_mp.size()),x_got,y_got);
|
mylog(log_debug,"[dec]seq=%08x x=%d y=%d len=%d cnt=%d X=%d Y=%d\n",seq,group_data_num,group_redundant_num,len,int(inner_mp.size()),x_got,y_got);
|
||||||
@ -818,6 +825,7 @@ int fec_decode_manager_t::input(char *s,int len)
|
|||||||
mylog(log_trace,"fec done,%d %d,missed_packet_counter=%d\n",group_data_num,group_redundant_num,missed_packet_counter);
|
mylog(log_trace,"fec done,%d %d,missed_packet_counter=%d\n",group_data_num,group_redundant_num,missed_packet_counter);
|
||||||
|
|
||||||
assert(rs_decode2(group_data_num,group_data_num+group_redundant_num,output_s_arr_buf,max_len)==0);//this should always succeed
|
assert(rs_decode2(group_data_num,group_data_num+group_redundant_num,output_s_arr_buf,max_len)==0);//this should always succeed
|
||||||
|
mp[seq].fec_done=1;
|
||||||
|
|
||||||
int sum_ori=0;
|
int sum_ori=0;
|
||||||
|
|
||||||
|
@ -196,7 +196,7 @@ struct fec_parameter_t
|
|||||||
extern fec_parameter_t g_fec_par;
|
extern fec_parameter_t g_fec_par;
|
||||||
//extern int dynamic_update_fec;
|
//extern int dynamic_update_fec;
|
||||||
|
|
||||||
const int anti_replay_timeout=60*1000;// 60s
|
const int anti_replay_timeout=120*1000;// 120s
|
||||||
|
|
||||||
struct anti_replay_t
|
struct anti_replay_t
|
||||||
{
|
{
|
||||||
@ -423,6 +423,7 @@ struct fec_group_t
|
|||||||
int data_num=-1;
|
int data_num=-1;
|
||||||
int redundant_num=-1;
|
int redundant_num=-1;
|
||||||
int len=-1;
|
int len=-1;
|
||||||
|
int fec_done=0;
|
||||||
//int data_counter=0;
|
//int data_counter=0;
|
||||||
map<int,int> group_mp;
|
map<int,int> group_mp;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user