Logo Search packages:      
Sourcecode: zbar version File versions  Download package

zbar_processor_t* zbar_processor_create ( int  threaded  ) 

constructor. if threaded is set and threading is available the processor will spawn threads where appropriate to avoid blocking and improve responsiveness

Definition at line 269 of file processor.c.

References zbar_image_scanner_create(), and zbar_processor_create().

Referenced by zbar::Processor::Processor(), and zbar_processor_create().

{
    zbar_processor_t *proc = calloc(1, sizeof(zbar_processor_t));
    if(!proc)
        return(NULL);
    err_init(&proc->err, ZBAR_MOD_PROCESSOR);

    proc->scanner = zbar_image_scanner_create();
    if(!proc->scanner) {
        free(proc);
        return(NULL);
    }

    proc->threaded = !_zbar_mutex_init(&proc->mutex) && threaded;
    _zbar_processor_init(proc);
    return(proc);
}


Generated by  Doxygen 1.6.0   Back to index