1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
/*
* Copyright (C) Roman Arutyunyan
*/
#ifndef _NGX_RTMP_BANDWIDTH_H_INCLUDED_
#define _NGX_RTMP_BANDWIDTH_H_INCLUDED_
#include <ngx_config.h>
#include <ngx_core.h>
/* Bandwidth update interval in seconds */
#define NGX_RTMP_BANDWIDTH_INTERVAL 10
typedef struct {
uint64_t bytes;
uint64_t bandwidth; /* bytes/sec */
time_t intl_end;
uint64_t intl_bytes;
} ngx_rtmp_bandwidth_t;
void ngx_rtmp_update_bandwidth(ngx_rtmp_bandwidth_t *bw, uint32_t bytes);
#endif /* _NGX_RTMP_BANDWIDTH_H_INCLUDED_ */
|