File: ngx_rtmp_bandwidth.h

package info (click to toggle)
libnginx-mod-rtmp 1%3A1.2.2%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,044 kB
  • sloc: ansic: 22,891; sh: 53; makefile: 3
file content (31 lines) | stat: -rw-r--r-- 584 bytes parent folder | download | duplicates (4)
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_ */