vbi_raw_decoder Struct Reference
Raw VBI » Raw VBI decoder

Raw vbi decoder context. More...

`#include <decoder.h>`

## Data Structures

struct | _vbi_raw_decoder_job

## Data Fields

int | scanning
vbi_pixfmt | sampling_format
int | sampling_rate
int | bytes_per_line
int | offset
int | start [2]
int | count [2]
vbi_bool | interlaced
vbi_bool | synchronous
pthread_mutex_t | mutex
unsigned int | services
int | num_jobs
int8_t * | pattern
struct vbi_raw_decoder::_vbi_raw_decoder_job | jobs [8]

## Detailed Description

Raw vbi decoder context.

Only the sampling parameters are public. See vbi_raw_decoder_parameters() and vbi_raw_decoder_add_services() for usage.

Examples
  examples/rawout.c, and examples/wss.c.

## Field Documentation

## scanning

int vbi_raw_decoder::scanning

Either 525 (M/NTSC, M/PAL) or 625 (PAL, SECAM), describing the scan line system all line numbers refer to.

Examples
  examples/rawout.c, and examples/wss.c.

## sampling_format

vbi_pixfmt vbi_raw_decoder::sampling_format

Format of the raw vbi data.

Examples
  examples/rawout.c, and examples/wss.c.

## sampling_rate

int vbi_raw_decoder::sampling_rate

Sampling rate in Hz, the number of samples or pixels captured per second.

Examples
  examples/rawout.c, and examples/wss.c.

## bytes_per_line

int vbi_raw_decoder::bytes_per_line

Number of samples or pixels captured per scan line, in bytes. This determines the raw vbi image width and you want it large enough to cover all data transmitted in the line (with headroom).

Examples
  examples/rawout.c, and examples/wss.c.

## offset

int vbi_raw_decoder::offset

The distance from 0H (leading edge hsync, half amplitude point) to the first sample (pixel) captured, in samples (pixels). You want an offset small enough not to miss the start of the data transmitted.

Examples
  examples/rawout.c, and examples/wss.c.

## start

int vbi_raw_decoder::start[2]

First scan line to be captured, first and second field respectively, according to the ITU-R line numbering scheme (see vbi_sliced). Set to zero if the exact line number isn't known.

Examples
  examples/rawout.c, and examples/wss.c.

Referenced by vbi_raw_decoder_resize().

## count

int vbi_raw_decoder::count[2]

Number of scan lines captured, first and second field respectively. This can be zero if only data from one field is required. The sum count[0] + count[1] determines the raw vbi image height.

Examples
  examples/rawout.c, and examples/wss.c.

Referenced by vbi_raw_decode(), and vbi_raw_decoder_resize().

## interlaced

vbi_bool vbi_raw_decoder::interlaced

In the raw vbi image, normally all lines of the second field are supposed to follow all lines of the first field. When this flag is set, the scan lines of first and second field will be interleaved in memory. This implies count[0] and count[1] are equal.

Examples
  examples/rawout.c, and examples/wss.c.

## synchronous

vbi_bool vbi_raw_decoder::synchronous

Fields must be stored in temporal order, i. e. as the lines have been captured. It is assumed that the first field is also stored first in memory, however if the hardware cannot reliable distinguish fields this flag shall be cleared, which disables decoding of data services depending on the field number.

Examples
  examples/rawout.c, and examples/wss.c.