ZVBI Library  0.2.33
Typedefs | Functions
Teletext IDL packet demultiplexer
Low Level Decoding

Functions to decode data transmissions in Teletext Independent Data Line packets (EN 300 708 section 6). More...

Typedefs

typedef struct _vbi_idl_demux vbi_idl_demux
 IDL demultiplexer context.
typedef vbi_bool vbi_idl_demux_cb (vbi_idl_demux *dx, const uint8_t *buffer, unsigned int n_bytes, unsigned int flags, void *user_data)

Functions

void vbi_idl_demux_reset (vbi_idl_demux *dx) _vbi_nonnull((1))
vbi_bool vbi_idl_demux_feed (vbi_idl_demux *dx, const uint8_t buffer[42])
vbi_bool vbi_idl_demux_feed_frame (vbi_idl_demux *dx, const vbi_sliced *sliced, unsigned int n_lines)
void vbi_idl_demux_delete (vbi_idl_demux *dx)
vbi_idl_demuxvbi_idl_a_demux_new (unsigned int channel, unsigned int address, vbi_idl_demux_cb *callback, void *user_data)

Detailed Description

Functions to decode data transmissions in Teletext Independent Data Line packets (EN 300 708 section 6).


Typedef Documentation

typedef struct _vbi_idl_demux vbi_idl_demux

IDL demultiplexer context.

The contents of this structure are private.

Call vbi_idl_demux_new() to allocate an IDL demultiplexer context.

typedef vbi_bool vbi_idl_demux_cb(vbi_idl_demux *dx, const uint8_t *buffer, unsigned int n_bytes, unsigned int flags, void *user_data)
Parameters:
dxIDL demultiplexer returned by vbi_idl_a_demux_new() and given to vbi_idl_demux_feed().
bufferPointer to received user data.
n_bytesNumber of bytes in the buffer. Can be 0 if the decoded packet did not contain user data.
flagsVBI_IDL_DATA_LOST, VBI_IDL_DEPENDENT.
user_dataUser pointer passed to vbi_idl_demux_new().

The vbi_idl_demux_feed() function calls a function of this type after successfully decoding an IDL packet.

Returns:
FALSE to abort vbi_idl_demux_feed() and return FALSE.

Function Documentation

void vbi_idl_demux_reset ( vbi_idl_demux dx)
Parameters:
dxIDL demultiplexer allocated with vbi_idl_a_demux_new().

Resets the IDL demux context, useful for example after a channel change.

Since:
0.2.14
vbi_bool vbi_idl_demux_feed ( vbi_idl_demux dx,
const uint8_t  buffer[42] 
)
Parameters:
dxIDL demultiplexer allocated with vbi_idl_a_demux_new().
bufferTeletext packet (last 42 bytes, i. e. without clock run-in and framing code), as in struct vbi_sliced.

This function takes a stream of Teletext packets, filters out packets of the desired data channel and address and calls the output function given to vbi_idl_a_demux_new() when new user data is available.

Returns:
FALSE if the packet contained incorrectable errors.
Since:
0.2.14
vbi_bool vbi_idl_demux_feed_frame ( vbi_idl_demux dx,
const vbi_sliced sliced,
unsigned int  n_lines 
)
Parameters:
dxIDL demultiplexer allocated with vbi_idl_a_demux_new().
slicedSliced VBI data.
n_linesNumber of lines in the sliced array.

This function works like vbi_idl_demux_feed() but operates on sliced VBI data and filters out VBI_SLICED_TELETEXT_B_625.

Returns:
FALSE if any Teletext lines contained incorrectable errors.
Since:
0.2.26
void vbi_idl_demux_delete ( vbi_idl_demux dx)
Parameters:
dxIDL demultiplexer allocated with vbi_idl_a_demux_new(), can be NULL.

Frees all resources associated with dx.

Since:
0.2.14
vbi_idl_demux* vbi_idl_a_demux_new ( unsigned int  channel,
unsigned int  address,
vbi_idl_demux_cb callback,
void *  user_data 
)
Parameters:
channelFilter out packets of this channel.
addressFilter out packets with this service data address.
callbackFunction to be called by vbi_idl_demux_feed() when new data is available.
user_dataUser pointer passed through to callback function.

Allocates a new Independent Data Line format A (EN 300 708 section 6.5) demultiplexer.

Returns:
Pointer to newly allocated IDL demultiplexer which must be freed with vbi_idl_demux_delete() when done. NULL on failure (out of memory).
Since:
0.2.14