VBI decoder

Name

VBI decoder -- 

Synopsis



#define     VBI_VERSION_MAJOR
#define     VBI_VERSION_MINOR
vbi_decoder* vbi_decoder_new                (void);
void        vbi_decoder_delete              (vbi_decoder *vbi);
void        vbi_decode                      (vbi_decoder *vbi,
                                             vbi_sliced *sliced,
                                             int lines,
                                             double timestamp);
void        vbi_channel_switched            (vbi_decoder *vbi,
                                             vbi_nuid nuid);
void        vbi_teletext_set_default_region (vbi_decoder *vbi,
                                             int default_region);
void        vbi_teletext_set_level          (vbi_decoder *vbi,
                                             int level);

Description

Details

VBI_VERSION_MAJOR

#define VBI_VERSION_MAJOR 0


VBI_VERSION_MINOR

#define VBI_VERSION_MINOR 1


vbi_decoder_new ()

vbi_decoder* vbi_decoder_new                (void);

Allocate a new vbi decoding instance. This is the core structure of libzvbi.


vbi_decoder_delete ()

void        vbi_decoder_delete              (vbi_decoder *vbi);


vbi_decode ()

void        vbi_decode                      (vbi_decoder *vbi,
                                             vbi_sliced *sliced,
                                             int lines,
                                             double timestamp);

Main entry to the VBI decoder. Decodes zero or more lines of sliced VBI data, updates the decoder state and calls event handlers.

time shall advance by 1/30 to 1/25 seconds whenever calling this function. Failure to do so will be interpreted as frame dropping, which starts a resynchronization cycle, and a channel switch may be assumed which resets even more decoder state. So even if a frame did not contain any useful data this function must be called, with lines set to zero.

This is one of the few not reentrant functions, and it must never be called from an event handler.


vbi_channel_switched ()

void        vbi_channel_switched            (vbi_decoder *vbi,
                                             vbi_nuid nuid);

Call this after switching away from the channel (that is RF channel, baseband video line etc, precisely: the network) from which this context is receiving vbi data, to reset the context accordingly. The decoder attempts to detect channel switches automatically, but this is not 100 % reliable esp. without receiving and decoding Teletext or VPS.

Note the reset request is not executed until the next frame is about to be decoded, so you can still receive "old" events after calling this.

Side effects: A reset deletes all Teletext and Closed Caption pages cached. Clients may receive a VBI_EVENT_ASPECT and VBI_EVENT_NETWORK revoking a previous event. Note the possibility of sending a blank vbi_network to notify the event handler of the [autodetected] switch and the [temporary] inability to identify the new network.


vbi_teletext_set_default_region ()

void        vbi_teletext_set_default_region (vbi_decoder *vbi,
                                             int default_region);


vbi_teletext_set_level ()

void        vbi_teletext_set_level          (vbi_decoder *vbi,
                                             int level);

Deprecated.