diff --git a/ngx_rtmp_access_module.c b/ngx_rtmp_access_module.c index 06d3bc2..4755c54 100644 --- a/ngx_rtmp_access_module.c +++ b/ngx_rtmp_access_module.c @@ -449,10 +449,17 @@ next: static ngx_int_t ngx_rtmp_access_play(ngx_rtmp_session_t *s, ngx_rtmp_play_t *v) { + ngx_log_error(NGX_LOG_DEBUG, s->connection->log, 0, + "access: ngx_rtmp_access_play"); + if (ngx_rtmp_access(s, NGX_RTMP_ACCESS_PLAY) != NGX_OK) { + ngx_log_error(NGX_LOG_DEBUG, s->connection->log, 0, + "access: ngx_rtmp_access_play: error"); return NGX_ERROR; } + ngx_log_error(NGX_LOG_DEBUG, s->connection->log, 0, + "access: ngx_rtmp_access_play: next"); return next_play(s, v); } diff --git a/ngx_rtmp_cmd_module.c b/ngx_rtmp_cmd_module.c index 13f6677..188a76b 100644 --- a/ngx_rtmp_cmd_module.c +++ b/ngx_rtmp_cmd_module.c @@ -574,6 +574,8 @@ ngx_rtmp_cmd_play_init(ngx_rtmp_session_t *s, ngx_rtmp_header_t *h, static ngx_int_t ngx_rtmp_cmd_play(ngx_rtmp_session_t *s, ngx_rtmp_play_t *v) { + ngx_log_error(NGX_LOG_DEBUG, s->connection->log, 0, + "cmd: ngx_rtmp_cmd_play"); return NGX_OK; } diff --git a/ngx_rtmp_exec_module.c b/ngx_rtmp_exec_module.c index fccd4ba..6f298a7 100644 --- a/ngx_rtmp_exec_module.c +++ b/ngx_rtmp_exec_module.c @@ -1194,6 +1194,9 @@ next: static ngx_int_t ngx_rtmp_exec_play(ngx_rtmp_session_t *s, ngx_rtmp_play_t *v) { + ngx_log_error(NGX_LOG_DEBUG, s->connection->log, 0, + "exec: ngx_rtmp_exec_play"); + ngx_rtmp_exec_ctx_t *ctx; ngx_rtmp_exec_pull_ctx_t *pctx; ngx_rtmp_exec_app_conf_t *eacf; @@ -1224,6 +1227,8 @@ ngx_rtmp_exec_play(ngx_rtmp_session_t *s, ngx_rtmp_play_t *v) } next: + ngx_log_error(NGX_LOG_DEBUG, s->connection->log, 0, + "exec: ngx_rtmp_exec_play: next"); return next_play(s, v); } diff --git a/ngx_rtmp_live_module.c b/ngx_rtmp_live_module.c index 049139b..8733e91 100644 --- a/ngx_rtmp_live_module.c +++ b/ngx_rtmp_live_module.c @@ -1056,9 +1056,11 @@ ngx_rtmp_live_data(ngx_rtmp_session_t *s, ngx_rtmp_header_t *h, uint32_t delta; ngx_rtmp_live_chunk_stream_t *cs; +#ifdef NGX_DEBUG u_char *msg_type; msg_type = (u_char *)out_elts[0].data; +#endif lacf = ngx_rtmp_get_module_app_conf(s, ngx_rtmp_live_module); if (lacf == NULL) { @@ -1099,6 +1101,8 @@ ngx_rtmp_live_data(ngx_rtmp_session_t *s, ngx_rtmp_header_t *h, data = NULL; rc = ngx_rtmp_append_amf(s, &data, NULL, out_elts, out_elts_size); if (rc != NGX_OK) { + ngx_log_error(NGX_LOG_DEBUG, s->connection->log, 0, + "live: data - can't append amf!"); if (data) { ngx_rtmp_free_shared_chain(cscf, data); } @@ -1148,7 +1152,7 @@ ngx_rtmp_live_data(ngx_rtmp_session_t *s, ngx_rtmp_header_t *h, return NGX_OK; } - +/* static ngx_int_t ngx_rtmp_live_on_cue_point(ngx_rtmp_session_t *s, ngx_rtmp_header_t *h, ngx_chain_t *in) @@ -1178,7 +1182,7 @@ ngx_rtmp_live_on_text_data(ngx_rtmp_session_t *s, ngx_rtmp_header_t *h, return ngx_rtmp_live_data(s, h, in, out_elts, sizeof(out_elts) / sizeof(out_elts[0])); } - +*/ static ngx_int_t ngx_rtmp_live_on_fi(ngx_rtmp_session_t *s, ngx_rtmp_header_t *h, ngx_chain_t *in) @@ -1426,6 +1430,9 @@ next: static ngx_int_t ngx_rtmp_live_play(ngx_rtmp_session_t *s, ngx_rtmp_play_t *v) { + ngx_log_error(NGX_LOG_DEBUG, s->connection->log, 0, + "live: ngx_rtmp_live_play"); + ngx_rtmp_live_app_conf_t *lacf; ngx_rtmp_live_ctx_t *ctx; @@ -1458,6 +1465,8 @@ ngx_rtmp_live_play(ngx_rtmp_session_t *s, ngx_rtmp_play_t *v) } next: + ngx_log_error(NGX_LOG_DEBUG, s->connection->log, 0, + "live: ngx_rtmp_live_play: next"); return next_play(s, v); } diff --git a/ngx_rtmp_log_module.c b/ngx_rtmp_log_module.c index 81016d0..7759d67 100644 --- a/ngx_rtmp_log_module.c +++ b/ngx_rtmp_log_module.c @@ -853,6 +853,9 @@ next: static ngx_int_t ngx_rtmp_log_play(ngx_rtmp_session_t *s, ngx_rtmp_play_t *v) { + ngx_log_error(NGX_LOG_DEBUG, s->connection->log, 0, + "log: ngx_rtmp_log_play"); + ngx_rtmp_log_ctx_t *ctx; if (s->auto_pushed || s->relay) { @@ -867,6 +870,8 @@ ngx_rtmp_log_play(ngx_rtmp_session_t *s, ngx_rtmp_play_t *v) ctx->play = 1; next: + ngx_log_error(NGX_LOG_DEBUG, s->connection->log, 0, + "log: ngx_rtmp_log_play: next"); return next_play(s, v); } diff --git a/ngx_rtmp_notify_module.c b/ngx_rtmp_notify_module.c index e923e56..76c882a 100644 --- a/ngx_rtmp_notify_module.c +++ b/ngx_rtmp_notify_module.c @@ -1300,6 +1300,9 @@ static ngx_int_t ngx_rtmp_notify_play_handle(ngx_rtmp_session_t *s, void *arg, ngx_chain_t *in) { + ngx_log_debug(NGX_LOG_DEBUG, s->connection->log, 0, + "notify: ngx_rtmp_notify_play_handle"); + ngx_rtmp_play_t *v = arg; ngx_int_t rc, send; ngx_str_t local_name; @@ -1393,6 +1396,8 @@ ngx_rtmp_notify_play_handle(ngx_rtmp_session_t *s, ngx_rtmp_relay_pull(s, &local_name, &target); next: + ngx_log_debug(NGX_LOG_DEBUG, s->connection->log, 0, + "notify: ngx_rtmp_notify_play_handle: next"); return next_play(s, v); } @@ -1636,6 +1641,9 @@ next: static ngx_int_t ngx_rtmp_notify_play(ngx_rtmp_session_t *s, ngx_rtmp_play_t *v) { + ngx_log_error(NGX_LOG_DEBUG, s->connection->log, 0, + "notify: ngx_rtmp_notify_play"); + ngx_rtmp_notify_app_conf_t *nacf; ngx_rtmp_netcall_init_t ci; ngx_url_t *url; @@ -1671,6 +1679,9 @@ ngx_rtmp_notify_play(ngx_rtmp_session_t *s, ngx_rtmp_play_t *v) return ngx_rtmp_netcall_create(s, &ci); next: + ngx_log_error(NGX_LOG_DEBUG, s->connection->log, 0, + "notify: ngx_rtmp_notify_play: next"); + return next_play(s, v); } diff --git a/ngx_rtmp_play_module.c b/ngx_rtmp_play_module.c index 6cba2d8..c8a573e 100644 --- a/ngx_rtmp_play_module.c +++ b/ngx_rtmp_play_module.c @@ -716,6 +716,9 @@ ngx_rtmp_play_parse_index(char type, u_char *args) static ngx_int_t ngx_rtmp_play_play(ngx_rtmp_session_t *s, ngx_rtmp_play_t *v) { + ngx_log_error(NGX_LOG_DEBUG, s->connection->log, 0, + "play: ngx_rtmp_play_play"); + ngx_rtmp_play_main_conf_t *pmcf; ngx_rtmp_play_app_conf_t *pacf; ngx_rtmp_play_ctx_t *ctx; @@ -827,9 +830,15 @@ ngx_rtmp_play_play(ngx_rtmp_session_t *s, ngx_rtmp_play_t *v) ngx_log_debug1(NGX_LOG_DEBUG_RTMP, s->connection->log, 0, "play: fmt=%V", &ctx->fmt->name); + ngx_log_error(NGX_LOG_DEBUG, s->connection->log, 0, + "play: ngx_rtmp_play_play: next_entry"); + return ngx_rtmp_play_next_entry(s, v); next: + ngx_log_error(NGX_LOG_DEBUG, s->connection->log, 0, + "play: ngx_rtmp_play_play: next"); + return next_play(s, v); } @@ -837,6 +846,9 @@ next: static ngx_int_t ngx_rtmp_play_next_entry(ngx_rtmp_session_t *s, ngx_rtmp_play_t *v) { + ngx_log_error(NGX_LOG_DEBUG, s->connection->log, 0, + "play: ngx_rtmp_play_next_entry"); + ngx_rtmp_play_app_conf_t *pacf; ngx_rtmp_play_ctx_t *ctx; ngx_rtmp_play_entry_t *pe; @@ -881,6 +893,9 @@ ngx_rtmp_play_next_entry(ngx_rtmp_session_t *s, ngx_rtmp_play_t *v) /* open remote */ if (pe->url) { + ngx_log_error(NGX_LOG_DEBUG, s->connection->log, 0, + "play: ngx_rtmp_play_next_entry: open remote"); + return ngx_rtmp_play_open_remote(s, v); } @@ -917,12 +932,19 @@ ngx_rtmp_play_next_entry(ngx_rtmp_session_t *s, ngx_rtmp_play_t *v) "play: open local file '%s'", path); if (ngx_rtmp_play_open(s, v->start) != NGX_OK) { + + ngx_log_error(NGX_LOG_DEBUG, s->connection->log, 0, + "play: ngx_rtmp_play_next_entry: error open"); + return NGX_ERROR; } break; } + ngx_log_error(NGX_LOG_DEBUG, s->connection->log, 0, + "play: ngx_rtmp_play_next_entry: next"); + return next_play(s, v); } @@ -1048,6 +1070,9 @@ ngx_rtmp_play_remote_create(ngx_rtmp_session_t *s, void *arg, ngx_pool_t *pool) static ngx_int_t ngx_rtmp_play_remote_handle(ngx_rtmp_session_t *s, void *arg, ngx_chain_t *in) { + ngx_log_error(NGX_LOG_DEBUG, s->connection->log, 0, + "play: ngx_rtmp_play_remote_handle"); + ngx_rtmp_play_t *v = arg; ngx_rtmp_play_ctx_t *ctx; @@ -1055,6 +1080,8 @@ ngx_rtmp_play_remote_handle(ngx_rtmp_session_t *s, void *arg, ngx_chain_t *in) ctx = ngx_rtmp_get_module_ctx(s, ngx_rtmp_play_module); if (ctx->nbody == 0) { + ngx_log_error(NGX_LOG_DEBUG, s->connection->log, 0, + "play: ngx_rtmp_play_remote_handle: next_entry"); return ngx_rtmp_play_next_entry(s, v); } @@ -1066,9 +1093,16 @@ ngx_rtmp_play_remote_handle(ngx_rtmp_session_t *s, void *arg, ngx_chain_t *in) "play: open remote file"); if (ngx_rtmp_play_open(s, v->start) != NGX_OK) { + + ngx_log_error(NGX_LOG_DEBUG, s->connection->log, 0, + "play: ngx_rtmp_play_remote_handle: error open"); + return NGX_ERROR; } + ngx_log_error(NGX_LOG_DEBUG, s->connection->log, 0, + "play: ngx_rtmp_play_remote_handle: next"); + return next_play(s, (ngx_rtmp_play_t *)arg); } diff --git a/ngx_rtmp_relay_module.c b/ngx_rtmp_relay_module.c index a461fb9..e38a369 100644 --- a/ngx_rtmp_relay_module.c +++ b/ngx_rtmp_relay_module.c @@ -710,6 +710,9 @@ next: static ngx_int_t ngx_rtmp_relay_play(ngx_rtmp_session_t *s, ngx_rtmp_play_t *v) { + ngx_log_error(NGX_LOG_DEBUG, s->connection->log, 0, + "relay: ngx_rtmp_relay_play"); + ngx_rtmp_relay_app_conf_t *racf; ngx_rtmp_relay_target_t *target, **t; ngx_str_t name; @@ -751,6 +754,9 @@ ngx_rtmp_relay_play(ngx_rtmp_session_t *s, ngx_rtmp_play_t *v) } next: + ngx_log_error(NGX_LOG_DEBUG, s->connection->log, 0, + "relay: ngx_rtmp_relay_play: next"); + return next_play(s, v); }