Permalink
Browse files

moved app, ctx & module to record header

  • Loading branch information...
1 parent 5576444 commit 5d7a5ea535ed40e7a9459967dc607bb52b10db12 @arut arut committed Aug 30, 2012
Showing with 26 additions and 23 deletions.
  1. +0 −23 ngx_rtmp_record_module.c
  2. +26 −0 ngx_rtmp_record_module.h
View
@@ -26,29 +26,6 @@ static ngx_int_t ngx_rtmp_record_write_frame(ngx_rtmp_session_t *s,
ngx_rtmp_header_t *h, ngx_chain_t *in);
-typedef struct {
- ngx_uint_t flags;
- ngx_str_t path;
- size_t max_size;
- size_t max_frames;
- ngx_msec_t interval;
- ngx_str_t suffix;
- ngx_flag_t unique;
- ngx_url_t *url;
-} ngx_rtmp_record_app_conf_t;
-
-
-typedef struct {
- ngx_file_t file;
- ngx_uint_t nframes;
- uint32_t epoch;
- ngx_time_t last;
- time_t timestamp;
- u_char name[NGX_RTMP_MAX_NAME];
- u_char args[NGX_RTMP_MAX_ARGS];
-} ngx_rtmp_record_ctx_t;
-
-
#define NGX_RTMP_RECORD_OFF 0x01
#define NGX_RTMP_RECORD_AUDIO 0x02
#define NGX_RTMP_RECORD_VIDEO 0x04
View
@@ -9,6 +9,29 @@
#include "ngx_rtmp.h"
+
+typedef struct {
+ ngx_uint_t flags;
+ ngx_str_t path;
+ size_t max_size;
+ size_t max_frames;
+ ngx_msec_t interval;
+ ngx_str_t suffix;
+ ngx_flag_t unique;
+ ngx_url_t *url;
+} ngx_rtmp_record_app_conf_t;
+
+
+typedef struct {
+ ngx_file_t file;
+ ngx_uint_t nframes;
+ uint32_t epoch;
+ ngx_time_t last;
+ time_t timestamp;
+ u_char name[NGX_RTMP_MAX_NAME];
+ u_char args[NGX_RTMP_MAX_ARGS];
+} ngx_rtmp_record_ctx_t;
+
u_char * ngx_rtmp_record_make_path(ngx_rtmp_session_t *s);
@@ -17,4 +40,7 @@ ngx_int_t ngx_rtmp_record_open(ngx_rtmp_session_t *s);
ngx_int_t ngx_rtmp_record_close(ngx_rtmp_session_t *s);
+extern ngx_module_t ngx_rtmp_record_module;
+
+
#endif /* _NGX_RTMP_RECORD_H_INCLUDED_ */

0 comments on commit 5d7a5ea

Please sign in to comment.