Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added meta directive for turning off sending metadata

  • Loading branch information...
commit 9788b1a5309d40809df6832e81593392f3b381a2 1 parent f2eadab
@arut arut authored
Showing with 11 additions and 1 deletion.
  1. +10 −1 ngx_rtmp_live_module.c
  2. +1 −0  ngx_rtmp_live_module.h
View
11 ngx_rtmp_live_module.c
@@ -32,6 +32,13 @@ static ngx_command_t ngx_rtmp_live_commands[] = {
offsetof(ngx_rtmp_live_app_conf_t, live),
NULL },
+ { ngx_string("meta"),
+ NGX_RTMP_MAIN_CONF|NGX_RTMP_SRV_CONF|NGX_RTMP_APP_CONF|NGX_CONF_TAKE1,
+ ngx_conf_set_flag_slot,
+ NGX_RTMP_APP_CONF_OFFSET,
+ offsetof(ngx_rtmp_live_app_conf_t, meta),
+ NULL },
+
{ ngx_string("stream_buckets"),
NGX_RTMP_MAIN_CONF|NGX_RTMP_SRV_CONF|NGX_RTMP_APP_CONF|NGX_CONF_TAKE1,
ngx_conf_set_str_slot,
@@ -89,6 +96,7 @@ ngx_rtmp_live_create_app_conf(ngx_conf_t *cf)
}
lacf->live = NGX_CONF_UNSET;
+ lacf->meta = NGX_CONF_UNSET;
lacf->nbuckets = NGX_CONF_UNSET;
lacf->buflen = NGX_CONF_UNSET;
@@ -103,6 +111,7 @@ ngx_rtmp_live_merge_app_conf(ngx_conf_t *cf, void *parent, void *child)
ngx_rtmp_live_app_conf_t *conf = child;
ngx_conf_merge_value(conf->live, prev->live, 0);
+ ngx_conf_merge_value(conf->meta, prev->meta, 1);
ngx_conf_merge_value(conf->nbuckets, prev->nbuckets, 1024);
ngx_conf_merge_msec_value(conf->buflen, prev->buflen, 0);
@@ -372,7 +381,7 @@ ngx_rtmp_live_av(ngx_rtmp_session_t *s, ngx_rtmp_header_t *h,
header_version = codec_ctx->avc_version;
}
}
- if (codec_ctx->meta) {
+ if (lacf->meta && codec_ctx->meta) {
meta = codec_ctx->meta;
meta_version = codec_ctx->meta_version;
}
View
1  ngx_rtmp_live_module.h
@@ -58,6 +58,7 @@ typedef struct {
ngx_int_t nbuckets;
ngx_rtmp_live_stream_t **streams;
ngx_flag_t live;
+ ngx_flag_t meta;
ngx_msec_t buflen;
ngx_pool_t *pool;
ngx_rtmp_live_stream_t *free_streams;
Please sign in to comment.
Something went wrong with that request. Please try again.