ZBar Bar Code Reader Library  version 0.10
img_scanner.c File Reference

Classes

struct  recycle_bucket_s
 
struct  zbar_image_scanner_s
 

Macros

#define ASSERT_POS
 
#define CACHE_CONSISTENCY
 
#define CACHE_HYSTERESIS
 
#define CACHE_PROXIMITY
 
#define CACHE_TIMEOUT
 
#define CFG(iscn, cfg)
 
#define movedelta(dx, dy)
 
#define NUM_SCN_CFGS
 
#define RECYCLE_BUCKETS
 
#define STAT(x)
 
#define TEST_CFG(iscn, cfg)
 

Typedefs

typedef struct recycle_bucket_s recycle_bucket_t
 

Functions

void _zbar_image_scanner_add_sym (zbar_image_scanner_t *iscn, zbar_symbol_t *sym)
 
zbar_symbol_t * _zbar_image_scanner_alloc_sym (zbar_image_scanner_t *iscn, zbar_symbol_type_t type, int datalen)
 
void _zbar_image_scanner_recycle_syms (zbar_image_scanner_t *iscn, zbar_symbol_t *sym)
 
static zbar_symbol_t * cache_lookup (zbar_image_scanner_t *iscn, zbar_symbol_t *sym)
 
static void cache_sym (zbar_image_scanner_t *iscn, zbar_symbol_t *sym)
 
static void dump_stats (const zbar_image_scanner_t *iscn)
 
static void quiet_border (zbar_image_scanner_t *iscn)
 
static int recycle_syms (zbar_image_scanner_t *iscn, zbar_symbol_set_t *syms)
 
static void symbol_handler (zbar_decoder_t *dcode)
 
zbar_image_scanner_t * zbar_image_scanner_create ()
 constructor. More...
 
void zbar_image_scanner_destroy (zbar_image_scanner_t *iscn)
 
void zbar_image_scanner_enable_cache (zbar_image_scanner_t *iscn, int enable)
 
const zbar_symbol_set_t * zbar_image_scanner_get_results (const zbar_image_scanner_t *iscn)
 
void zbar_image_scanner_recycle_image (zbar_image_scanner_t *iscn, zbar_image_t *img)
 
int zbar_image_scanner_set_config (zbar_image_scanner_t *iscn, zbar_symbol_type_t sym, zbar_config_t cfg, int val)
 
zbar_image_data_handler_t * zbar_image_scanner_set_data_handler (zbar_image_scanner_t *iscn, zbar_image_data_handler_t *handler, const void *userdata)
 
int zbar_scan_image (zbar_image_scanner_t *iscn, zbar_image_t *img)
 

Macro Definition Documentation

#define ASSERT_POS

Referenced by zbar_scan_image().

#define CACHE_CONSISTENCY

Referenced by cache_sym().

#define CACHE_HYSTERESIS

Referenced by cache_sym().

#define CACHE_PROXIMITY

Referenced by cache_sym().

#define CACHE_TIMEOUT

Referenced by cache_lookup().

#define CFG (   iscn,
  cfg 
)
#define movedelta (   dx,
  dy 
)

Referenced by zbar_scan_image().

#define NUM_SCN_CFGS
#define TEST_CFG (   iscn,
  cfg 
)

Referenced by symbol_handler().

Typedef Documentation

Function Documentation

void _zbar_image_scanner_add_sym ( zbar_image_scanner_t *  iscn,
zbar_symbol_t *  sym 
)
zbar_symbol_t* _zbar_image_scanner_alloc_sym ( zbar_image_scanner_t *  iscn,
zbar_symbol_type_t  type,
int  datalen 
)
inline

References RECYCLE_BUCKETS, and STAT.

Referenced by cache_sym(), qr_code_data_list_extract_text(), and symbol_handler().

Here is the caller graph for this function:

static zbar_symbol_t* cache_lookup ( zbar_image_scanner_t *  iscn,
zbar_symbol_t *  sym 
)
inlinestatic

References _zbar_image_scanner_recycle_syms(), CACHE_TIMEOUT, and zbar_symbol_s::next.

Referenced by cache_sym().

Here is the call graph for this function:

Here is the caller graph for this function:

static void cache_sym ( zbar_image_scanner_t *  iscn,
zbar_symbol_t *  sym 
)
inlinestatic

References _zbar_image_scanner_alloc_sym(), CACHE_CONSISTENCY, CACHE_HYSTERESIS, cache_lookup(), and CACHE_PROXIMITY.

Referenced by _zbar_image_scanner_add_sym().

Here is the call graph for this function:

Here is the caller graph for this function:

static void dump_stats ( const zbar_image_scanner_t *  iscn)
inlinestatic

References RECYCLE_BUCKETS, and zprintf.

Referenced by zbar_image_scanner_destroy().

Here is the caller graph for this function:

static void quiet_border ( zbar_image_scanner_t *  iscn)
inlinestatic

References zbar_scanner_flush(), and zbar_scanner_new_scan().

Referenced by zbar_scan_image().

Here is the call graph for this function:

Here is the caller graph for this function:

static int recycle_syms ( zbar_image_scanner_t *  iscn,
zbar_symbol_set_t *  syms 
)
inlinestatic

References _zbar_image_scanner_recycle_syms(), and _zbar_refcnt().

Referenced by zbar_image_scanner_recycle_image().

Here is the call graph for this function:

Here is the caller graph for this function:

void zbar_image_scanner_enable_cache ( zbar_image_scanner_t *  iscn,
int  enable 
)

References _zbar_image_scanner_recycle_syms().

Referenced by imagescanner_enable_cache(), zbar_gtk_processing_thread(), zbar_process_image(), and zbar_processor_set_active().

Here is the call graph for this function:

Here is the caller graph for this function:

const zbar_symbol_set_t* zbar_image_scanner_get_results ( const zbar_image_scanner_t *  iscn)

Referenced by _zbar_process_image(), and imagescanner_get_results().

Here is the caller graph for this function:

void zbar_image_scanner_recycle_image ( zbar_image_scanner_t *  iscn,
zbar_image_t *  img 
)
inline

References _zbar_symbol_set_free(), recycle_syms(), and STAT.

Referenced by _zbar_process_image(), imagescanner_recycle(), zbar_gtk_process_image(), and zbar_scan_image().

Here is the call graph for this function:

Here is the caller graph for this function:

int zbar_image_scanner_set_config ( zbar_image_scanner_t *  iscn,
zbar_symbol_type_t  sym,
zbar_config_t  cfg,
int  val 
)

References CFG, zbar::ZBAR_CFG_POSITION, zbar::ZBAR_CFG_X_DENSITY, zbar::ZBAR_CFG_Y_DENSITY, zbar_decoder_set_config(), and zbar::ZBAR_PARTIAL.

Referenced by imagescanner_set_config(), main(), zbar_image_scanner_create(), and zbar_processor_set_config().

Here is the call graph for this function:

Here is the caller graph for this function:

zbar_image_data_handler_t* zbar_image_scanner_set_data_handler ( zbar_image_scanner_t *  iscn,
zbar_image_data_handler_t *  handler,
const void userdata 
)

References result, and userdata.