1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

add packets interval in ms to set the right send_min_interval

This commit is contained in:
winlin 2015-08-19 15:14:26 +08:00
parent de48b477ae
commit e7714cd445
9 changed files with 48 additions and 22 deletions

View file

@ -256,8 +256,10 @@ int main(int argc, char** argv)
}
}
int64_t nb_packets = 0;
u_int32_t pre_timestamp = 0;
int64_t pre_now = srs_utils_time_ms();
int64_t start_time = pre_now;
for (;;) {
int size;
char type;
@ -269,7 +271,7 @@ int main(int argc, char** argv)
goto rtmp_destroy;
}
if (srs_human_print_rtmp_packet3(type, timestamp, data, size, pre_timestamp, pre_now) != 0) {
if (srs_human_print_rtmp_packet4(type, timestamp, data, size, pre_timestamp, pre_now, start_time, nb_packets++) != 0) {
srs_human_trace("print rtmp packet failed.");
goto rtmp_destroy;
}