ZVBI Library  0.2.42
Functions
Basic types

Functions

void vbi_log_on_stderr (vbi_log_mask level, const char *context, const char *message, void *user_data)
 
void vbi_set_log_fn (vbi_log_mask mask, vbi_log_fn *log_fn, void *user_data)
 
void vbi_version (unsigned int *major, unsigned int *minor, unsigned int *micro)
 
enum  vbi_log_mask {
  VBI_LOG_ERROR = 1 << 3,
  VBI_LOG_WARNING = 1 << 4,
  VBI_LOG_NOTICE = 1 << 5,
  VBI_LOG_INFO = 1 << 6,
  VBI_LOG_DEBUG = 1 << 7,
  VBI_LOG_DRIVER = 1 << 8,
  VBI_LOG_DEBUG2 = 1 << 9,
  VBI_LOG_DEBUG3 = 1 << 10
}
 
typedef void vbi_log_fn(vbi_log_mask level, const char *context, const char *message, void *user_data)
 
vbi_log_fn vbi_log_on_stderr
 

Detailed Description

Enumeration Type Documentation

Enumerator
VBI_LOG_ERROR 

External error causes, for example lack of memory.

VBI_LOG_WARNING 

Invalid parameters and similar problems which suggest a bug in the application using the library.

VBI_LOG_NOTICE 

Causes of possibly undesired results, for example when a data service cannot be decoded with the current video standard setting.

VBI_LOG_INFO 

Progress messages.

VBI_LOG_DEBUG 

Information useful to debug the library.

VBI_LOG_DRIVER 

Driver responses (strace). Not implemented yet.

VBI_LOG_DEBUG2 

More detailed debugging information.

Function Documentation

void vbi_log_on_stderr ( vbi_log_mask  level,
const char *  context,
const char *  message,
void *  user_data 
)

Log function printing messages on standard output.

Since
0.2.22
Examples:
examples/rawout.c, and examples/wss.c.
void vbi_set_log_fn ( vbi_log_mask  mask,
vbi_log_fn *  log_fn,
void *  user_data 
)
Parameters
maskWhich kind of information to log. Can be 0.
log_fnThis function is called with log messages. Consider vbi_log_on_stderr(). Can be NULL to disable logging.
user_dataUser pointer passed through to the log_fn function.

Various library functions can print warnings, errors and information useful to debug the library. With this function you can enable these messages and designate a function to print them.

This function enables logging globally. You can also call the set_log_fn() function of individual modules to reduce the scope or redirect messages from that module to another log function.

Note
The number of contents of messages may change in the future.
Since
0.2.22
Examples:
examples/rawout.c, and examples/wss.c.
void vbi_version ( unsigned int *  major,
unsigned int *  minor,
unsigned int *  micro 
)
Parameters
majorStore major number here, can be NULL.
minorStore minor number here, can be NULL.
microStore micro number here, can be NULL.

Returns the library version defined in the libzvbi.h header file when the library was compiled.

Since
0.2.5