Main Page   Modules   Data Structures   Data Fields   Related Pages   Examples  

DVB VBI demultiplexer

Separating VBI data from a DVB PES stream (EN 301 472, EN 301 775). More...

Typedefs

typedef struct _vbi_dvb_demux vbi_dvb_demux
 DVB VBI demultiplexer. More...

typedef vbi_bool vbi_dvb_demux_cb (vbi_dvb_demux *dx, void *user_data, const vbi_sliced *sliced, unsigned int sliced_lines, int64_t pts)

Functions

void vbi_dvb_demux_reset (vbi_dvb_demux *dx)
 Resets DVB VBI demux. More...

unsigned int vbi_dvb_demux_cor (vbi_dvb_demux *dx, vbi_sliced *sliced, unsigned int sliced_lines, int64_t *pts, const uint8_t **buffer, unsigned int *buffer_left)
 DVB VBI demux coroutine. More...

vbi_bool vbi_dvb_demux_feed (vbi_dvb_demux *dx, const uint8_t *buffer, unsigned int buffer_size)
 Feeds DVB VBI demux with data. More...

void vbi_dvb_demux_delete (vbi_dvb_demux *dx)
 Deletes DVB VBI demux. More...

vbi_dvb_demuxvbi_dvb_pes_demux_new (vbi_dvb_demux_cb *callback, void *user_data)
 Allocates DVB VBI demux. More...


Detailed Description

Separating VBI data from a DVB PES stream (EN 301 472, EN 301 775).


Typedef Documentation

typedef struct _vbi_dvb_demux vbi_dvb_demux
 

DVB VBI demultiplexer.

The contents of this structure are private. Call vbi_dvb_pes_demux_new() to allocate a DVB demultiplexer.

typedef vbi_bool vbi_dvb_demux_cb(vbi_dvb_demux *dx, void *user_data, const vbi_sliced *sliced, unsigned int sliced_lines, int64_t pts)
 

Parameters:
dx   DVB demultiplexer context allocated with vbi_dvb_pes_demux_new().
user_data   User data pointer given to vbi_dvb_pes_demux_new().
sliced   Pointer to demultiplexed sliced data.
sliced_lines   Number of lines in the sliced array.
pts   Presentation Time Stamp associated with the first sliced line.

The vbi_dvb_demux_feed() function calls a function of this type when a new frame of sliced data is complete.


Function Documentation

void vbi_dvb_demux_reset ( vbi_dvb_demux * dx )
 

Resets DVB VBI demux.

Parameters:
dx   DVB demultiplexer context allocated with vbi_dvb_pes_demux_new().

Resets the DVB demux to the initial state as after vbi_dvb_pes_demux_new(), useful for example after a channel change.

Since:
0.2.10

unsigned int vbi_dvb_demux_cor ( vbi_dvb_demux * dx,
vbi_sliced * sliced,
unsigned int sliced_lines,
int64_t * pts,
const uint8_t ** buffer,
unsigned int * buffer_left )
 

DVB VBI demux coroutine.

Parameters:
dx   DVB demultiplexer context allocated with vbi_dvb_pes_demux_new().
sliced   Demultiplexed sliced data will be stored here. You must not change sliced and sliced_lines in successive calls until a frame is complete (i.e. the function returns a value > 0).
sliced_lines   At most this number of sliced lines will be stored at sliced.
pts   If not NULL the Presentation Time Stamp associated with the first line of the demultiplexed frame will be stored here.
buffer   *buffer points to DVB PES data, will be incremented by the number of bytes read from the buffer. This pointer need not align with packet boundaries.
buffer_left   *buffer_left is the number of bytes left in buffer, will be decremented by the number of bytes read. *buffer_left need not align with packet size. The packet filter works faster with larger buffers. When you read from an MPEG file, mapping the file into memory and passing pointers to the mapped data will be fastest.

This function takes an arbitrary number of DVB PES data bytes, filters out PRIVATE_STREAM_1 packets, filters out valid VBI data units, converts them to vbi_sliced format and stores the sliced data at sliced.

Returns:
The number of sliced lines stored at sliced when a frame is complete, 0 if more data is needed (*buffer_left is 0) or the data contained errors.

Bug:
Demultiplexing of raw VBI data is not supported yet, raw data will be discarded.

Since:
0.2.10

vbi_bool vbi_dvb_demux_feed ( vbi_dvb_demux * dx,
const uint8_t * buffer,
unsigned int buffer_size )
 

Feeds DVB VBI demux with data.

Parameters:
dx   DVB demultiplexer context allocated with vbi_dvb_pes_demux_new().
buffer   DVB PES data, need not align with packet boundaries.
buffer_size   Number of bytes in buffer, need not align with packet size. The packet filter works faster with larger buffers.

This function takes an arbitrary number of DVB PES data bytes, filters out PRIVATE_STREAM_1 packets, filters out valid VBI data units, converts them to vbi_sliced format and calls the vbi_dvb_demux_cb function given to vbi_dvb_pes_demux_new() when a new frame is complete.

Returns:
FALSE if the data contained errors.

Bug:
Demultiplexing of raw VBI data is not supported yet, raw data will be discarded.

Since:
0.2.10

void vbi_dvb_demux_delete ( vbi_dvb_demux * dx )
 

Deletes DVB VBI demux.

Parameters:
dx   DVB demultiplexer context allocated with vbi_dvb_pes_demux_new(), can be NULL.

Frees all resources associated with dx.

Since:
0.2.10

vbi_dvb_demux* vbi_dvb_pes_demux_new ( vbi_dvb_demux_cb * callback,
void * user_data )
 

Allocates DVB VBI demux.

Parameters:
callback   Function to be called by vbi_dvb_demux_demux() when a new frame is available.
user_data   User pointer passed through to callback function.

Allocates a new DVB VBI (EN 301 472, EN 301 775) demultiplexer taking a PES stream as input.

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

Since:
0.2.10


Generated at Sun May 28 21:44:34 2006 for ZVBI Library by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001