Skip to content

Commit

Permalink
add a log for debuging
Browse files Browse the repository at this point in the history
  • Loading branch information
wangyu- committed Aug 6, 2018
1 parent 1f946ab commit 34d2ad1
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions fec_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -322,24 +322,33 @@ int fec_encode_manager_t::input(char *s,int len/*,int &is_first_packet*/)

assert(blob_encode.output(actual_data_num,blob_output,fec_len)==0);

if(debug_fec)
mylog(log_debug,"x=%d y=%d len=%d\n",actual_data_num,actual_redundant_num,fec_len);
else
mylog(log_trace,"x=%d y=%d len=%d\n",actual_data_num,actual_redundant_num,fec_len);
}
else
{
assert(counter<=fec_par.rs_cnt);
actual_data_num=counter;
actual_redundant_num=fec_par.rs_par[counter-1].y;

int sum_ori=0;
for(int i=0;i<counter;i++)
{
sum_ori+=input_len[i];
assert(input_len[i]>=0);
if(input_len[i]>fec_len) fec_len=input_len[i];
}

int sum=fec_len*counter;

if(debug_fec)
mylog(log_debug,"x=%d y=%d len=%d sum_ori=%d sum=%d\n",actual_data_num,actual_redundant_num,fec_len,sum_ori,sum);
else
mylog(log_trace,"x=%d y=%d len=%d sum_ori=%d sum=%d\n",actual_data_num,actual_redundant_num,fec_len,sum_ori,sum);
}
if(debug_fec)
mylog(log_debug,"x=%d y=%d len=%d\n",actual_data_num,actual_redundant_num,fec_len);
else
mylog(log_trace,"x=%d y=%d len=%d\n",actual_data_num,actual_redundant_num,fec_len);

//mylog(log_trace,"%d %d %d\n",actual_data_num,actual_redundant_num,fec_len);

char *tmp_output_buf[max_fec_packet_num+5]={0};
Expand Down

0 comments on commit 34d2ad1

Please sign in to comment.