1 Star 0 Fork 132

M.R.Z/nginx-http-flv-module

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
ngx_rtmp_live_module.h 2.92 KB
一键复制 编辑 原始数据 按行查看 历史
winshining 提交于 2018-07-15 03:47 . [dev] recover the gop cache feature.
/*
* Copyright (C) Roman Arutyunyan
* Copyright (C) Winshining
*/
#ifndef _NGX_RTMP_LIVE_H_INCLUDED_
#define _NGX_RTMP_LIVE_H_INCLUDED_
#include <ngx_config.h>
#include <ngx_core.h>
#include "ngx_rtmp.h"
#include "ngx_rtmp_cmd_module.h"
#include "ngx_rtmp_bandwidth.h"
#include "ngx_rtmp_streams.h"
typedef struct ngx_rtmp_live_ctx_s ngx_rtmp_live_ctx_t;
typedef struct ngx_rtmp_live_stream_s ngx_rtmp_live_stream_t;
typedef struct {
unsigned active:1;
uint32_t timestamp;
uint32_t csid;
uint32_t dropped;
} ngx_rtmp_live_chunk_stream_t;
struct ngx_rtmp_live_ctx_s {
ngx_rtmp_session_t *session;
ngx_rtmp_live_stream_t *stream;
ngx_rtmp_live_ctx_t *next;
ngx_uint_t ndropped;
ngx_rtmp_live_chunk_stream_t cs[2];
ngx_uint_t meta_version;
ngx_event_t idle_evt;
unsigned active:1;
unsigned publishing:1;
unsigned silent:1;
unsigned paused:1;
ngx_uint_t protocol;
};
struct ngx_rtmp_live_stream_s {
u_char name[NGX_RTMP_MAX_NAME];
ngx_rtmp_live_stream_t *next;
ngx_rtmp_live_ctx_t *ctx;
ngx_rtmp_live_ctx_t *pub_ctx;
ngx_rtmp_bandwidth_t bw_in;
ngx_rtmp_bandwidth_t bw_in_audio;
ngx_rtmp_bandwidth_t bw_in_video;
ngx_rtmp_bandwidth_t bw_in_data;
ngx_rtmp_bandwidth_t bw_out;
ngx_msec_t epoch;
unsigned active:1;
unsigned publishing:1;
};
typedef struct {
ngx_int_t nbuckets;
ngx_rtmp_live_stream_t **streams;
ngx_flag_t live;
ngx_flag_t meta;
ngx_msec_t sync;
ngx_msec_t idle_timeout;
ngx_flag_t atc;
ngx_flag_t interleave;
ngx_flag_t wait_key;
ngx_flag_t wait_video;
ngx_flag_t publish_notify;
ngx_flag_t play_restart;
ngx_flag_t idle_streams;
ngx_msec_t buflen;
ngx_pool_t *pool;
ngx_rtmp_live_stream_t *free_streams;
} ngx_rtmp_live_app_conf_t;
extern ngx_module_t ngx_rtmp_live_module;
ngx_rtmp_live_stream_t **ngx_rtmp_live_get_stream(ngx_rtmp_session_t *s,
u_char *name, int create);
#endif /* _NGX_RTMP_LIVE_H_INCLUDED_ */
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/mr.z/nginx-http-flv-module.git
[email protected]:mr.z/nginx-http-flv-module.git
mr.z
nginx-http-flv-module
nginx-http-flv-module
master

搜索帮助