File: vbi.h

package info (click to toggle)
linuxtv-dvb-apps 1.1.1%2Brev1483-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 7,556 kB
  • sloc: ansic: 48,832; makefile: 792; perl: 236; sh: 110; xml: 13
file content (47 lines) | stat: -rw-r--r-- 1,104 bytes parent folder | download | duplicates (7)
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
#ifndef VBI_H
#define VBI_H

#include "vt.h"
#include "dllist.h"
#include "cache.h"
#include "lang.h"

#define PLL_ADJUST 4

struct raw_page
{
    struct vt_page page[1];
    struct enhance enh[1];
};

struct vbi
{
    int fd;
    struct cache *cache;
    struct dl_head clients[1];
    // page assembly
    struct raw_page rpage[8]; // one for each magazin
    struct raw_page *ppage; // points to page of previous pkt0
    // DVB stuff
    unsigned int ttpid;
    u_int16_t sid;
};

struct vbi_client
{
    struct dl_node node[1];
    void (*handler)(void *data, struct vt_event *ev);
    void *data;
};

struct vbi *vbi_open(char *vbi_dev_name, struct cache *ca,
	const char *channel, char *outfile, u_int16_t sid, int ttpid);
void vbi_close(struct vbi *vbi);
void vbi_reset(struct vbi *vbi);
int vbi_add_handler(struct vbi *vbi, void *handler, void *data);
void vbi_del_handler(struct vbi *vbi, void *handler, void *data);
struct vt_page *vbi_query_page(struct vbi *vbi, int pgno, int subno);

struct vbi *open_null_vbi(struct cache *ca);
void send_errmsg(struct vbi *vbi, char *errmsg, ...);
#endif