Use https://github.com/Jeija/ZBar, adapt code to it