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

zbar_symbol_type_t zbar_scanner_new_scan ( zbar_scanner_t scanner  ) 

mark start of a new scan pass. resets color to ZBAR_SPACE. also updates an associated decoder.

Returns:
any decode results flushed from the pipeline
Note:
when not using callback handlers, the return value should be checked the same as zbar_scan_y()

call zbar_scanner_flush() at least twice before calling this method to ensure no decode results are lost

Definition at line 196 of file scanner.c.

References zbar_decoder_new_scan(), ZBAR_NONE, zbar_scanner_flush(), and zbar_scanner_new_scan().

Referenced by zbar::Scanner::new_scan(), zbar_scan_image(), and zbar_scanner_new_scan().

{
    zbar_symbol_type_t edge = ZBAR_NONE;
    while(scn->y1_sign) {
        zbar_symbol_type_t tmp = zbar_scanner_flush(scn);
        if(tmp < 0 || tmp > edge)
            edge = tmp;
    }

    /* reset scanner and associated decoder */
    memset(&scn->x, 0, sizeof(zbar_scanner_t) + (void*)scn - (void*)&scn->x);
    scn->y1_thresh = scn->y1_min_thresh;
    if(scn->decoder)
        zbar_decoder_new_scan(scn->decoder);
    return(edge);
}


Generated by  Doxygen 1.6.0   Back to index