![]() |
Re: mbarcode
Ok I found out, pulling in the abook headers seems to drag in GTK+ headers and it all gets messy and unhappy. It may be possible, I don't know, but I'd still prefer to go Qt-only if possible.
|
Re: mbarcode
Well I've changed the openGeneric() function to try to use the hildon_mime library (which I used to use successfully in the GTK+ version of mBarcode). Unfortunately it's not working, so I've either made a mistake (which now I think about it could be that I've not setup a DBus connection) or the lib has changed.
The DBus thing will also explain why vCard handling is still not working (I write to a temp file, then get hildon_mime to open the file using its mime handlers). I'll fix this later on today. Doh! I also see that I told a lie about how the decoders are plumbed in, it looks like they still reside in separate threads rather than gst elements (now I think about it, using the gst element decoders was rather slow iirc). Therefore it should be quite simple to work out/fix the fact that the saved frame is not necessarily the one that's decoded. Onto other thoughts, I'm tempted to split up the monolithic qrcode plugin into separate plugins to handle different payload types, but not sure if it's worth it for simple and generic payloads (e.g. vcards, telephone #s, urls). The disadvantage is overhead from extra plugins, the advantage is that each barcode can be parsed and for e.g.a QR code containing a vcard, the vCard plugin could present itself, as well as a telephone number plugin, url plugin, etc. That way you'd not need to save a vCard to be able to open a URL, dial a number on it, etc. |
Re: mbarcode
Just pushed an updated version of mBarcode (and the qrcode plugin) to extras-devel. Changes:
Remembers scanned barcode history list between restarts, menu button to clear all, menu settings checkbox to enable/disable whether to remember between restarts. Menu settings numeric editor to alter the autofocus delay time. Long push on the history items opens a popup menu from which you can save (the image) or delete an item. Changed the backend so the image that is placed into the history list should be exactly the same one that was just decoded. Added feature whereby tapping on the live video window will allow you to save the last image in the memory buffer (for e.g. allowing us to debug why a barcode won't scan). QRcode plugin changes were in the backend to try to enable hildon mime opening of various filetypes, but this still doesn't seem to work (I'm working on it! If anyone has any ideas please pipe up - I have now created a dbus connection in the mainwindow class, so that shouldn't be the problem). I think that's about it, just need to integrate pythonQT so we can have Python plugins, write a "plugin writing" howto, enable decoding from a file (Open file button) and then ui should be workable (though we'd still like to look at some transparency effects, etc.) |
Re: mbarcode
sounds good.
i hope this will come to extras this year. |
Re: mbarcode
Well basically once the scan from a file button does something and the pythonQT support is in place and we work out what's wrong with the mime handling and fix that, I see no reason why it shouldn't go to Extras.
I'm ever hopeful we can get it done by the end of next week at the latest (otherwise it'll have to wait as I'm away for the best part of a month!) |
Re: mbarcode
Just tried mbarcode out. Great work!
One thing: it looks like it's supposed to open the barcode URL if a QR code specifies one, but that didn't work for me. Is there a way that others can get involved? I'd love to help with development, but I couldn't find a source code repository anywhere. |
Re: mbarcode
Quote:
Quote:
With that said, it may be that there's something else before the http:// and everything is getting passed to the uri_open function and confusing it. I was just looking at this yesterday and thinking that I ought to make sure the text is trimmed so that it starts at http:// to prevent this. Quote:
Onto my current dev thoughts, I was looking at how to hook up PythonQT yesterday, and while it looks doable, I doubt I'll get time to do this before I head off to the USA. So I was thinking it would be worth supporting external application plugins - i.e. like the existing plugin libraries (i.e. they present a button which you can click after a suitable barcode has been scanned), but using DBus calls to send the data to an external app (starting it up if necessary). I know people have been after this/interested in this for a while. I was planning on having external apps place an 'ini' file in a subdir of the current /usr/share/mbarcode/plugins directory, and then these files will be parsed at startup to see which external applications which to be added as external plugins. Content would be something along the lines of "app name, dbus call, barcode types list". I'll try to take a crack at this this afternoon/evening. Still need to write some HowTos for how to write internal plugins (and assuming I get it working, how to do the DBus stuff in your app to receive either the broadcast messages which mBarcode currently emits - since yesterday anyway, and specific external application plugin callbacks). Also thinking quite hard about having the qrcode plugin provide multiple buttons if the barcode content contains more than one handleable payload (e.g. vCard and telephone and url and etc., rather than just the first one found). Oh, and for some reason the hildonmime functions don't seem to be too happy opening things such as SMS: and vcards (*.vcf). I'm using the QDesktopServices::openUrl() function which wraps the hildonmime C functions, but it opens vCard files in the browser and ignores things like SMS. These used to work in the GTK+ version and at least opening *.vcf works in Hildon File Manager, so I need to work out why it's not working now. |
Re: mbarcode
I looked into the QR code url issue. It turns out this is because the package doesn't include the libmarcode_qrplugin.so file in /usr/share/mbarcode/plugins. I presume this is simply an error in packaging?
|
Re: mbarcode
This is working pretty good for me, thanks. I noticed my newspaper is using some proprietary bar code system called EZ code / scanlife / scanbuy
I don't know. I looked it up briefly, they make an app for most phone OS and everything is "open" enough, except they maintain their private database of codes and whatever content it links to. Anyways, it sounds pretty lame, but I thought I should mention it. These bar codes are pretty popular in Japan but not here. -edit- (bar codes in general are popular in japan, on posters and stuff i gather, i've never heard of ez code before) |
Re: mbarcode
Quote:
|
| All times are GMT. The time now is 08:47. |
vBulletin® Version 3.8.8