ZVBI Library
0.2.33
|
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_demux * | vbi_pfc_demux_new (vbi_pgno pgno, unsigned int stream, vbi_pfc_demux_cb *callback, void *user_data) |
Functions to decode data transmissions in Teletext Page Function Clear packets (EN 300 708 section 4).
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) |
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.
void vbi_pfc_demux_reset | ( | vbi_pfc_demux * | dx) |
dx | PFC demultiplexer context allocated with vbi_pfc_demux_new(). |
Resets the PFC demux context, useful for example after a channel change.
References vbi_pfc_block::application_id, _vbi_pfc_demux::bi, _vbi_pfc_demux::ci, _vbi_pfc_demux::left, _vbi_pfc_demux::n_packets, and _vbi_pfc_demux::packet.
Referenced by vbi_pfc_demux_feed().
vbi_bool vbi_pfc_demux_feed | ( | vbi_pfc_demux * | dx, |
const uint8_t | buffer[42] | ||
) |
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().
References _vbi_pfc_demux::ci, _vbi_pfc_demux::n_packets, _vbi_pfc_demux::packet, vbi_pfc_block::pgno, vbi_pfc_block::stream, vbi_pfc_demux_reset(), and vbi_unham16p().
Referenced by vbi_pfc_demux_feed_frame().
vbi_bool vbi_pfc_demux_feed_frame | ( | vbi_pfc_demux * | dx, |
const vbi_sliced * | sliced, | ||
unsigned int | n_lines | ||
) |
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
.
References vbi_sliced::data, vbi_sliced::id, and vbi_pfc_demux_feed().
void vbi_pfc_demux_delete | ( | vbi_pfc_demux * | dx) |
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 | ||
) |
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.
NULL
on failure (out of memory).