#31 video preview can't be opened multiple times on windows

open
nobody
None
5
2013-02-02
2012-06-03
klaus triendl
No

On windows, a window class is registered for the video preview (function _zbar_processor_open() in file zbar/processor/win.c).
However this class isn't unregistered in function _zbar_processor_close().

This yields the effect that the video preview can't be opened multiple times with the same processor instance (and of course makes barcode processing impossible).

Doing multiple processings with the same processor instance is very important because otherwise all the cleanup and initialization for setting up the barcode processing must be unnecessarily done again and again.

Discussion

  • Klaus, why is the separate include file needed here?

     
  • klaus triendl
    klaus triendl
    2012-06-04

    Because of struct processor_state_s that is defined in win.h, which is analogous to the posix stuff.

     
  • posix.h is included from 2 files: posix.c and x.c. In case of win.c it doesn't need a separate file. I think it would be more readable in one file. Please make a decision yourself and commit (to zbarw project).