mirror of
https://github.com/zotanmew/nginx-rtmp-module.git
synced 2024-05-16 00:31:09 +02:00
added client id to stat
This commit is contained in:
parent
fa3e5a35c1
commit
ebca0917a4
|
@ -337,19 +337,23 @@ ngx_rtmp_stat_live(ngx_http_request_t *r, ngx_chain_t ***lll,
|
|||
#ifdef NGX_RTMP_POOL_DEBUG
|
||||
ngx_rtmp_stat_dump_pool(r, lll, s->connection->pool);
|
||||
#endif
|
||||
NGX_RTMP_STAT_L("<id>");
|
||||
NGX_RTMP_STAT(buf, ngx_snprintf(buf, sizeof(buf), "%ui",
|
||||
(ngx_uint_t) s->connection->number)
|
||||
- buf);
|
||||
NGX_RTMP_STAT_L("</id>");
|
||||
|
||||
NGX_RTMP_STAT_L("<address>");
|
||||
NGX_RTMP_STAT_S(&s->connection->addr_text);
|
||||
NGX_RTMP_STAT_L("</address>");
|
||||
|
||||
NGX_RTMP_STAT_L("<time>");
|
||||
NGX_RTMP_STAT(buf, ngx_snprintf(buf, sizeof(buf),
|
||||
"%M", ngx_current_msec - s->epoch) - buf);
|
||||
NGX_RTMP_STAT(buf, ngx_snprintf(buf, sizeof(buf), "%M",
|
||||
ngx_current_msec - s->epoch)
|
||||
- buf);
|
||||
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(buf, ngx_snprintf(buf, sizeof(buf),
|
||||
"%uD/%uD", ctx->cs[1].dropped,
|
||||
ctx->cs[0].dropped) - buf);
|
||||
|
|
2
stat.xsl
2
stat.xsl
|
@ -125,6 +125,7 @@
|
|||
<td colspan="12" ngcolor="#eeeeee">
|
||||
<table cellspacing="1" cellpadding="5">
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<th>State</th>
|
||||
<th>Address</th>
|
||||
<th>Flash version</th>
|
||||
|
@ -187,6 +188,7 @@
|
|||
<xsl:otherwise>#eeeeee</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<td><xsl:value-of select="id"/></td>
|
||||
<td><xsl:call-template name="clientstate"/></td>
|
||||
<td><xsl:value-of select="address"/></td>
|
||||
<td><xsl:value-of select="flashver"/></td>
|
||||
|
|
Loading…
Reference in a new issue