RTMP connector teller approach
This commit is contained in:
parent
ea588b0791
commit
d9fd90e36f
1 changed files with 5 additions and 5 deletions
|
@ -23,8 +23,7 @@ int main(){
|
||||||
|
|
||||||
//first timestamp set
|
//first timestamp set
|
||||||
firsttime = getNowMS();
|
firsttime = getNowMS();
|
||||||
int lastcheck = getNowMS();
|
int teller = 0;
|
||||||
int rightnow = 0;
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stderr, "Doing handshake...\n");
|
fprintf(stderr, "Doing handshake...\n");
|
||||||
|
@ -44,9 +43,10 @@ int main(){
|
||||||
#endif
|
#endif
|
||||||
while (!ferror(stdin) && !ferror(stdout)){
|
while (!ferror(stdin) && !ferror(stdout)){
|
||||||
//only parse input from stdin if available or not yet init'ed
|
//only parse input from stdin if available or not yet init'ed
|
||||||
rightnow = getNowMS();
|
//rightnow = getNowMS();
|
||||||
if ((!ready4data || (snd_cnt - snd_window_at >= snd_window_size)) && (rightnow - lastcheck > 100)){
|
teller++;
|
||||||
lastcheck = rightnow;
|
if ((!ready4data || (snd_cnt - snd_window_at >= snd_window_size)) && (teller > 15)){
|
||||||
|
teller = 0;
|
||||||
parseChunk();
|
parseChunk();
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue