@@ -424,6 +424,11 @@ ngx_rtmp_stat_live(ngx_http_request_t *r, ngx_chain_t ***lll,
424
424
}
425
425
NGX_RTMP_STAT_L ("</avsync>" );
426
426
427
+ NGX_RTMP_STAT_L ("<timestamp>" );
428
+ NGX_RTMP_STAT (bbuf , ngx_snprintf (bbuf , sizeof (bbuf ),
429
+ "%D" , s -> current_time ) - bbuf );
430
+ NGX_RTMP_STAT_L ("</timestamp>" );
431
+
427
432
if (ctx -> publishing ) {
428
433
NGX_RTMP_STAT_L ("<publishing/>" );
429
434
}
@@ -510,6 +515,7 @@ ngx_rtmp_stat_play(ngx_http_request_t *r, ngx_chain_t ***lll,
510
515
ngx_rtmp_session_t * s ;
511
516
ngx_uint_t n , nclients , total_nclients ;
512
517
u_char buf [NGX_INT_T_LEN ];
518
+ u_char bbuf [NGX_INT32_LEN ];
513
519
ngx_rtmp_stat_loc_conf_t * slcf ;
514
520
515
521
if (pacf -> entries .nelts == 0 ) {
@@ -544,6 +550,11 @@ ngx_rtmp_stat_play(ngx_http_request_t *r, ngx_chain_t ***lll,
544
550
545
551
ngx_rtmp_stat_client (r , lll , s );
546
552
553
+ NGX_RTMP_STAT_L ("<timestamp>" );
554
+ NGX_RTMP_STAT (bbuf , ngx_snprintf (bbuf , sizeof (bbuf ),
555
+ "%D" , s -> current_time ) - bbuf );
556
+ NGX_RTMP_STAT_L ("</timestamp>" );
557
+
547
558
NGX_RTMP_STAT_L ("</client>\r\n" );
548
559
}
549
560
}
0 commit comments