Main Page   Class Hierarchy   Compound List   File List   Compound Members  

vbi.h

00001 #ifndef VBI_H
00002 #define VBI_H
00003 
00004 #include "vt.h"
00005 #include "dllist.h"
00006 #include "cache.h"
00007 #include "lang.h"
00008 
00009 #define PLL_ADJUST      4
00010 
00011 struct raw_page
00012 {
00013     struct vt_page page[1];
00014     struct enhance enh[1];
00015 };
00016 
00017 struct vbi
00018 {
00019     int fd;
00020     struct cache *cache;
00021     struct dl_head clients[1];
00022     /*  raw buffer management */
00023     int bufsize;                /*  nr of bytes sent by this device */
00024     int bpl;                    /*  bytes per line */
00025     u32 seq;
00026     /*  page assembly */
00027     struct raw_page rpage[8];   /*  one for each magazin */
00028     struct raw_page *ppage;     /*  points to page of previous pkt0 */
00029     /*  phase correction */
00030     int pll_fixed;              /*  0 = auto, 1..2*PLL_ADJUST+1 = fixed */
00031     int pll_adj;
00032     int pll_dir;
00033     int pll_cnt;
00034     int pll_err, pll_lerr;
00035     /*  v4l2 decoder data */
00036     int bpb;                    /*  bytes per bit * 2^16 */
00037     int bp8bl, bp8bh;           /*  bytes per 8-bit low/high */
00038     int soc, eoc;               /*  start/end of clock run-in */
00039 };
00040 
00041 struct vbi_client
00042 {
00043     struct dl_node node[1];
00044     void (*handler)(void *data, struct vt_event *ev);
00045     void *data;
00046 };
00047 
00048 struct vbi *vbi_open(char *vbi_dev_name, struct cache *ca, int fine_tune,
00049                                                                 int big_buf);
00050 void vbi_close(struct vbi *vbi);
00051 void vbi_reset(struct vbi *vbi);
00052 int vbi_add_handler(struct vbi *vbi, void *handler, void *data);
00053 void vbi_del_handler(struct vbi *vbi, void *handler, void *data);
00054 struct vt_page *vbi_query_page(struct vbi *vbi, int pgno, int subno);
00055 void vbi_pll_reset(struct vbi *vbi, int fine_tune);
00056 
00057 #endif

Generated at Thu Jan 30 02:56:02 2003 for QtVision by doxygen1.2.9.1 written by Dimitri van Heesch, © 1997-2001