annotate stream/tvi_vbi.h @ 23542:2e13eea875a3

Copile fix: missing libswscale part of ffmpeg r9322 TARGET_ARCH -> ARCH change.
author reimar
date Sat, 16 Jun 2007 15:17:00 +0000
parents a6c619ee9d30
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
23510
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
1 #ifndef __TVI_VBI_H_
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
2 #define __TVI_VBI_H_
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
3
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
4 #include "libzvbi.h"
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
5 #include "libmpcodecs/img_format.h"
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
6 #include "libmpcodecs/mp_image.h"
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
7 #include "tv.h"
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
8
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
9 #define VBI_MAX_SUBPAGES 64 ///< max sub pages number
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
10 #define VBI_TXT_PAGE_SIZE 42*25*2 ///< max text page size
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
11 #define VBI_MAX_LINE_SIZE 42 ///< max line size in text page
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
12
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
13 #define VBI_TFORMAT_TEXT 0 ///< text mode
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
14 #define VBI_TFORMAT_BW 1 ///< back&white mode
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
15 #define VBI_TFORMAT_GRAY 2 ///< grayscale mode
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
16 #define VBI_TFORMAT_COLOR 3 ///< color mode (require color_spu patch!)
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
17
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
18 #define VBI_NO_TELETEXT "No teletext"
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
19
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
20 #define VBI_TRANSPARENT_COLOR 40 ///< transparent color id
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
21 #define VBI_TIME_LINEPOS 13 ///< time line pos in page header
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
22
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
23 typedef struct {
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
24 int on; ///< teletext on/off
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
25
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
26 char* device; ///< capture device
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
27 unsigned int services; ///< services
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
28 vbi_capture* capture; ///< vbi_capture
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
29 int capture_fd; ///< capture fd (now not used)
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
30 vbi_decoder* decoder; ///< vbi_decoder
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
31 char* errstr; ///< error string
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
32 pthread_t grabber_thread; ///< grab thread
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
33 pthread_mutex_t buffer_mutex;
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
34 pthread_mutex_t update_mutex;
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
35 int eof; ///< end grab
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
36 int tpage; ///< tpage
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
37 int pgno; ///< seek page number
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
38 int subno; ///< seek subpage
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
39 int curr_pgno; ///< current page number
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
40 int curr_subno; ///< current subpage
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
41 uint32_t pagenumdec; ///< set page num with dec
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
42
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
43 vbi_page** cache;
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
44 vbi_page *page; ///< vbi_page
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
45 int valid_page; ///< valid page flag
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
46 char* txtpage; ///< decoded vbi_page to text
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
47 vbi_char theader[VBI_MAX_LINE_SIZE]; ///< vbi header
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
48 char header[VBI_MAX_LINE_SIZE]; ///< text header
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
49
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
50 int tformat; ///< 0:text, 1:bw, 2:gray, 3:color
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
51 vbi_pixfmt fmt; ///< image format (only VBI_PIXFMT_RGBA32_LE supported)
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
52 void* canvas; ///< stored image data
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
53 int csize; ///< stored image size
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
54 int canvas_size; ///< image buffer size
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
55 int reveal; ///< reveal (now not used)
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
56 int flash_on; ///< flash_on (now not used)
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
57 int alpha; ///< opacity mode
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
58 int foreground; ///< foreground black in bw mode
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
59 int half; ///< 0:half mode off, 1:top half page, 2:bottom half page
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
60 int redraw; ///< is redraw last image
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
61 int columns; ///< page size: coloumns
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
62 int rows; ///< page size: rows
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
63 int spudec_proc; ///< render image request
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
64
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
65 char* network_name; ///< network name
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
66 char* network_id; ///< network id
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
67 } priv_vbi_t;
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
68
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
69 /// teletext subsystem initialization
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
70 priv_vbi_t* teletext_init(void);
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
71 /// teletext subsystem uninitialization
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
72 void teletext_uninit(priv_vbi_t* priv_vbi);
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
73 /// ioctl for
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
74 int teletext_control(priv_vbi_t* priv_vbi, int cmd, void *args);
a6c619ee9d30 Teletext support for tv:// (v4l and v4l2 only)
voroshil
parents:
diff changeset
75 #endif