diff --git a/ngx_rtmp_stat_module.c b/ngx_rtmp_stat_module.c
index 5029fbd..db23bfc 100644
--- a/ngx_rtmp_stat_module.c
+++ b/ngx_rtmp_stat_module.c
@@ -13,6 +13,7 @@
#include "ngx_rtmp_live_module.h"
#include "ngx_rtmp_play_module.h"
#include "ngx_rtmp_codec_module.h"
+#include "ngx_rtmp_record_module.h"
static ngx_int_t ngx_rtmp_stat_init_process(ngx_cycle_t *cycle);
@@ -433,14 +434,19 @@ ngx_rtmp_stat_live(ngx_http_request_t *r, ngx_chain_t ***lll,
ngx_rtmp_live_stream_t *stream;
ngx_rtmp_codec_ctx_t *codec;
ngx_rtmp_live_ctx_t *ctx;
+ ngx_rtmp_record_ctx_t *rctx;
+ ngx_rtmp_record_rec_ctx_t *recctx;
ngx_rtmp_session_t *s;
- ngx_int_t n;
+ ngx_int_t n, rn;
ngx_uint_t nclients, total_nclients;
u_char buf[NGX_INT_T_LEN];
u_char bbuf[NGX_INT32_LEN];
ngx_rtmp_stat_loc_conf_t *slcf;
u_char *cname;
+ // Is any of stream clients (publisher) recording now
+ u_char is_recording = 0;
+
if (!lacf->live) {
return;
}
@@ -454,6 +460,8 @@ ngx_rtmp_stat_live(ngx_http_request_t *r, ngx_chain_t ***lll,
for (stream = lacf->streams[n]; stream; stream = stream->next) {
NGX_RTMP_STAT_L("