blob: a37461760a4b353cc4a98f5143f81ed0568da185 (
plain)
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
#ifndef _DVBIPSTREAM_H
#define _DVBIPSTREAM_H
#include "headers.h"
#include "misc.h"
#define MAXAPIDS 32
#define MAXDPIDS 4
#define MAXCAIDS 2
#define TS_PER_UDP 7
typedef struct
{
int number;
char *name;
char *provider;
char *shortName;
int type;
unsigned int frequency;
int srate;
int coderateH;
int coderateL;
int guard;
int polarization;
int inversion;
int modulation;
int source;
int transmission;
int bandwidth;
int hierarchy;
int vpid;
int ppid;
int sid;
int rid;
int tid;
int tpid;
int nid;
int caids[MAXCAIDS];
int NumCaids;
int apids[MAXAPIDS];
int NumApids;
int dpids[MAXDPIDS];
int NumDpids;
int eitpids[1];
int NumEitpids;
int sdtpids[1];
int NumSdtpids;
} channel_t;
typedef struct _stream_buffer_t
{
struct _stream_buffer_t *next;
char data[TS_PER_UDP*188];
} stream_buffer_t;
typedef struct
{
recv_info_t *r;
stream_buffer_t *free;
stream_buffer_t *head;
stream_buffer_t *tail;
stream_buffer_t *wr;
stream_buffer_t *rd;
int fill;
int si_state;
psi_buf_t psi;
channel_t *cdata;
int pmt_pid;
int es_pids[32];
int es_pidnum;
int fta;
pthread_t t;
int stop;
int ts_cnt;
pthread_mutex_t lock_bf;
pthread_mutex_t lock_ts;
} stream_info_t;
channel_t *read_channel_list (char *filename);
int get_channel_num (void);
int get_channel_name (int n, char *str, int maxlen);
channel_t *get_channel_data (int n);
// mcilink.c
void mcli_startup (void);
void* mcli_stream_setup (const int channum);
size_t mcli_stream_access (void* handle, char **buf);
size_t mcli_stream_part_access (void* handle, char **buf);
void mcli_stream_skip (void* handle);
int mcli_stream_stop (void* handle);
// parse.c
int ParseLine (const char *s, channel_t * ch);
#endif
|