lubo / zxinglight

A simple wrapper for ZXing C++
MIT License
8 stars 3 forks source link

Expose "multi" as an API option. #6

Closed kousu closed 5 years ago

kousu commented 5 years ago

ZXing has multiple detectors available. The two main ones, judging from their own CLI, are GenericMultipleBarcodeReader and MultiFormatReader.

On my system, GenericMultipleBarcodeReader is crashing (https://github.com/lubo/zxinglight/issues/5), and anyway most of the time you don't need it, and it probably is less reliable or quick than just searching for a single barcode.

kousu commented 5 years ago

Squashed and tested.

I discovered that the memory leak wasn't actually a memory leak; the tests caught that, in fact. Ref<Reader> must be an auto_ptr.

lubo commented 5 years ago

I've rebased and changed the formatting more to my liking. Hope you don't mind. :)