From 0478c4445f26f55d33e360a91a7ab4cd57f44f3b Mon Sep 17 00:00:00 2001 From: Roman Arutyunyan Date: Thu, 5 Jul 2012 03:04:53 +0400 Subject: [PATCH] reverted changes in live module --- ngx_rtmp_live_module.c | 36 +----------------------------------- ngx_rtmp_live_module.h | 1 - 2 files changed, 1 insertion(+), 36 deletions(-) diff --git a/ngx_rtmp_live_module.c b/ngx_rtmp_live_module.c index 3beff86..0d4c880 100644 --- a/ngx_rtmp_live_module.c +++ b/ngx_rtmp_live_module.c @@ -11,7 +11,6 @@ static ngx_rtmp_publish_pt next_publish; static ngx_rtmp_play_pt next_play; static ngx_rtmp_delete_stream_pt next_delete_stream; -static ngx_rtmp_pause_pt next_pause; static ngx_int_t ngx_rtmp_live_postconfiguration(ngx_conf_t *cf); @@ -276,36 +275,6 @@ next: } -static ngx_int_t -ngx_rtmp_live_pause(ngx_rtmp_session_t *s, ngx_rtmp_pause_t *v) -{ - ngx_rtmp_live_ctx_t *ctx; - ngx_rtmp_live_app_conf_t *lacf; - - lacf = ngx_rtmp_get_module_app_conf(s, ngx_rtmp_live_module); - if (lacf == NULL) { - goto next; - } - - ctx = ngx_rtmp_get_module_ctx(s, ngx_rtmp_live_module); - if (ctx == NULL) { - goto next; - } - - if (v->pause) { - ctx->flags |= NGX_RTMP_LIVE_PAUSED; - } else { - ctx->flags &= ~NGX_RTMP_LIVE_PAUSED; - } - - ngx_log_debug1(NGX_LOG_DEBUG_RTMP, s->connection->log, 0, - "live: %spaused", v->pause ? "" : "un"); - -next: - return next_pause(s, v); -} - - static ngx_int_t ngx_rtmp_live_av(ngx_rtmp_session_t *s, ngx_rtmp_header_t *h, ngx_chain_t *in) @@ -404,7 +373,7 @@ ngx_rtmp_live_av(ngx_rtmp_session_t *s, ngx_rtmp_header_t *h, /* broadcast to all subscribers */ for (pctx = ctx->stream->ctx; pctx; pctx = pctx->next) { - if (pctx == ctx || (pctx->flags & NGX_RTMP_LIVE_PAUSED)) { + if (pctx == ctx) { continue; } ++peers; @@ -533,8 +502,5 @@ ngx_rtmp_live_postconfiguration(ngx_conf_t *cf) next_delete_stream = ngx_rtmp_delete_stream; ngx_rtmp_delete_stream = ngx_rtmp_live_delete_stream; - next_pause = ngx_rtmp_pause; - ngx_rtmp_pause = ngx_rtmp_live_pause; - return NGX_OK; } diff --git a/ngx_rtmp_live_module.h b/ngx_rtmp_live_module.h index c324a54..73b64ef 100644 --- a/ngx_rtmp_live_module.h +++ b/ngx_rtmp_live_module.h @@ -14,7 +14,6 @@ /* session flags */ #define NGX_RTMP_LIVE_PUBLISHING 0x01 -#define NGX_RTMP_LIVE_PAUSED 0x02 /* Chunk stream ids for output */