MythTV  master
vbi.h
Go to the documentation of this file.
1 #ifndef VBI_H
2 #define VBI_H
3 
4 #include "vt.h"
5 #include "dllist.h"
6 #include "lang.h"
7 //#include "cache.h"
8 
9 #define PLL_ADJUST 4
10 
11 struct raw_page
12 {
13  struct vt_page page[1];
14  struct enhance enh[1];
15 };
16 
17 struct vbi
18 {
19  int fd;
20  struct cache *cache;
21  struct dl_head clients[1];
22  // raw buffer management
23  int bufsize; // nr of bytes sent by this device
24  int bpl; // bytes per line
25  unsigned int seq;
26  // page assembly
27  struct raw_page rpage[8]; // one for each magazin
28  struct raw_page *ppage; // points to page of previous pkt0
29  // phase correction
30  int pll_fixed; // 0 = auto, 1..2*PLL_ADJUST+1 = fixed
31  int pll_adj;
32  int pll_dir;
33  int pll_cnt;
35  // v4l2 decoder data
36  int bpb; // bytes per bit * 2^16
37  int bp8bl, bp8bh; // bytes per 8-bit low/high
38  int soc, eoc; // start/end of clock run-in
39 };
40 
41 using vbic_handler = void (*)(void *data, struct vt_event *ev);
42 
43 struct vbi_client
44 {
45  struct dl_node node[1];
47  void *data;
48 };
49 
50 struct vbi *vbi_open(const char *vbi_dev_name, struct cache *ca, int fine_tune,
51  int big_buf);
52 void vbi_close(struct vbi *vbi);
53 void vbi_reset(struct vbi *vbi);
54 int vbi_add_handler(struct vbi *vbi, vbic_handler handler, void *data);
55 void vbi_del_handler(struct vbi *vbi, vbic_handler handler, void *data);
56 struct vt_page *vbi_query_page(struct vbi *vbi, int pgno, int subno);
57 void vbi_pll_reset(struct vbi *vbi, int fine_tune);
58 
59 void vbi_handler(struct vbi *vbi, int fd);
60 
61 #endif
62 
int pll_err
Definition: vbi.h:34
int pll_dir
Definition: vbi.h:32
int pgno
Definition: vt.h:38
int pll_lerr
Definition: vbi.h:34
struct dl_head clients[1]
Definition: vbi.h:21
int eoc
Definition: vbi.h:38
struct cache * cache
Definition: vbi.h:20
Definition: lang.h:9
void(*)(void *data, struct vt_event *ev) vbic_handler
Definition: vbi.h:41
unsigned int seq
Definition: vbi.h:25
int bp8bh
Definition: vbi.h:37
void * data
Definition: vbi.h:47
Definition: vt.h:36
vbic_handler handler
Definition: vbi.h:46
struct dl_node node[1]
Definition: vbi.h:45
int bufsize
Definition: vbi.h:23
struct vt_page * vbi_query_page(struct vbi *vbi, int pgno, int subno)
Definition: vbi.cpp:690
int bpl
Definition: vbi.h:24
Definition: dllist.h:14
int bpb
Definition: vbi.h:36
int pll_fixed
Definition: vbi.h:30
struct vt_page page[1]
Definition: vbi.h:13
int pll_adj
Definition: vbi.h:31
Definition: vbi.h:43
Definition: vt.h:8
int soc
Definition: vbi.h:38
void vbi_close(struct vbi *vbi)
Definition: vbi.cpp:679
Definition: vbi.h:11
int vbi_add_handler(struct vbi *vbi, vbic_handler handler, void *data)
Definition: vbi.cpp:462
int pll_cnt
Definition: vbi.h:33
Definition: dllist.h:8
void vbi_pll_reset(struct vbi *vbi, int fine_tune)
Definition: vbi.cpp:164
struct raw_page rpage[8]
Definition: vbi.h:27
void vbi_reset(struct vbi *vbi)
Definition: vbi.cpp:717
Definition: vbi.h:17
int subno
Definition: vt.h:38
struct enhance enh[1]
Definition: vbi.h:14
int fd
Definition: vbi.h:19
int bp8bl
Definition: vbi.h:37
struct vbi * vbi_open(const char *vbi_dev_name, struct cache *ca, int fine_tune, int big_buf)
Definition: vbi.cpp:627
void vbi_del_handler(struct vbi *vbi, vbic_handler handler, void *data)
Definition: vbi.cpp:480
struct raw_page * ppage
Definition: vbi.h:28
void vbi_handler(struct vbi *vbi, int fd)
Definition: vbi.cpp:419