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

void zbar_image_scanner_recycle_image ( zbar_image_scanner_t scanner,
zbar_image_t image 
) [inline]

remove any previously decoded results from the image scanner and the specified image. somewhat more efficient version of zbar_image_set_symbols(image, NULL) which may retain memory for subsequent decodes

Since:
0.10

Definition at line 184 of file img_scanner.c.

References zbar_image_scanner_recycle_image().

Referenced by zbar::ImageScanner::recycle_image(), zbar_image_scanner_recycle_image(), and zbar_scan_image().

{
    zbar_symbol_set_t *syms = iscn->syms;
    if(syms && syms->refcnt) {
        if(recycle_syms(iscn, syms)) {
            STAT(iscn_syms_inuse);
            iscn->syms = NULL;
        }
        else
            STAT(iscn_syms_recycle);
    }

    syms = img->syms;
    img->syms = NULL;
    if(syms && recycle_syms(iscn, syms)) {
        STAT(img_syms_inuse);
        syms = iscn->syms;
    }
    else if(syms) {
        STAT(img_syms_recycle);

        /* select one set to resurrect, destroy the other */
        if(iscn->syms) {
            _zbar_symbol_set_free(syms);
            syms = iscn->syms;
        }
        else
            iscn->syms = syms;
    }
}


Generated by  Doxygen 1.6.0   Back to index