Add support for VBI capture from /dev/vbi.

This will allow software teletext/intercast/subtitles decoding
while watching a TV station.

Based on code from Hiroki Mori <mori@infocity.co.jp> but reworked by
myself.
This commit is contained in:
Roger Hardiman 1999-04-29 10:01:28 +00:00
parent ea2052d226
commit 26da6e9453
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=46175
2 changed files with 26 additions and 4 deletions

View file

@ -28,7 +28,7 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* $Id: brktree_reg.h,v 1.24 1999/01/23 11:28:16 roger Exp $
* $Id: brktree_reg.h,v 1.25 1999/02/08 11:55:30 roger Exp $
*/
#ifndef PCI_LATENCY_TIMER
#define PCI_LATENCY_TIMER 0x0c /* pci timer register */
@ -373,6 +373,8 @@ struct format_params {
u_char adelay, bdelay;
/* Iform XTSEL value */
int iform_xtsel;
/* VBI number of lines per field, and number of samples per line */
int vbi_num_lines, vbi_num_samples;
};
#ifdef __FreeBSD__
@ -401,6 +403,11 @@ struct bktr_softc {
pcici_t tag; /* PCI tag, for doing PCI commands */
vm_offset_t bigbuf; /* buffer that holds the captured image */
int alloc_pages; /* number of pages in bigbuf */
vm_offset_t vbidata; /* RISC program puts VBI data from the current frame here */
vm_offset_t vbibuffer; /* Circular buffer holding VBI data for the user */
int vbiinsert; /* Position for next write into circular buffer */
int vbistart; /* Position of last read from circular buffer */
int vbisize; /* Number of bytes in the circular buffer */
struct proc *proc; /* process to receive raised signal */
int signal; /* signal to send to process */
int clr_on_start; /* clear cap buf on capture start? */
@ -473,9 +480,13 @@ struct bktr_softc {
#define METEOR_WANT_TS 0x08000000 /* time-stamp a frame */
#define METEOR_RGB 0x20000000 /* meteor rgb unit */
#define METEOR_FIELD_MODE 0x80000000
u_char tflags;
u_char tflags; /* Tuner flags (/dev/tuner) */
#define TUNER_INITALIZED 0x00000001
#define TUNER_OPEN 0x00000002
u_char vbiflags; /* VBI flags (/dev/vbi) */
#define VBI_INITALIZED 0x00000001
#define VBI_OPEN 0x00000002
#define VBI_CAPTURE 0x00000004
u_short fps; /* frames per second */
struct meteor_video video;
struct TVTUNER tuner;

View file

@ -28,7 +28,7 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* $Id: brktree_reg.h,v 1.24 1999/01/23 11:28:16 roger Exp $
* $Id: brktree_reg.h,v 1.25 1999/02/08 11:55:30 roger Exp $
*/
#ifndef PCI_LATENCY_TIMER
#define PCI_LATENCY_TIMER 0x0c /* pci timer register */
@ -373,6 +373,8 @@ struct format_params {
u_char adelay, bdelay;
/* Iform XTSEL value */
int iform_xtsel;
/* VBI number of lines per field, and number of samples per line */
int vbi_num_lines, vbi_num_samples;
};
#ifdef __FreeBSD__
@ -401,6 +403,11 @@ struct bktr_softc {
pcici_t tag; /* PCI tag, for doing PCI commands */
vm_offset_t bigbuf; /* buffer that holds the captured image */
int alloc_pages; /* number of pages in bigbuf */
vm_offset_t vbidata; /* RISC program puts VBI data from the current frame here */
vm_offset_t vbibuffer; /* Circular buffer holding VBI data for the user */
int vbiinsert; /* Position for next write into circular buffer */
int vbistart; /* Position of last read from circular buffer */
int vbisize; /* Number of bytes in the circular buffer */
struct proc *proc; /* process to receive raised signal */
int signal; /* signal to send to process */
int clr_on_start; /* clear cap buf on capture start? */
@ -473,9 +480,13 @@ struct bktr_softc {
#define METEOR_WANT_TS 0x08000000 /* time-stamp a frame */
#define METEOR_RGB 0x20000000 /* meteor rgb unit */
#define METEOR_FIELD_MODE 0x80000000
u_char tflags;
u_char tflags; /* Tuner flags (/dev/tuner) */
#define TUNER_INITALIZED 0x00000001
#define TUNER_OPEN 0x00000002
u_char vbiflags; /* VBI flags (/dev/vbi) */
#define VBI_INITALIZED 0x00000001
#define VBI_OPEN 0x00000002
#define VBI_CAPTURE 0x00000004
u_short fps; /* frames per second */
struct meteor_video video;
struct TVTUNER tuner;