Main Page | Modules | Data Structures | Directories | Data Fields | Related Pages | Examples

Extended Data Service demultiplexer
[Low Level Decoding]

Separating XDS data from a Closed Caption stream (EIA 608). More...

Data Structures

struct  vbi_xds_packet
 XDS Packet. A pointer to this structure is passed to the XDS demux callback. More...
struct  _vbi_xds_subpacket
struct  _vbi_xds_demux

Defines

#define VBI_XDS_MAX_CLASSES   (VBI_XDS_CLASS_UNDEFINED + 1)
#define VBI_XDS_MAX_SUBCLASSES   (0x18)

Typedefs

typedef unsigned int vbi_xds_subclass
 Generic XDS subclass. You must cast to the appropriate subclass type depending on the XDS class.
typedef _vbi_xds_demux vbi_xds_demux
 XDS demultiplexer.
typedef vbi_bool vbi_xds_demux_cb (vbi_xds_demux *xd, const vbi_xds_packet *xp, void *user_data)

Enumerations

enum  vbi_xds_class {
  VBI_XDS_CLASS_CURRENT = 0x00,
  VBI_XDS_CLASS_FUTURE,
  VBI_XDS_CLASS_CHANNEL,
  VBI_XDS_CLASS_MISC,
  VBI_XDS_CLASS_PUBLIC_SERVICE,
  VBI_XDS_CLASS_RESERVED,
  VBI_XDS_CLASS_UNDEFINED
}
 XDS packet class. XDS data is transmitted in packets. Each packet belongs to one of seven classes.
enum  vbi_xds_subclass_program {
  VBI_XDS_PROGRAM_ID = 0x01,
  VBI_XDS_PROGRAM_LENGTH,
  VBI_XDS_PROGRAM_NAME,
  VBI_XDS_PROGRAM_TYPE,
  VBI_XDS_PROGRAM_RATING,
  VBI_XDS_PROGRAM_AUDIO_SERVICES,
  VBI_XDS_PROGRAM_CAPTION_SERVICES,
  VBI_XDS_PROGRAM_CGMS,
  VBI_XDS_PROGRAM_ASPECT_RATIO,
  VBI_XDS_PROGRAM_DESCRIPTION_BEGIN = 0x10,
  VBI_XDS_PROGRAM_DESCRIPTION_END = 0x18
}
 VBI_XDS_CLASS_CURRENT and VBI_XDS_CLASS_FUTURE subclass.
enum  vbi_xds_subclass_channel {
  VBI_XDS_CHANNEL_NAME = 0x01,
  VBI_XDS_CHANNEL_CALL_LETTERS,
  VBI_XDS_CHANNEL_TAPE_DELAY
}
 VBI_XDS_CLASS_CHANNEL subclass.
enum  vbi_xds_subclass_misc {
  VBI_XDS_MISC_TIME_OF_DAY = 0x01,
  VBI_XDS_MISC_IMPULSE_CAPTURE_ID,
  VBI_XDS_MISC_SUPPLEMENTAL_DATA_LOCATION,
  VBI_XDS_MISC_LOCAL_TIME_ZONE
}
 VBI_XDS_CLASS_MISC subclass.

Functions

void _vbi_xds_packet_dump (const vbi_xds_packet *xp, FILE *fp)
void vbi_xds_demux_reset (vbi_xds_demux *xd)
vbi_bool vbi_xds_demux_feed (vbi_xds_demux *xd, const uint8_t buffer[2])
void vbi_xds_demux_delete (vbi_xds_demux *xd)
vbi_xds_demuxvbi_xds_demux_new (vbi_xds_demux_cb *callback, void *user_data) vbi_alloc
void _vbi_xds_demux_destroy (vbi_xds_demux *xd)
vbi_bool _vbi_xds_demux_init (vbi_xds_demux *xd, vbi_xds_demux_cb *callback, void *user_data)

Detailed Description

Separating XDS data from a Closed Caption stream (EIA 608).


Typedef Documentation

typedef struct _vbi_xds_demux vbi_xds_demux
 

XDS demultiplexer.

The contents of this structure are private. Call vbi_xds_demux_new() to allocate a XDS demultiplexer.

typedef vbi_bool vbi_xds_demux_cb(vbi_xds_demux *xd, const vbi_xds_packet *xp, void *user_data)
 

Parameters:
xd XDS demultiplexer context allocated with vbi_xds_demux_new().
user_data User data pointer given to vbi_xds_demux_new().
xp Pointer to the received XDS data packet.
The XDS demux calls a function of this type when an XDS packet has been completely received, all bytes have correct parity and the packet checksum is correct. Other packets are discarded.

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


Function Documentation

void vbi_xds_demux_reset vbi_xds_demux xd  ) 
 

Parameters:
xd XDS demultiplexer context allocated with vbi_xds_demux_new().
Resets the XDS demux, useful for example after a channel change.

Since:
0.2.16

vbi_bool vbi_xds_demux_feed vbi_xds_demux xd,
const uint8_t  buffer[2]
 

Parameters:
xd XDS demultiplexer context allocated with vbi_xds_demux_new().
buffer Closed Caption character pair, as in struct vbi_sliced.
This function takes two successive bytes of a raw Closed Caption stream, filters out XDS data and calls the output function given to vbi_xds_demux_new() when a new packet is complete.

You should feed only data from NTSC line 284.

Returns:
FALSE if the buffer contained parity errors.
Since:
0.2.16

void vbi_xds_demux_delete vbi_xds_demux xd  ) 
 

Parameters:
xd XDS demultiplexer context allocated with vbi_xds_demux_new(), can be NULL.
Frees all resources associated with xd.

Since:
0.2.16

vbi_xds_demux* vbi_xds_demux_new vbi_xds_demux_cb callback,
void *  user_data
 

Parameters:
callback Function to be called by vbi_xds_demux_feed() when a new packet is available.
user_data User pointer passed through to callback function.
Allocates a new Extended Data Service (EIA 608) demultiplexer.

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


Generated on Wed Jun 8 18:46:00 2005 for ZVBI Library by  doxygen 1.4.0