ZBar is an open source software suite for reading bar codes from various sources, including webcams. As its development stopped in 2012, I took the task of keeping it updated with the V4L2 API. This is the main repository for it. There's a clone at at LinuxTV.org, and another one at gitlab.
The previous implementation of the Python wrapper around the GTK widget was written for Python 2 and GTK 2.
Python 2 has been EOL for more than two years, but the widget is still very interesting.
Also, the way to integrate GTK and Python has changed a lot during the years.
So, the ZBarGtk widget type is registered automatically by gi, and the only needed step in the bindings is creating and returning the widget somehow.
I also implemented the request video size functionality through new attributes: video-width and video-height.
The only feature the Python wrapper is missing is the possibility to scan a GdkPixbuf, because I could not find a way to register a new method to the __gi__.ZBarGtk type without reimplementing it completely.
Please notice that I have sent this code to Tails, but it is missing the whole licensing comment. The reason is that, while git detects it as a series of changes on pygtk/zbargtkmodule.c, it actually is a complete rewritten from scratch.
In any case, I am the author also of that code.
The previous implementation of the Python wrapper around the GTK widget was written for Python 2 and GTK 2.
Python 2 has been EOL for more than two years, but the widget is still very interesting.
Also, the way to integrate GTK and Python has changed a lot during the years.
So, the
ZBarGtk
widget type is registered automatically bygi
, and the only needed step in the bindings is creating and returning the widget somehow.I also implemented the request video size functionality through new attributes:
video-width
andvideo-height
.The only feature the Python wrapper is missing is the possibility to scan a
GdkPixbuf
, because I could not find a way to register a new method to the__gi__.ZBarGtk
type without reimplementing it completely.Please notice that I have sent this code to Tails, but it is missing the whole licensing comment. The reason is that, while
git
detects it as a series of changes onpygtk/zbargtkmodule.c
, it actually is a complete rewritten from scratch. In any case, I am the author also of that code.