Le Tuesday 08 July 2008 21:42:09 K?re S?rs, vous avez ?crit?: > Hi, > > On Mondayen den 7 July 2008 23:51:24 m. allan noah wrote: > > ok guys- take 4: > > > > Six general points for sane 1.1.x: > > - no changes to function calls > > - no changes to structures > > - 1.0 backends forward compatible with 1.1 > > - improve backend consistency > > - support more advanced scanners > > - improve cooperation with modern system services > > > > Specific proposals: > > > > 1. Consistent, translatable option groups: > > > > 'Standard' = source, mode, resolution > > 'Geometry' = x/y and paper size params > > 'Enhancement' = bright/gamma/contrast/thresh, rif, halftone, etc > > 'Advanced' = compression, calibration, feed controls, etc > > 'Sensors' = an option for every hardware button or sensor > > > > 2. Two new well-known options for ADF paper alignment: page-width and > > page-height > > > > 3. Two new SANE_STATUS values: HW_LOCKED and WARMING_UP > > > > 4. Nine new SANE_FRAME values: TEXT, JPEG, G31D, G32D, G42D, IR, RGBI, > > GRAYI, and XML > > > > 5. Several new well-known options for buttons and sensors. Backends > > should use the closest one to the meaning of the label on the scanner > > or the button's use in the manufacturer's software. Backends may also > > use a different name if no suitable one is found. > > > > well-known buttons: > > scan, email, fax, copy, pdf, cancel > > > > well-known sensors: > > page-loaded, cover-open > > > > 6. Clarify standard text for SANE_CAP_HARD_SELECT to indicate it > > should be used for polling the current state of hardware sensors and > > buttons, with a refresh interval <= 1 sec. > > I haven't seen a discussion about adding an optional calback mechanism for > this (I might have missed it). Would it be feasible? I always try to avoid > polling if possible. > If it is not easy/fast to implement, it is no biggie for me :) > > > 7. New DBGBM macro for bitmask debugging output (bit # listed below): > > > > 1 DBG_LVL_ERROR (errors only) > > 2 DBG_LVL_FUNC (function tracing 'enter xxx()' or 'exit xxx()') > > 3 DBG_LVL_DETAIL ('trying action X' or 'action succeeded' etc) > > 4 DBG_LVL_OPTION (any sane_option parsing code) > > 5 DBG_LVL_CALIB (calibration info) > > 6 DBG_LVL_IMAGE (dump image data read from scanner) > > 7 DBG_LVL_DATA (dump data packets read from scanner, other than > > image or cal?) > > 8 DBG_LVL_FILE (write internal data files to disk from within > > backend?) > > > > 8. Add common configuration reading function in sanei_* so that new or > > maintained backends can benefit from it. Wholesale config file > > restructuring? > > > > 9. Require backends to always accept the sanei device name as an > > alternative to the backend generated name. > > > > Most of this stuff is done or in progress, except I have not used tex > > in years, so it's going to take me a little while to update the > > standard, unless someone else steps up. And #7 needs some programmer > > cycles- volunteers? If we can get those (and stef's sanei_config > > improvements) into cvs, then we can take a look for backends that > > might need updates, particularly on #9. > > > > allan > > -- > > "The truth is an offense, but not a sin" > > Is anybody updating the test backend with the new features? I needed to add > a gamma table stub to the test backend to be able to implement gammatable > support in libksane. > > -- > K?re S?rs
Hello, the test backend had been updated some time ago, and provides a pnm:locked and pnm:warmup backends that let one test for the new status that may be returned by a backend. I have an experimental version of libkscan that supports the new SANE_STATUS_WARMING_UP by adding the lines after sane_start() in acquire_data: #ifndef SANE_CAP_ALWAYS_SETTABLE /* should better be done by detecting SANE's version in configure and providing a HAS_SANE_1_1 */ /* warming-up handling */ if( sane_stat == SANE_STATUS_WARMING_UP ) { do { /* TODO some progress/ waiting dialog */ /* re-read to check if warming up is done */ sane_stat = sane_start( scanner_handle ); } while (sane_stat == SANE_STATUS_WARMING_UP); } #endif Regards, Stef