Skip to content

Commit

Permalink
rename config keys to server_name, encoder_name and pass_args
Browse files Browse the repository at this point in the history
  • Loading branch information
Executor-Cheng committed Dec 16, 2024
1 parent cf2dc35 commit efea759
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
22 changes: 11 additions & 11 deletions ngx_rtmp_codec_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ static void ngx_rtmp_codec_dump_header(ngx_rtmp_session_t *s, const char *type,

typedef struct {
ngx_uint_t meta;
ngx_str_t serverName;
ngx_str_t encoderName;
ngx_str_t server_name;
ngx_str_t encoder_name;
} ngx_rtmp_codec_app_conf_t;


Expand All @@ -62,18 +62,18 @@ static ngx_command_t ngx_rtmp_codec_commands[] = {
offsetof(ngx_rtmp_codec_app_conf_t, meta),
&ngx_rtmp_codec_meta_slots },

{ ngx_string("serverName"),
{ ngx_string("server_name"),
NGX_RTMP_MAIN_CONF | NGX_RTMP_SRV_CONF | NGX_RTMP_APP_CONF | NGX_CONF_TAKE1,
ngx_conf_set_str_slot,
NGX_RTMP_APP_CONF_OFFSET,
offsetof(ngx_rtmp_codec_app_conf_t, serverName),
offsetof(ngx_rtmp_codec_app_conf_t, server_name),
NULL },

{ ngx_string("encoderName"),
{ ngx_string("encoder_name"),
NGX_RTMP_MAIN_CONF | NGX_RTMP_SRV_CONF | NGX_RTMP_APP_CONF | NGX_CONF_TAKE1,
ngx_conf_set_str_slot,
NGX_RTMP_APP_CONF_OFFSET,
offsetof(ngx_rtmp_codec_app_conf_t, encoderName),
offsetof(ngx_rtmp_codec_app_conf_t, encoder_name),
NULL },

ngx_null_command
Expand Down Expand Up @@ -727,11 +727,11 @@ ngx_rtmp_codec_reconstruct_meta(ngx_rtmp_session_t *s)
ctx->meta = NULL;
}

if (cacf->serverName.len) {
out_inf[0].data = cacf->serverName.data;
if (cacf->server_name.len) {
out_inf[0].data = cacf->server_name.data;
}
if (cacf->encoderName.len) {
out_inf[14].data = cacf->encoderName.data;
if (cacf->encoder_name.len) {
out_inf[14].data = cacf->encoder_name.data;
out_elts[1].len++;
}

Expand Down Expand Up @@ -1007,7 +1007,7 @@ ngx_rtmp_codec_merge_app_conf(ngx_conf_t *cf, void *parent, void *child)
ngx_rtmp_codec_app_conf_t *conf = child;

ngx_conf_merge_uint_value(conf->meta, prev->meta, NGX_RTMP_CODEC_META_ON);
ngx_conf_merge_str_value(conf->serverName, prev->serverName, NGX_RTMP_CODEC_META_SERVER_NAME);
ngx_conf_merge_str_value(conf->server_name, prev->server_name, NGX_RTMP_CODEC_META_SERVER_NAME);

return NGX_CONF_OK;
}
Expand Down
2 changes: 1 addition & 1 deletion ngx_rtmp_relay_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -1794,7 +1794,7 @@ ngx_rtmp_relay_push_pull(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
NGX_RTMP_RELAY_NUM_PAR("live", live);
NGX_RTMP_RELAY_NUM_PAR("start", start);
NGX_RTMP_RELAY_NUM_PAR("stop", stop);
NGX_RTMP_RELAY_NUM_PAR("passArgs", pass_args);
NGX_RTMP_RELAY_NUM_PAR("pass_args", pass_args);


#undef NGX_RTMP_RELAY_STR_PAR
Expand Down

0 comments on commit efea759

Please sign in to comment.