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

int zbar_processor_set_active ( zbar_processor_t processor,
int  active 

control the processor in free running video mode. only works if video input is initialized. if threading is in use, scanning will occur in the background, otherwise this is only useful wrapping calls to zbar_processor_user_wait(). if the library output window is visible, video display will be enabled.

Definition at line 588 of file processor.c.

References ZBAR_ERR_INVALID, zbar_image_scanner_enable_cache(), zbar_processor_set_active(), zbar_video_enable(), and zbar_window_draw().

Referenced by zbar::Processor::set_active(), zbar_process_one(), zbar_processor_init(), and zbar_processor_set_active().


    int rc;
    if(!proc->video) {
        rc = err_capture(proc, SEV_ERROR, ZBAR_ERR_INVALID, __func__,
                         "video input not initialized");
        goto done;

    zbar_image_scanner_enable_cache(proc->scanner, active);

    rc = zbar_video_enable(proc->video, active);
    if(!rc) {
        proc->streaming = active;
        rc = _zbar_processor_enable(proc);
        err_copy(proc, proc->video);

    if(!proc->streaming && proc->window) {
        if(zbar_window_draw(proc->window, NULL) && !rc)
            rc = err_copy(proc, proc->window);



Generated by  Doxygen 1.6.0   Back to index