2012-05-07 13:41:03 +02:00
|
|
|
<?xml version="1.0" encoding="utf-8" ?>
|
|
|
|
|
|
|
|
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
|
|
|
|
2012-05-25 14:34:42 +02:00
|
|
|
|
2012-05-07 13:41:03 +02:00
|
|
|
<xsl:template match="/">
|
2012-05-10 14:35:29 +02:00
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>RTMP statistics</title>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<xsl:apply-templates select="rtmp"/>
|
|
|
|
<hr/>
|
2012-06-05 13:51:51 +02:00
|
|
|
Generated by <a href='https://github.com/arut/nginx-rtmp-module'>NGINX RTMP module</a>,
|
|
|
|
<a href="http://nginx.com">NGINX</a> <xsl:value-of select="/rtmp/version"/>,
|
|
|
|
built <xsl:value-of select="/rtmp/built"/> <xsl:value-of select="/rtmp/compiler"/>
|
2012-05-10 14:35:29 +02:00
|
|
|
</body>
|
|
|
|
</html>
|
2012-05-07 13:41:03 +02:00
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template match="rtmp">
|
2012-05-10 14:35:29 +02:00
|
|
|
<table cellspacing="1" cellpadding="5">
|
|
|
|
<tr bgcolor="#999999">
|
|
|
|
<th>RTMP</th>
|
|
|
|
<th>#clients</th>
|
|
|
|
<th>In bytes</th>
|
|
|
|
<th>Out bytes</th>
|
|
|
|
<th>In Kbps</th>
|
|
|
|
<th>Out Kbps</th>
|
2012-05-12 15:47:39 +02:00
|
|
|
<th>Size</th>
|
|
|
|
<th>Frame Rate</th>
|
|
|
|
<th>Video</th>
|
|
|
|
<th>Audio</th>
|
2012-05-10 14:35:29 +02:00
|
|
|
<th>State</th>
|
2012-05-25 14:34:42 +02:00
|
|
|
<th>Time</th>
|
2012-05-10 14:35:29 +02:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td colspan="2"/>
|
|
|
|
<td><xsl:value-of select="in"/></td>
|
|
|
|
<td><xsl:value-of select="out"/></td>
|
|
|
|
<td><xsl:value-of select="round(bwin div 1024)"/></td>
|
|
|
|
<td><xsl:value-of select="round(bwout div 1024)"/></td>
|
|
|
|
</tr>
|
|
|
|
<xsl:apply-templates select="server"/>
|
|
|
|
</table>
|
2012-05-07 13:41:03 +02:00
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template match="server">
|
2012-05-10 14:35:29 +02:00
|
|
|
<xsl:apply-templates select="application"/>
|
2012-05-07 13:41:03 +02:00
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template match="application">
|
2012-05-10 14:35:29 +02:00
|
|
|
<tr bgcolor="#999999">
|
|
|
|
<td>
|
|
|
|
<b><xsl:value-of select="name"/></b>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<xsl:apply-templates select="live"/>
|
2012-05-07 13:41:03 +02:00
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template match="live">
|
2012-05-10 14:35:29 +02:00
|
|
|
<tr bgcolor="#aaaaaa">
|
|
|
|
<td>
|
|
|
|
<i>live streams</i>
|
|
|
|
</td>
|
|
|
|
<td align="middle">
|
|
|
|
<xsl:value-of select="nclients"/>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<xsl:apply-templates select="stream"/>
|
2012-05-07 13:41:03 +02:00
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template match="stream">
|
2012-05-10 14:35:29 +02:00
|
|
|
<tr valign="top" bgcolor="#cccccc">
|
|
|
|
<td>
|
2012-05-10 15:05:50 +02:00
|
|
|
<a href="">
|
|
|
|
<xsl:attribute name="onclick">
|
2012-05-16 16:04:35 +02:00
|
|
|
var d=document.getElementById('<xsl:value-of select="../../name"/>-<xsl:value-of select="name"/>');
|
2012-05-10 15:05:50 +02:00
|
|
|
d.style.display=d.style.display=='none'?'':'none';
|
|
|
|
return false
|
|
|
|
</xsl:attribute>
|
|
|
|
<xsl:value-of select="name"/>
|
2012-05-16 18:35:09 +02:00
|
|
|
<xsl:if test="string-length(name) = 0">
|
|
|
|
[EMPTY]
|
|
|
|
</xsl:if>
|
2012-05-10 15:05:50 +02:00
|
|
|
</a>
|
2012-05-10 14:35:29 +02:00
|
|
|
</td>
|
2012-05-12 15:47:39 +02:00
|
|
|
<td align="middle"> <xsl:value-of select="nclients"/> </td>
|
|
|
|
<td><xsl:value-of select="in"/></td>
|
|
|
|
<td><xsl:value-of select="out"/></td>
|
|
|
|
<td><xsl:value-of select="round(bwin div 1024)"/></td>
|
|
|
|
<td><xsl:value-of select="round(bwout div 1024)"/></td>
|
|
|
|
<td><xsl:value-of select="meta/width"/>x<xsl:value-of select="meta/height"/></td>
|
|
|
|
<td align="middle"><xsl:value-of select="meta/framerate"/></td>
|
|
|
|
<td><xsl:value-of select="meta/video"/></td>
|
|
|
|
<td><xsl:value-of select="meta/audio"/></td>
|
|
|
|
<td> <xsl:apply-templates select="publishing"/> </td>
|
2012-05-25 14:34:42 +02:00
|
|
|
<td>
|
|
|
|
<xsl:call-template name="showtime">
|
|
|
|
<xsl:with-param name="time" select="time"/>
|
|
|
|
</xsl:call-template>
|
|
|
|
</td>
|
2012-05-10 14:35:29 +02:00
|
|
|
</tr>
|
2012-05-10 15:11:09 +02:00
|
|
|
<tr style="display:none">
|
|
|
|
<xsl:attribute name="id">
|
2012-05-16 16:04:35 +02:00
|
|
|
<xsl:value-of select="../../name"/>-<xsl:value-of select="name"/>
|
2012-05-10 15:11:09 +02:00
|
|
|
</xsl:attribute>
|
2012-05-10 14:35:29 +02:00
|
|
|
<td colspan="7" ngcolor="#eeeeee">
|
2012-05-10 15:11:09 +02:00
|
|
|
<table cellspacing="1" cellpadding="5">
|
2012-05-10 14:35:29 +02:00
|
|
|
<tr>
|
|
|
|
<th>State</th>
|
|
|
|
<th>Address</th>
|
|
|
|
<th>Flash version</th>
|
|
|
|
<th>Page URL</th>
|
|
|
|
<th>Dropped</th>
|
2012-05-25 14:34:42 +02:00
|
|
|
<th>Time</th>
|
2012-05-10 14:35:29 +02:00
|
|
|
</tr>
|
|
|
|
<xsl:apply-templates select="client"/>
|
|
|
|
</table>
|
|
|
|
</td>
|
|
|
|
</tr>
|
2012-05-07 13:41:03 +02:00
|
|
|
</xsl:template>
|
|
|
|
|
2012-05-25 14:34:42 +02:00
|
|
|
<xsl:template name="showtime">
|
|
|
|
<xsl:param name="time"/>
|
|
|
|
|
|
|
|
<xsl:variable name="sec">
|
|
|
|
<xsl:value-of select="floor(time div 1000)"/>
|
|
|
|
</xsl:variable>
|
|
|
|
|
|
|
|
<xsl:if test="$sec >= 86400">
|
|
|
|
<xsl:value-of select="(floor($sec div 86400)) mod 60"/>d
|
|
|
|
</xsl:if>
|
|
|
|
|
|
|
|
<xsl:if test="$sec >= 3600">
|
|
|
|
<xsl:value-of select="(floor($sec div 3600)) mod 60"/>h
|
|
|
|
</xsl:if>
|
|
|
|
|
|
|
|
<xsl:if test="$sec >= 60">
|
|
|
|
<xsl:value-of select="(floor($sec div 60)) mod 60"/>m
|
|
|
|
</xsl:if>
|
|
|
|
|
|
|
|
<xsl:value-of select="$sec mod 60"/>s
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
|
2012-05-07 13:41:03 +02:00
|
|
|
<xsl:template match="client">
|
2012-05-10 14:35:29 +02:00
|
|
|
<tr bgcolor="#eeeeee">
|
2012-05-25 14:34:42 +02:00
|
|
|
<td><xsl:apply-templates select="publishing"/></td>
|
|
|
|
<td><xsl:value-of select="address"/></td>
|
|
|
|
<td><xsl:value-of select="flashver"/></td>
|
2012-05-10 14:35:29 +02:00
|
|
|
<td>
|
2012-05-12 13:33:23 +02:00
|
|
|
<a target="_blank">
|
|
|
|
<xsl:attribute name="href">
|
|
|
|
<xsl:value-of select="pageurl"/>
|
|
|
|
</xsl:attribute>
|
|
|
|
<xsl:value-of select="pageurl"/>
|
|
|
|
</a>
|
2012-05-10 14:35:29 +02:00
|
|
|
</td>
|
2012-05-25 14:34:42 +02:00
|
|
|
<td><xsl:value-of select="dropped"/></td>
|
2012-05-10 14:35:29 +02:00
|
|
|
<td>
|
2012-05-25 14:34:42 +02:00
|
|
|
<xsl:call-template name="showtime">
|
|
|
|
<xsl:with-param name="time" select="time"/>
|
|
|
|
</xsl:call-template>
|
2012-05-10 14:35:29 +02:00
|
|
|
</td>
|
|
|
|
</tr>
|
2012-05-07 13:41:03 +02:00
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template match="publishing">
|
2012-05-10 14:35:29 +02:00
|
|
|
publishing
|
2012-05-07 13:41:03 +02:00
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
</xsl:stylesheet>
|