nginx-rtmp中next_publish与ngx_rtmp_publish
来源:互联网 发布:淘宝闹鬼的古着店 编辑:程序博客网 时间:2024/05/22 11:31
在每个rtmp_module的postconfiguration中, 都会有
next_publish = ngx_rtmp_publish;
ngx_rtmp_publish = ngx_rtmp_access_publish;
注意到ngx_rtmp_publish是一个全部变量; next_publish是每个rtmp-module都有的一个static变量, 也就是说每个rtmp-module的next_publish保存了下一个module的publish函数。
这实际上就相当于ngx_rtmp_publish是一系列函数组成的链表, 而每执行一个postconfiguration,相当于在链表头插入了一个新的函数。
[root@nginx-1.8.1]# grep "&ngx_rtmp" ./objs/ngx_modules.c
&ngx_rtmp_module,
&ngx_rtmp_core_module,
&ngx_rtmp_cmd_module,
&ngx_rtmp_codec_module,
&ngx_rtmp_access_module,
&ngx_rtmp_record_module,
&ngx_rtmp_live_module,
&ngx_rtmp_play_module,
&ngx_rtmp_flv_module,
&ngx_rtmp_mp4_module,
&ngx_rtmp_netcall_module,
&ngx_rtmp_relay_module,
&ngx_rtmp_exec_module,
&ngx_rtmp_auto_push_module,
&ngx_rtmp_notify_module,
&ngx_rtmp_log_module,
&ngx_rtmp_limit_module,
&ngx_rtmp_hls_module,
&ngx_rtmp_dash_module,
&ngx_rtmp_stat_module,
&ngx_rtmp_control_module,
./module_plugin/nginx-rtmp-module-master/ngx_rtmp_notify_module.c:1718: ngx_rtmp_publish = ngx_rtmp_notify_publish;
./module_plugin/nginx-rtmp-module-master/ngx_rtmp_auto_push_module.c:122: ngx_rtmp_publish = ngx_rtmp_auto_push_publish;
./module_plugin/nginx-rtmp-module-master/ngx_rtmp_log_module.c:1010: ngx_rtmp_publish = ngx_rtmp_log_publish;
./module_plugin/nginx-rtmp-module-master/ngx_rtmp_record_module.c:1289: ngx_rtmp_publish = ngx_rtmp_record_publish;
./module_plugin/nginx-rtmp-module-master/ngx_rtmp_relay_module.c:1665: ngx_rtmp_publish = ngx_rtmp_relay_publish;
./module_plugin/nginx-rtmp-module-master/dash/ngx_rtmp_dash_module.c:1516: ngx_rtmp_publish = ngx_rtmp_dash_publish;
./module_plugin/nginx-rtmp-module-master/ngx_rtmp_access_module.c:465: ngx_rtmp_publish = ngx_rtmp_access_publish;
./module_plugin/nginx-rtmp-module-master/hls/ngx_rtmp_hls_module.c:2438: ngx_rtmp_publish = ngx_rtmp_hls_publish;
./module_plugin/nginx-rtmp-module-master/ngx_rtmp_live_module.c:1136: ngx_rtmp_publish = ngx_rtmp_live_publish;
./module_plugin/nginx-rtmp-module-master/ngx_rtmp_exec_module.c:1590: ngx_rtmp_publish = ngx_rtmp_exec_publish;
./module_plugin/nginx-rtmp-module-master/ngx_rtmp_cmd_module.c:921: ngx_rtmp_publish = ngx_rtmp_cmd_publish;
因此其执行ngx_rtmp_publish的过程应该是
ngx_rtmp_dash_publish-> ngx_rtmp_hls_publish --> ngx_rtmp_log_publish -->ngx_rtmp_notify_publish -->ngx_rtmp_exec_publish
-->ngx_rtmp_relay_publish --> ngx_rtmp_record_publish -->ngx_rtmp_cmd_publish
- nginx-rtmp中next_publish与ngx_rtmp_publish
- 使用nginx与nginx-rtmp-module搭建 rtmp 流媒体服务器
- nginx安装以及Nginx中集成nginx-rtmp-module
- srs之与nginx-rtmp性能对比
- srs之与nginx-rtmp性能对比
- srs之与nginx-rtmp性能对比
- srs之与nginx-rtmp性能对比
- nginx中rtmp协议的配置
- nginx-rtmp
- nginx rtmp
- nginx+rtmp
- 使用nginx与nginx-rtmp-module搭建流媒体服务器
- 使用nginx与nginx-rtmp-module搭建流媒体服务器
- 使用nginx与nginx-rtmp-module搭建流媒体服务器
- 使用nginx与nginx-rtmp-module搭建流媒体服务器
- 使用nginx与nginx-rtmp-module搭建流媒体服务器
- 使用nginx与nginx-rtmp-module搭建流媒体服务器
- 使用nginx与nginx-rtmp-module搭建流媒体服务器
- Android Studio使用汇总
- POJ 2259 Team Queue【模拟队列】
- C# 泛型学习总结(一)
- react学习笔记 item2 --- JSX
- HTML多出文本,用省略号解决的办法
- nginx-rtmp中next_publish与ngx_rtmp_publish
- EMS SQL Manager下载及中文配置
- NIO学习资料
- 使用Picasso下载图片时的错误
- 【NOIp模拟】【dp】俄罗斯方块
- Android 读取assets文件中的文件
- Java - 趣味题(2) --- 约瑟夫环
- 经典SQL练习题
- 微信号开通检测软件选择需谨慎