zbar::Processor Class Reference

high-level self-contained image processor. More...

List of all members.

Public Member Functions

 Processor (bool threaded=true, const char *video_device="", bool enable_display=true)
 constructor.
 operator zbar_processor_t * ()
 cast to C processor object.
void init (const char *video_device="", bool enable_display=true)
 opens a video input device and/or prepares to display output.
void set_handler (Image::Handler &handler)
 setup result handler callback.
int set_config (zbar_symbol_type_t symbology, zbar_config_t config, int value)
 set config for indicated symbology (0 for all) to specified value.
int set_config (std::string cfgstr)
 set config parsed from configuration string.
bool is_visible ()
 retrieve the current state of the ouput window.
void set_visible (bool visible=true)
 show or hide the display window owned by the library.
void set_active (bool active=true)
 control the processor in free running video mode.
const SymbolSet get_results () const
 retrieve decode results for last scanned image.
int user_wait (int timeout=FOREVER)
 wait for input to the display window from the user.
void process_one (int timeout=FOREVER)
 process from the video stream until a result is available.
void process_image (Image &image)
 process the provided image for barcodes.
Processoroperator<< (Image &image)
 process the provided image for barcodes.
void force_format (unsigned long input_format, unsigned long output_format)
 force specific input and output formats for debug/testing.
void force_format (std::string &input_format, std::string &output_format)
 force specific input and output formats for debug/testing.
void request_size (int width, int height)
 request a preferred size for the video image from the device.
void request_interface (int version)
 request a preferred driver interface version for debug/testing.
void request_iomode (int iomode)
 request a preferred I/O mode for debug/testing.

Static Public Attributes

static const int FOREVER
 value to pass for no timeout.


Detailed Description

high-level self-contained image processor.

processes video and images for barcodes, optionally displaying images to a library owned output window


Member Function Documentation

void zbar::Processor::init ( const char *  video_device = "",
bool  enable_display = true 
) [inline]

opens a video input device and/or prepares to display output.

see zbar_processor_init()

void zbar::Processor::set_handler ( Image::Handler handler  )  [inline]

setup result handler callback.

see zbar_processor_set_data_handler()

int zbar::Processor::set_config ( zbar_symbol_type_t  symbology,
zbar_config_t  config,
int  value 
) [inline]

set config for indicated symbology (0 for all) to specified value.

See also:
zbar_processor_set_config()
Since:
0.4

int zbar::Processor::set_config ( std::string  cfgstr  )  [inline]

set config parsed from configuration string.

See also:
zbar_processor_parse_config()
Since:
0.4

bool zbar::Processor::is_visible (  )  [inline]

retrieve the current state of the ouput window.

see zbar_processor_is_visible()

void zbar::Processor::set_visible ( bool  visible = true  )  [inline]

show or hide the display window owned by the library.

see zbar_processor_set_visible()

void zbar::Processor::set_active ( bool  active = true  )  [inline]

control the processor in free running video mode.

see zbar_processor_set_active()

const SymbolSet zbar::Processor::get_results (  )  const [inline]

retrieve decode results for last scanned image.

See also:
zbar_processor_get_results()
Since:
0.10

int zbar::Processor::user_wait ( int  timeout = FOREVER  )  [inline]

wait for input to the display window from the user.

see zbar_processor_user_wait()

void zbar::Processor::process_one ( int  timeout = FOREVER  )  [inline]

process from the video stream until a result is available.

see zbar_process_one()

void zbar::Processor::process_image ( Image image  )  [inline]

process the provided image for barcodes.

see zbar_process_image()

Processor& zbar::Processor::operator<< ( Image image  )  [inline]

process the provided image for barcodes.

see zbar_process_image()

void zbar::Processor::force_format ( unsigned long  input_format,
unsigned long  output_format 
) [inline]

force specific input and output formats for debug/testing.

see zbar_processor_force_format()

void zbar::Processor::force_format ( std::string &  input_format,
std::string &  output_format 
) [inline]

force specific input and output formats for debug/testing.

see zbar_processor_force_format()

void zbar::Processor::request_size ( int  width,
int  height 
) [inline]

request a preferred size for the video image from the device.

see zbar_processor_request_size()

Since:
0.6

void zbar::Processor::request_interface ( int  version  )  [inline]

request a preferred driver interface version for debug/testing.

see zbar_processor_request_interface()

Since:
0.6

void zbar::Processor::request_iomode ( int  iomode  )  [inline]

request a preferred I/O mode for debug/testing.

see zbar_processor_request_iomode()

Since:
0.7


The documentation for this class was generated from the following file:

SourceForge.net Logo
spadix@users.sourceforge.net

Copyright 2008-2010 (c) Jeff Brown

This documentation is part of the ZBar Barcode Reader; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.