1 #ifndef MODULE_STREAMRELAY_H_
2 #define MODULE_STREAMRELAY_H_
4 #ifdef MODULE_STREAMRELAY
6 #define STREAM_SERVER_MAX_CONNECTIONS 16
8 #define DVB_MAX_TS_PACKETS 278
9 #define DVB_BUFFER_SIZE_CSA 188*DVB_MAX_TS_PACKETS
10 #define DVB_BUFFER_WAIT_CSA 188*(DVB_MAX_TS_PACKETS-128)
11 #define DVB_BUFFER_SIZE DVB_BUFFER_SIZE_CSA
15 #define MAX_STREAM_PIDS 32
18 #include "cscrypt/md5.h"
19 #include <dvbcsa/dvbcsa.h>
21 #define DVBCSA_HEADER_ECM 1
22 #define dvbcsa_bs_key_set(a,b) dvbcsa_bs_key_set_ecm(ecm,a,b)
24 #define DVBCSA_HEADER_ECM 0
26 #ifndef STATIC_LIBDVBCSA
27 #define STATIC_LIBDVBCSA 0
35 struct dvbcsa_bs_key_s
*key
[2];
36 } stream_client_key_data
;
46 uint8_t cat_data
[1024+208];
47 uint8_t pat_data
[1024+208];
48 uint8_t pmt_data
[1024+208];
49 uint8_t ecm_data
[1024+208];
50 uint8_t emm_data
[1024+208];
51 uint16_t cat_data_pos
;
52 uint16_t pat_data_pos
;
53 uint16_t pmt_data_pos
;
54 uint16_t ecm_data_pos
;
55 uint16_t emm_data_pos
;
66 uint8_t STREAMpidcount
;
67 uint16_t STREAMpids
[MAX_STREAM_PIDS
];
69 uint8_t ecm_md5
[MD5_DIGEST_LENGTH
];
72 void *stream_server(void *a
);
73 void init_stream_server(void);
74 void stop_stream_server(void);
76 bool stream_write_cw(ECM_REQUEST
*er
);
78 #endif // MODULE_STREAMRELAY
80 #endif // MODULE_STREAMRELAY_H_