ZBar Bar Code Reader Library  version 0.10
zbar::Processor Class Reference

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

Collaboration diagram for zbar::Processor:

Public Member Functions

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

Static Public Attributes

static const int FOREVER
 value to pass for no timeout. More...
 

Private Attributes

zbar_processor_t_processor
 

Detailed Description

high-level self-contained image processor.

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

Constructor & Destructor Documentation

zbar::Processor::Processor ( bool  threaded = true,
const char *  video_device = "",
bool  enable_display = true 
)
inline

constructor.

References _processor, init(), test_pygtk::video_device, and zbar::zbar_processor_create().

Here is the call graph for this function:

zbar::Processor::~Processor ( )
inline

References _processor, and zbar::zbar_processor_destroy().

Here is the call graph for this function:

Member Function Documentation

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()

References _processor, zbar::throw_exception(), and zbar::zbar_processor_force_format().

Here is the call graph for this function:

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()

References _processor, zbar::throw_exception(), and zbar::zbar_processor_force_format().

Here is the call graph for this function:

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

retrieve decode results for last scanned image.

See also
zbar_processor_get_results()
Since
0.10

References _processor, and zbar::zbar_processor_get_results().

Here is the call graph for this function:

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()

References _processor, zbar::throw_exception(), test_pygtk::video_device, and zbar::zbar_processor_init().

Referenced by Processor().

Here is the call graph for this function:

Here is the caller graph for this function:

bool zbar::Processor::is_visible ( )
inline

retrieve the current state of the ouput window.

see zbar_processor_is_visible()

References _processor, zbar::throw_exception(), and zbar::zbar_processor_is_visible().

Here is the call graph for this function:

zbar::Processor::operator zbar_processor_t * ( )
inline

cast to C processor object.

References _processor.

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

process the provided image for barcodes.

see zbar_process_image()

References process_image().

Here is the call graph for this function:

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

process the provided image for barcodes.

see zbar_process_image()

References _processor, zbar::throw_exception(), and zbar::zbar_process_image().

Referenced by operator<<().

Here is the call graph for this function:

Here is the caller graph for this function:

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

process from the video stream until a result is available.

see zbar_process_one()

References _processor, zbar::throw_exception(), and zbar::zbar_process_one().

Here is the call graph for this function:

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

References _processor, and zbar::zbar_processor_request_interface().

Here is the call graph for this function:

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

References _processor, zbar::throw_exception(), and zbar::zbar_processor_request_iomode().

Here is the call graph for this function:

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

References _processor, and zbar::zbar_processor_request_size().

Here is the call graph for this function:

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

control the processor in free running video mode.

see zbar_processor_set_active()

References _processor, zbar::throw_exception(), and zbar::zbar_processor_set_active().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

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

References _processor, and zbar::zbar_processor_set_config().

Here is the call graph for this function:

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

set config parsed from configuration string.

See also
zbar_processor_parse_config()
Since
0.4

References _processor, and zbar::zbar_processor_parse_config().

Here is the call graph for this function:

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

setup result handler callback.

see zbar_processor_set_data_handler()

References _processor, and zbar::zbar_processor_set_data_handler().

Here is the call graph for this function:

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

show or hide the display window owned by the library.

see zbar_processor_set_visible()

References _processor, zbar::throw_exception(), read_one::visible, and zbar::zbar_processor_set_visible().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

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

wait for input to the display window from the user.

see zbar_processor_user_wait()

References _processor, zbar::throw_exception(), and zbar::zbar_processor_user_wait().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

const int zbar::Processor::FOREVER
static

value to pass for no timeout.


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