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 
vbi_reset
void vbi_reset(struct vbi *vbi)
Definition: vbi.cpp:717
dllist.h
vt.h
enhance
Definition: lang.h:10
vbi
Definition: vbi.h:18
vbi_handler
void vbi_handler(struct vbi *vbi, int fd)
Definition: vbi.cpp:419
vbi::pll_err
int pll_err
Definition: vbi.h:34
vbi::clients
struct dl_head clients[1]
Definition: vbi.h:21
vbi_open
struct vbi * vbi_open(const char *vbi_dev_name, struct cache *ca, int fine_tune, int big_buf)
Definition: vbi.cpp:627
vt_page::subno
int subno
Definition: vt.h:38
vbi::pll_dir
int pll_dir
Definition: vbi.h:32
vbi::pll_adj
int pll_adj
Definition: vbi.h:31
vt_page
Definition: vt.h:37
vbi::ppage
struct raw_page * ppage
Definition: vbi.h:28
dl_head
Definition: dllist.h:15
raw_page::enh
struct enhance enh[1]
Definition: vbi.h:14
vbi::bpb
int bpb
Definition: vbi.h:36
vbi_pll_reset
void vbi_pll_reset(struct vbi *vbi, int fine_tune)
Definition: vbi.cpp:164
vbi_client::data
void * data
Definition: vbi.h:47
vbi::bpl
int bpl
Definition: vbi.h:24
vbi::eoc
int eoc
Definition: vbi.h:38
vbi::bp8bh
int bp8bh
Definition: vbi.h:37
vbi::bufsize
int bufsize
Definition: vbi.h:23
vbi::pll_fixed
int pll_fixed
Definition: vbi.h:30
vbi::pll_cnt
int pll_cnt
Definition: vbi.h:33
vbi::seq
unsigned int seq
Definition: vbi.h:25
vbi_del_handler
void vbi_del_handler(struct vbi *vbi, vbic_handler handler, void *data)
Definition: vbi.cpp:480
vbi_add_handler
int vbi_add_handler(struct vbi *vbi, vbic_handler handler, void *data)
Definition: vbi.cpp:462
vbi_query_page
struct vt_page * vbi_query_page(struct vbi *vbi, int pgno, int subno)
Definition: vbi.cpp:690
lang.h
vbi::rpage
struct raw_page rpage[8]
Definition: vbi.h:27
dl_node
Definition: dllist.h:9
vbi::pll_lerr
int pll_lerr
Definition: vbi.h:34
vbi_close
void vbi_close(struct vbi *vbi)
Definition: vbi.cpp:679
vbi_client::handler
vbic_handler handler
Definition: vbi.h:46
raw_page
Definition: vbi.h:12
vbi::cache
struct cache * cache
Definition: vbi.h:20
vbi_client::node
struct dl_node node[1]
Definition: vbi.h:45
vbi_client
Definition: vbi.h:44
vbi::soc
int soc
Definition: vbi.h:38
vt_event
Definition: vt.h:9
vbi::fd
int fd
Definition: vbi.h:19
vt_page::pgno
int pgno
Definition: vt.h:38
vbi::bp8bl
int bp8bl
Definition: vbi.h:37
vbic_handler
void(*)(void *data, struct vt_event *ev) vbic_handler
Definition: vbi.h:41
raw_page::page
struct vt_page page[1]
Definition: vbi.h:13