fully tunable auto-push feature

This commit is contained in:
Roman Arutyunyan
2012-07-19 12:10:59 +04:00
parent 4e475cccb5
commit b960e68a0b
4 changed files with 533 additions and 31 deletions

View File

@ -23,10 +23,42 @@ typedef struct {
ngx_int_t start;
ngx_int_t stop;
void *tag;
void *tag; /* usually module reference */
void *data; /* module-specific data */
} ngx_rtmp_relay_target_t;
typedef struct ngx_rtmp_relay_ctx_s ngx_rtmp_relay_ctx_t;
struct ngx_rtmp_relay_ctx_s {
ngx_str_t name;
ngx_str_t url;
ngx_log_t log;
ngx_rtmp_session_t *session;
ngx_rtmp_relay_ctx_t *publish;
ngx_rtmp_relay_ctx_t *play;
ngx_rtmp_relay_ctx_t *next;
unsigned relay:1;
ngx_str_t app;
ngx_str_t tc_url;
ngx_str_t page_url;
ngx_str_t swf_url;
ngx_str_t flash_ver;
ngx_str_t play_path;
ngx_int_t live;
ngx_int_t start;
ngx_int_t stop;
ngx_event_t push_evt;
void *tag;
void *data;
};
extern ngx_module_t ngx_rtmp_relay_module;
ngx_int_t ngx_rtmp_relay_pull(ngx_rtmp_session_t *s, ngx_str_t *name,
ngx_rtmp_relay_target_t *target);
ngx_int_t ngx_rtmp_relay_push(ngx_rtmp_session_t *s, ngx_str_t *name,