Skip to content

Commit

Permalink
moved dropped time to <dropped>; added timestamp diff to <avsync>
Browse files Browse the repository at this point in the history
  • Loading branch information
arut committed Nov 23, 2012
1 parent 5db704c commit fa3e5a3
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions ngx_rtmp_stat_module.c
Expand Up @@ -348,16 +348,20 @@ ngx_rtmp_stat_live(ngx_http_request_t *r, ngx_chain_t ***lll,
NGX_RTMP_STAT_L("</time>");

NGX_RTMP_STAT_L("<dropped>");
NGX_RTMP_STAT(buf, ngx_snprintf(buf, sizeof(buf),
"%uz", ctx->ndropped) - buf);
NGX_RTMP_STAT_L("</dropped>");

NGX_RTMP_STAT_L("<avsync>");

/*NGX_RTMP_STAT(buf, ngx_snprintf(buf, sizeof(buf),
"%uz", ctx->ndropped) - buf);*/
NGX_RTMP_STAT(buf, ngx_snprintf(buf, sizeof(buf),
"%uD/%uD", ctx->cs[1].dropped,
ctx->cs[0].dropped) - buf);
NGX_RTMP_STAT_L("</dropped>");

NGX_RTMP_STAT_L("<avsync>");
if (!lacf->interleave) {
NGX_RTMP_STAT(buf, ngx_snprintf(buf, sizeof(buf),
"%L", (int64_t) ctx->cs[1].timestamp -
(int64_t) ctx->cs[0].timestamp)
- buf);
}
NGX_RTMP_STAT_L("</avsync>");

if (s->flashver.len) {
Expand Down

0 comments on commit fa3e5a3

Please sign in to comment.