|
7 | 7 | #include <ngx_config.h>
|
8 | 8 | #include <ngx_core.h>
|
9 | 9 | #include "ngx_rtmp_cmd_module.h"
|
10 |
| -#include "ngx_rtmp_record_module.h" |
11 | 10 | #include "ngx_rtmp_eval.h"
|
12 | 11 | #include "ngx_poold.h"
|
13 | 12 | #include <stdlib.h>
|
|
21 | 20 | static ngx_rtmp_publish_pt next_publish;
|
22 | 21 | static ngx_rtmp_play_pt next_play;
|
23 | 22 | static ngx_rtmp_close_stream_pt next_close_stream;
|
24 |
| -static ngx_rtmp_record_done_pt next_record_done; |
25 | 23 | #endif
|
26 | 24 |
|
27 | 25 |
|
@@ -1301,65 +1299,6 @@ ngx_rtmp_exec_close_stream(ngx_rtmp_session_t *s, ngx_rtmp_close_stream_t *v)
|
1301 | 1299 | next:
|
1302 | 1300 | return next_close_stream(s, v);
|
1303 | 1301 | }
|
1304 |
| - |
1305 |
| - |
1306 |
| -static ngx_int_t |
1307 |
| -ngx_rtmp_exec_record_done(ngx_rtmp_session_t *s, ngx_rtmp_record_done_t *v) |
1308 |
| -{ |
1309 |
| - u_char c; |
1310 |
| - ngx_uint_t ext, dir; |
1311 |
| - ngx_rtmp_exec_ctx_t *ctx; |
1312 |
| - ngx_rtmp_exec_app_conf_t *eacf; |
1313 |
| - |
1314 |
| - if (s->interprocess) { |
1315 |
| - goto next; |
1316 |
| - } |
1317 |
| - |
1318 |
| - eacf = ngx_rtmp_get_module_app_conf(s, ngx_rtmp_exec_module); |
1319 |
| - if (eacf == NULL || !eacf->active) { |
1320 |
| - goto next; |
1321 |
| - } |
1322 |
| - |
1323 |
| - ctx = ngx_rtmp_get_module_ctx(s, ngx_rtmp_exec_module); |
1324 |
| - if (ctx == NULL) { |
1325 |
| - goto next; |
1326 |
| - } |
1327 |
| - |
1328 |
| - ctx->recorder = v->recorder; |
1329 |
| - ctx->path = v->path; |
1330 |
| - |
1331 |
| - ctx->dirname.data = ctx->path.data; |
1332 |
| - ctx->dirname.len = 0; |
1333 |
| - |
1334 |
| - for (dir = ctx->path.len; dir > 0; dir--) { |
1335 |
| - c = ctx->path.data[dir - 1]; |
1336 |
| - if (c == '/' || c == '\\') { |
1337 |
| - ctx->dirname.len = dir - 1; |
1338 |
| - break; |
1339 |
| - } |
1340 |
| - } |
1341 |
| - |
1342 |
| - ctx->filename.data = ctx->path.data + dir; |
1343 |
| - ctx->filename.len = ctx->path.len - dir; |
1344 |
| - |
1345 |
| - ctx->basename = ctx->filename; |
1346 |
| - |
1347 |
| - for (ext = ctx->filename.len; ext > 0; ext--) { |
1348 |
| - if (ctx->filename.data[ext - 1] == '.') { |
1349 |
| - ctx->basename.len = ext - 1; |
1350 |
| - break; |
1351 |
| - } |
1352 |
| - } |
1353 |
| - |
1354 |
| - ngx_rtmp_exec_unmanaged(s, &eacf->conf[NGX_RTMP_EXEC_RECORD_DONE], |
1355 |
| - "record_done"); |
1356 |
| - |
1357 |
| - ngx_str_null(&v->recorder); |
1358 |
| - ngx_str_null(&v->path); |
1359 |
| - |
1360 |
| -next: |
1361 |
| - return next_record_done(s, v); |
1362 |
| -} |
1363 | 1302 | #endif /* NGX_WIN32 */
|
1364 | 1303 |
|
1365 | 1304 |
|
@@ -1596,9 +1535,6 @@ ngx_rtmp_exec_postconfiguration(ngx_conf_t *cf)
|
1596 | 1535 | next_close_stream = ngx_rtmp_close_stream;
|
1597 | 1536 | ngx_rtmp_close_stream = ngx_rtmp_exec_close_stream;
|
1598 | 1537 |
|
1599 |
| - next_record_done = ngx_rtmp_record_done; |
1600 |
| - ngx_rtmp_record_done = ngx_rtmp_exec_record_done; |
1601 |
| - |
1602 | 1538 | #endif /* NGX_WIN32 */
|
1603 | 1539 |
|
1604 | 1540 | return NGX_OK;
|
|
0 commit comments