|
32 | 32 | <tr bgcolor="#999999">
|
33 | 33 | <th>HTTP-FLV</th>
|
34 | 34 | <th>#clients</th>
|
| 35 | + <th colspan="2">Recorders</th> |
35 | 36 | <th colspan="2">Server</th>
|
36 | 37 | <th colspan="4">Video</th>
|
37 | 38 | <th colspan="4">Audio</th>
|
|
44 | 45 | </tr>
|
45 | 46 | <tr>
|
46 | 47 | <td colspan="2">Accepted: <xsl:value-of select="naccepted"/></td>
|
| 48 | + <th bgcolor="#999999">list</th> |
| 49 | + <th bgcolor="#999999">count</th> |
47 | 50 | <th bgcolor="#999999">port</th>
|
48 | 51 | <th bgcolor="#999999">index</th>
|
49 | 52 | <th bgcolor="#999999">codec</th>
|
|
101 | 104 | </tr>
|
102 | 105 | <xsl:apply-templates select="live"/>
|
103 | 106 | <xsl:apply-templates select="play"/>
|
| 107 | + <xsl:apply-templates select="recorders"/> |
104 | 108 | </xsl:template>
|
105 | 109 |
|
106 | 110 | <xsl:template match="live">
|
|
127 | 131 | <xsl:apply-templates select="stream"/>
|
128 | 132 | </xsl:template>
|
129 | 133 |
|
| 134 | +<xsl:template match="recorders"> |
| 135 | + <tr bgcolor="#aaaaaa"> |
| 136 | + <td colspan="2">Recorders</td> |
| 137 | + <td> |
| 138 | + <a href=""> |
| 139 | + <xsl:attribute name="onclick"> |
| 140 | + var d=document.getElementById('<xsl:value-of select="../../port"/>-<xsl:value-of select="../../server_index"/>-<xsl:value-of select="../name"/>-recorders'); |
| 141 | + d.style.display=d.style.display=='none'?'':'none'; |
| 142 | + return false; |
| 143 | + </xsl:attribute> |
| 144 | + <i>config</i> |
| 145 | + </a> |
| 146 | + </td> |
| 147 | + <td align="middle"> |
| 148 | + <xsl:value-of select="count"/> |
| 149 | + </td> |
| 150 | + </tr> |
| 151 | + <tr style="display:none"> |
| 152 | + <xsl:attribute name="id"><xsl:value-of select="../../port"/>-<xsl:value-of select="../../server_index"/>-<xsl:value-of select="../name"/>-recorders</xsl:attribute> |
| 153 | + <td colspan="16"> |
| 154 | + <table cellspacing="1" cellpadding="5"> |
| 155 | + <tr> |
| 156 | + <th>Id</th> |
| 157 | + <th>Path</th> |
| 158 | + <th>Suffix</th> |
| 159 | + <th>Flags</th> |
| 160 | + <th>Max Size</th> |
| 161 | + <th>Max Frames</th> |
| 162 | + <th>Interval</th> |
| 163 | + <th>Unique</th> |
| 164 | + <th>Append</th> |
| 165 | + <th>Lock File</th> |
| 166 | + <th>Notify</th> |
| 167 | + </tr> |
| 168 | + <xsl:apply-templates select="recorder"/> |
| 169 | + </table> |
| 170 | + </td> |
| 171 | + </tr> |
| 172 | +</xsl:template> |
| 173 | + |
| 174 | +<xsl:template match="recorder"> |
| 175 | + <tr bgcolor="#cccccc"> |
| 176 | + <td> |
| 177 | + <xsl:value-of select="id"/> |
| 178 | + <xsl:if test="string-length(id) = 0"> |
| 179 | + [DEFAULT] |
| 180 | + </xsl:if> |
| 181 | + </td> |
| 182 | + <td><xsl:value-of select="path"/></td> |
| 183 | + <td><xsl:value-of select="suffix"/></td> |
| 184 | + <td> |
| 185 | + <xsl:if test="flags/video">video<br/></xsl:if> |
| 186 | + <xsl:if test="flags/audio">audio<br/></xsl:if> |
| 187 | + <xsl:if test="flags/manual">manual</xsl:if> |
| 188 | + </td> |
| 189 | + <td> |
| 190 | + <xsl:call-template name="showsize"> |
| 191 | + <xsl:with-param name="size" select="max_size"/> |
| 192 | + </xsl:call-template> |
| 193 | + </td> |
| 194 | + <td><xsl:value-of select="max_frames"/></td> |
| 195 | + <td> |
| 196 | + <xsl:call-template name="showinterval"> |
| 197 | + <xsl:with-param name="interval" select="interval"/> |
| 198 | + </xsl:call-template> |
| 199 | + </td> |
| 200 | + <td> |
| 201 | + <xsl:call-template name="binarystate"> |
| 202 | + <xsl:with-param name="value" select="unique"/> |
| 203 | + </xsl:call-template> |
| 204 | + </td> |
| 205 | + <td> |
| 206 | + <xsl:call-template name="binarystate"> |
| 207 | + <xsl:with-param name="value" select="append"/> |
| 208 | + </xsl:call-template> |
| 209 | + </td> |
| 210 | + <td> |
| 211 | + <xsl:call-template name="binarystate"> |
| 212 | + <xsl:with-param name="value" select="lock_file"/> |
| 213 | + </xsl:call-template> |
| 214 | + </td> |
| 215 | + <td> |
| 216 | + <xsl:call-template name="binarystate"> |
| 217 | + <xsl:with-param name="value" select="notify"/> |
| 218 | + </xsl:call-template> |
| 219 | + </td> |
| 220 | + </tr> |
| 221 | +</xsl:template> |
| 222 | + |
| 223 | +<xsl:template name="binarystate"> |
| 224 | + <xsl:param name="value"/> |
| 225 | + <xsl:choose> |
| 226 | + <xsl:when test="$value">on</xsl:when> |
| 227 | + <xsl:otherwise>off</xsl:otherwise> |
| 228 | + </xsl:choose> |
| 229 | +</xsl:template> |
| 230 | + |
130 | 231 | <xsl:template match="stream">
|
131 | 232 | <tr valign="top">
|
132 | 233 | <xsl:attribute name="bgcolor">
|
|
149 | 250 | </a>
|
150 | 251 | </td>
|
151 | 252 | <td align="middle"> <xsl:value-of select="nclients"/> </td>
|
| 253 | + <td align="middle"> - </td> |
| 254 | + <td align="middle"> - </td> |
152 | 255 | <td align="middle"> <xsl:value-of select="../../../port"/> </td>
|
153 | 256 | <td align="middle"> <xsl:value-of select="../../../server_index"/> </td>
|
154 | 257 | <td>
|
|
234 | 337 | </tr>
|
235 | 338 | <xsl:apply-templates select="client"/>
|
236 | 339 | </table>
|
| 340 | + <xsl:apply-templates select="records"/> |
237 | 341 | </td>
|
238 | 342 | </tr>
|
239 | 343 | </xsl:template>
|
240 | 344 |
|
| 345 | +<xsl:template match="records"> |
| 346 | + <table cellspacing="1" cellpadding="5"> |
| 347 | + <tr> |
| 348 | + <th>Recorder</th> |
| 349 | + <th>State</th> |
| 350 | + <th>Epoch</th> |
| 351 | + <th>Time Shift</th> |
| 352 | + <th>File Name</th> |
| 353 | + <th>Time</th> |
| 354 | + <th>Size</th> |
| 355 | + <th>Frames</th> |
| 356 | + </tr> |
| 357 | + <xsl:apply-templates select="record"/> |
| 358 | + </table> |
| 359 | +</xsl:template> |
| 360 | + |
| 361 | +<xsl:template match="record"> |
| 362 | + <tr> |
| 363 | + <xsl:attribute name="bgcolor"> |
| 364 | + <xsl:choose> |
| 365 | + <xsl:when test="recording">#cccccc</xsl:when> |
| 366 | + <xsl:otherwise>#eeeeee</xsl:otherwise> |
| 367 | + </xsl:choose> |
| 368 | + </xsl:attribute> |
| 369 | + <td> |
| 370 | + <xsl:value-of select="recorder"/> |
| 371 | + <xsl:if test="string-length(recorder) = 0"> |
| 372 | + [DEFAULT] |
| 373 | + </xsl:if> |
| 374 | + </td> |
| 375 | + <td> |
| 376 | + <xsl:choose> |
| 377 | + <xsl:when test="recording">recording</xsl:when> |
| 378 | + <xsl:otherwise>idle</xsl:otherwise> |
| 379 | + </xsl:choose> |
| 380 | + </td> |
| 381 | + <td><xsl:value-of select="epoch"/></td> |
| 382 | + <td><xsl:value-of select="time_shift"/></td> |
| 383 | + <td><xsl:value-of select="file"/></td> |
| 384 | + <td> |
| 385 | + <xsl:call-template name="showtime"> |
| 386 | + <xsl:with-param name="time" select="time * 1000"/> |
| 387 | + </xsl:call-template> |
| 388 | + </td> |
| 389 | + <td> |
| 390 | + <xsl:call-template name="showsize"> |
| 391 | + <xsl:with-param name="size" select="size"/> |
| 392 | + </xsl:call-template> |
| 393 | + </td> |
| 394 | + <td><xsl:value-of select="nframes"/></td> |
| 395 | + </tr> |
| 396 | +</xsl:template> |
| 397 | + |
241 | 398 | <xsl:template name="showtime">
|
242 | 399 | <xsl:param name="time"/>
|
243 | 400 |
|
|
290 | 447 | </xsl:if>
|
291 | 448 | </xsl:template>
|
292 | 449 |
|
| 450 | +<xsl:template name="showinterval"> |
| 451 | + <xsl:param name="interval"/> |
| 452 | + |
| 453 | + <xsl:if test="$interval > 0"> |
| 454 | + <xsl:variable name="sec"> |
| 455 | + <xsl:value-of select="floor($interval div 1000)"/> |
| 456 | + </xsl:variable> |
| 457 | + |
| 458 | + <xsl:if test="$sec >= 86400"> |
| 459 | + <xsl:value-of select="floor($sec div 86400)"/>d |
| 460 | + </xsl:if> |
| 461 | + |
| 462 | + <xsl:if test="$sec >= 3600"> |
| 463 | + <xsl:value-of select="(floor($sec div 3600)) mod 24"/>h |
| 464 | + </xsl:if> |
| 465 | + |
| 466 | + <xsl:if test="$sec >= 60"> |
| 467 | + <xsl:value-of select="(floor($sec div 60)) mod 60"/>m |
| 468 | + </xsl:if> |
| 469 | + |
| 470 | + <xsl:if test="$sec < 60"> |
| 471 | + <xsl:value-of select="$sec mod 60"/>s |
| 472 | + </xsl:if> |
| 473 | + </xsl:if> |
| 474 | + |
| 475 | + <xsl:if test="$interval = -1">Unset</xsl:if> |
| 476 | +</xsl:template> |
| 477 | + |
293 | 478 | <xsl:template name="streamstate">
|
294 | 479 | <xsl:choose>
|
295 | 480 | <xsl:when test="active">active</xsl:when>
|
|
0 commit comments