Main Page   Modules   Data Structures   Data Fields   Related Pages   Examples  

Teletext PFC packet demultiplexer

Functions to decode data transmissions in Teletext Page Function Clear packets (EN 300 708 section 4). More...

Data Structures

struct  vbi_pfc_block
 One block of data returned by vbi_pfc_demux_cb. More...


Typedefs

typedef struct _vbi_pfc_demux vbi_pfc_demux
 PFC demultiplexer context. More...

typedef vbi_bool vbi_pfc_demux_cb (vbi_pfc_demux *dx, void *user_data, const vbi_pfc_block *block)

Functions

void vbi_pfc_demux_reset (vbi_pfc_demux *dx) _vbi_nonnull((1))
vbi_bool vbi_pfc_demux_feed (vbi_pfc_demux *dx, const uint8_t buffer[42])
vbi_bool vbi_pfc_demux_feed_frame (vbi_pfc_demux *dx, const vbi_sliced *sliced, unsigned int n_lines)
void vbi_pfc_demux_delete (vbi_pfc_demux *dx)
vbi_pfc_demuxvbi_pfc_demux_new (vbi_pgno pgno, unsigned int stream, vbi_pfc_demux_cb *callback, void *user_data)

Detailed Description

Functions to decode data transmissions in Teletext Page Function Clear packets (EN 300 708 section 4).


Typedef Documentation

typedef struct _vbi_pfc_demux vbi_pfc_demux
 

PFC demultiplexer context.

The contents of this structure are private.

Call vbi_pfc_demux_new() to allocate a PFC demultiplexer context.

typedef vbi_bool vbi_pfc_demux_cb(vbi_pfc_demux *dx, void *user_data, const vbi_pfc_block *block)
 

Parameters:
dx   PFC demultiplexer context returned by vbi_pfx_demux_new() and given to vbi_pfc_demux_feed().
user_data   User pointer given to vbi_pfc_demux_new().
block   Structure describing the received data block.

Function called by vbi_pfc_demux_feed() when a new data block is available.

Returns:
FALSE on error, will be returned by vbi_pfc_demux_feed().

Bug:
vbi_pfc_demux_feed() returns the user_data pointer as second parameter the block pointer as third parameter, but prior to version 0.2.26 this function incorrectly defined block as second and user_data as third parameter.


Function Documentation

void vbi_pfc_demux_reset ( vbi_pfc_demux * dx )
 

Parameters:
dx   PFC demultiplexer context allocated with vbi_pfc_demux_new().

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

vbi_bool vbi_pfc_demux_feed ( vbi_pfc_demux * dx,
const uint8_t buffer[42] )
 

Parameters:
dx   PFC demultiplexer context allocated with vbi_pfc_demux_new().
buffer   Teletext packet (last 42 bytes, i. e. without clock run-in and framing code), as in struct vbi_sliced.

This function takes a raw stream of Teletext packets, filters out the page and stream requested with vbi_pfc_demux_new() and assembles the data transmitted in this page in a buffer. When a data block is complete it calls the output function given to vbi_pfc_demux_new().

Returns:
FALSE if the packet contained incorrectable errors.

vbi_bool vbi_pfc_demux_feed_frame ( vbi_pfc_demux * dx,
const vbi_sliced * sliced,
unsigned int n_lines )
 

Parameters:
dx   PFC demultiplexer context allocated with vbi_pfc_demux_new().
sliced   Sliced VBI data.
n_lines   Number of lines in the sliced array.

This function works like vbi_pfc_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_pfc_demux_delete ( vbi_pfc_demux * dx )
 

Parameters:
dx   PFC demultiplexer context allocated with vbi_pfc_demux_new(), can be NULL.

Frees all resources associated with dx.

vbi_pfc_demux* vbi_pfc_demux_new ( vbi_pgno pgno,
unsigned int stream,
vbi_pfc_demux_cb * callback,
void * user_data )
 

Parameters:
pgno   Page to take PFC data from.
stream   PFC stream to be demultiplexed.
callback   Function to be called by vbi_pfc_demux_feed() when a new data block is available.
user_data   User pointer passed through to cb function.

Allocates a new Page Function Clear (ETS 300 708 section 4) demultiplexer.

Returns:
Pointer to newly allocated PFC demux context which must be freed with vbi_pfc_demux_delete() when done. NULL on failure (out of memory).


Generated at Tue Feb 26 01:33:09 2008 for ZVBI Library by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001