99#include "ngx_rtmp_cmd_module.h"
1010#include "ngx_rtmp_netcall_module.h"
1111#include "ngx_rtmp_codec_module.h"
12+ #include "ngx_rtmp_record_module.h"
1213
1314
1415static ngx_rtmp_publish_pt next_publish ;
1516static ngx_rtmp_delete_stream_pt next_delete_stream ;
1617
17- static ngx_int_t ngx_rtmp_record_open (ngx_rtmp_session_t * s );
18- static ngx_int_t ngx_rtmp_record_close (ngx_rtmp_session_t * s );
19-
2018
2119static char * ngx_rtmp_notify_on_record_done (ngx_conf_t * cf ,
2220 ngx_command_t * cmd , void * conf );
@@ -28,29 +26,6 @@ static ngx_int_t ngx_rtmp_record_write_frame(ngx_rtmp_session_t *s,
2826 ngx_rtmp_header_t * h , ngx_chain_t * in );
2927
3028
31- typedef struct {
32- ngx_uint_t flags ;
33- ngx_str_t path ;
34- size_t max_size ;
35- size_t max_frames ;
36- ngx_msec_t interval ;
37- ngx_str_t suffix ;
38- ngx_flag_t unique ;
39- ngx_url_t * url ;
40- } ngx_rtmp_record_app_conf_t ;
41-
42-
43- typedef struct {
44- ngx_file_t file ;
45- ngx_uint_t nframes ;
46- uint32_t epoch ;
47- ngx_time_t last ;
48- time_t timestamp ;
49- u_char name [NGX_RTMP_MAX_NAME ];
50- u_char args [NGX_RTMP_MAX_ARGS ];
51- } ngx_rtmp_record_ctx_t ;
52-
53-
5429#define NGX_RTMP_RECORD_OFF 0x01
5530#define NGX_RTMP_RECORD_AUDIO 0x02
5631#define NGX_RTMP_RECORD_VIDEO 0x04
@@ -223,7 +198,7 @@ ngx_rtmp_record_write_header(ngx_file_t *file)
223198
224199
225200/* This funcion returns pointer to a static buffer */
226- static u_char *
201+ u_char *
227202ngx_rtmp_record_make_path (ngx_rtmp_session_t * s )
228203{
229204 ngx_rtmp_record_ctx_t * ctx ;
@@ -256,7 +231,7 @@ ngx_rtmp_record_make_path(ngx_rtmp_session_t *s)
256231}
257232
258233
259- static ngx_int_t
234+ ngx_int_t
260235ngx_rtmp_record_open (ngx_rtmp_session_t * s )
261236{
262237 ngx_rtmp_record_ctx_t * ctx ;
@@ -455,7 +430,7 @@ ngx_rtmp_record_notify(ngx_rtmp_session_t *s)
455430}
456431
457432
458- static ngx_int_t
433+ ngx_int_t
459434ngx_rtmp_record_close (ngx_rtmp_session_t * s )
460435{
461436 ngx_rtmp_record_ctx_t * ctx ;
0 commit comments