![]() |
Re: mbarcode
Quote:
I'm also going to add the option to use the shutter button to focus then perform processing (for e.g. 3s after the button is pressed), which should save cpu cycles and make the normal display smoother (no need to have the decoder threads running in the bg all the time.) Quote:
This is especially odd as the plugin I wanted to use was the plain "display text" one, which should be pretty lightweight. I need to look into this as it's not acceptable to have delays like this. |
Re: mbarcode
The graphical response missing is probably due to something set up wrongly in the GUI. Either in the custom delegate used for painting, or just in the selection settings for the table view.
If there is a delay in other plugins than Informed Individual, then there is something seriously wrong. Maybe there is some lag after closing the pipeline? I'll try to look into it when I have the time, as well. |
Re: mbarcode
Quote:
|
Re: mbarcode
If I remember correctly, the network requests made in Qt are done in a separate thread. That's why you need to connect a slot for the network reply, whenever that returns. The problem with the Informed Individual plugin is that it currently does not give any user feedback before it receives a network reply, but it does not block the GUI, though.
In other words, there is no GUI-blockage when you hit the Informed Individual plugin. Just try to go back to scanning after pressing the plugin button. On the other hand, making the clickAction() of a plugin into a threaded signal/slot system might be useful to avoid plugins locking up the whole application. |
Re: mbarcode
As an aside, I've just pushed the skeleton of a plugin to handle Python plugins. I need to push PythonQT to extras-devel asap and then work out the structure of Python plugins and fill in the useful code, but I have at least started (finally! ;))
The reason for using a plugin to host multiple plugins is to stop it being necessary for people to include the additional PythonQT startup overhead and dependencies unless they are using a Python plugin. Anyway, I'm working on it :) |
Re: mbarcode
Just looking at the code to add in the alternative shutter button action and wondering how much of the startup time is due to using OpenGL?
Dragly have you done any benchmarking? Any other thoughts about getting a functional UI up faster? As another aside, I wonder if we should load the plugins in a thread/in the bg somehow to prevent the slowdown that will probably occur when they are loaded the first time a barcode is scanned? |
Re: mbarcode
After installing Mbarcode to my N900 the camera would not work. I only get a errormessage internal error, camera will be closed.
Had to uninstall mbarcode and addons. |
Re: mbarcode
Quote:
|
Re: mbarcode
Quote:
If it really does seem to be linked to mBarcode, I'd be interested to see the output of the camera app from the command line when you try to run it, and also the dmesg and DSP logs. |
Re: mbarcode
Quote:
Edit: OTOH it may use OpenGL itself, in which case I won't bother :) - I'll look and see! No, it doesn't use OpenGL (so there's still the chance it will be quicker). Instead it uses the overlay layer provided by the framebuffer hardware. I suppose it should be possible to encapsulate the overlay stuff in a class and then be able to easily swap between OpenGL and framebuffer overlay. The FCamera people have wrapped the overlay stuff in a class - see OverlayWidget.cpp in the FCamera Garage project. |
Re: mbarcode
Ok, I've just pushed two updates, both of which could probably do with some more C++ polishing.
The first is to move the plugin searching and loading to a thread, so that there is no time spent loading them when the first results page is displayed. The thread runs in the bg once the UI has been brought up and the UI will block for the thread if somehow a barcode is scanned straight away. The second is to give an option to use the shutter button either as focus/save image with continuous scanning, or as focus/scan with scanning occurring for 3s after the button is pressed. This means the normal display is smoother most of the time (as no scanning is taking place) and should reduce CPU usage while things aren't being scanned. I've not added a way to change the scan time, but we should really do that, and I've added a rather nasty looking Hildon message bar to tell us that it's scanning, which should probably be changed to something that looks cool, like a Cylon-styke blip moving along the "line up here" bar in the middle of the screen. |
Re: mbarcode
I'll take a look at making the overlay/normal display interface generic tomorrow so we can test using openGL vs. fb overlays.
|
Re: mbarcode
I've got the non-openGL interface more or less up and running, but without overlays.
Apparently overlays are not actually required and it should be possible to draw directly ontop of the xvimagesink, but this only works sometimes, and the rest of the time the xvimagesink video stream takes over the whole window. Not sure what the problem is here, but I'll get to the bottom of it eventually. While doing this, I've been thinking that really rather than a splash screen it would probably be better to open the application with the history list showing and then load the GStreamer pipeline in the background. I'll have a look at how to do this later on this evening. I also need to push PythonQT to extras-devel. /me writes some notes to self :) |
Re: mbarcode
Quote:
I think it was 5 or 6 apps/addons with Mbarcode in the name or somthing i had to remove. The last one was Mbarcode main program, and after that my camera worked again. I can try install it again after he weekend and see if i just was unlucky with the install. Other Camera apps i have is BlessN900 |
Re: mbarcode
Quote:
|
Re: mbarcode
firstly i am totally stoked to see this app come to fruition... secondly, installed mBarcode from the repository, grabbed a book and with minimal user errors got the barcode translated into the app. nicely done. as well, camera is functioning as normal for pics & video.
so the plan is for this to check amazon et al for pricing? hot damn. |
Re: mbarcode
"Search Internet" does not appear to work at all in the latest version. Weird.
|
Re: mbarcode
Quote:
If anyone has any suggestions or code snippets they would be gladly received (in C++ or Python) and we'll see if we can get something up and running asap as we should also provide a quick summary of Amazon items on the 1D results page. Once I get the Python plugin stuff working it should make it easier for people to write quick plugins. |
Re: mbarcode
Quote:
|
Re: mbarcode
Quote:
|
Re: mbarcode
Hi guys,
Sorry about the lack of updates from my side. Been a bit busy, and it seems like maemo.org didn't want to notify me about new replies to this thread before today. Just wanted to point out that I messed around with the overlay stuff for quite some time before going down the OpenGL path. The problem is that the xvimagesink overlay, as lardman points out, doesn't behave like expected. I experienced two outcomes which neither were positive. Either xvimagesink took over the whole window, like lardman wrote about just now, or the overlayed buttons or icons got a black box background. If we figure this out without using OpenGL, it would be the very best solution. But if I'm not wrong, the FCamera app has these problems as well. The overlay there is cluttered with a black box background on all controls. I guess we have to decide if we want smooth camera movement or want to avoid black boxes around the controls. Personally, I find the boxes very ugly, but if the OpenGL method still is giving bad performance even after lardman's latest improvements, I guess it might be better to go with performance. What do you guys think? |
Re: mbarcode
Quick reply...
I suppose black boxes are not that bad. Performance is more important, in my humble opinion. Maemo Camera has black stripe behind its white controls, at least on my device. |
Re: mbarcode
No, I've concluded that OpenGL does the job and really it doesn't look like it adds much to the startup time.
It would certainly be useful for startup time to move the GStreamer pipeline setup, etc., to a thread so that the UI is brought up sooner. I'll take a look at this. |
Re: mbarcode
Quote:
I'll try to debug some more myself and see if I can figure out why there is some delay between the scan finishes and the results window is shown. Unless you've found anything on this, lardman? |
Re: mbarcode
Quote:
I will do some more digging to see what else might be causing problems. Is the results window created at startup? It might be worth having it loaded and hidden to make the transition quicker (though this would cause slowdowns at startup - argh! ;)) |
Re: mbarcode
Quote:
The ResultsWindow is loaded at startup, yes. |
Re: mbarcode
Quote:
|
Re: mbarcode
Just loaded the most recent version from dev, loving it. The auto scan without hitting the shutter worked great in the local thrift store, and after I added the US amazon link...wham results (resale is bleh put that book back) lol
Looking great! |
Re: mbarcode
Right, I have just uploaded libpythonqt, which is a package of PythonQt (http://pythonqt.sourceforge.net/). Now I just ;) need to get the pythonqt wrapper plugin working (and with that test whether libpythonqt works too).
|
Re: mbarcode
Right, the plugin has also compiled successfully, which is nice. I'll do some testing this evening on both the python plugin and external DBus plugin and (crossing fingers) let you know whether things are working + post some skeleton example plugin codes.
Really need to split up that QRcode plugin now I think about it again, and implement mecards.... |
Re: mbarcode
So no great news yet, but the PythonQt and DBus plugins compile and install and are loaded by mBarcode, but they don't currently receive any signals from the rest of the plugin arch (i.e. no qDebug() output from their barcodeAnalysed() callbacks).
If anyone's bored and fancies doing some debugging then the more the merrier! :) I also see that Dragly (I don't remember doing it myself anyway!) very kindly moved the vCard import code to use the QtMobility functions, which means it should now be reasonably trivial to construct a contact object by parsing the mecard contents. Again if anyone fancies doing some work on that, that would be good, otherwise I'll sort it out once I've got these wrapper plugins working properly. |
Re: mbarcode
Ah, I've realised why the plugin sinks don't receive anything, I'd based my code on the old plugin structure and ignored the (relatively) new stuff such as QSet<PluginAction*> Plugin::getPluginActions().
I'll sort that out this evening. |
Re: mbarcode
Any hope you will fix the mbarcode version that is currently in the Extras*? It hangs for a very loong while, without reporting any progress, when trying to use plugins (web search plugin, actually).
|
Re: mbarcode
Once I've got these extra plugins sorted I'll push an update to Extras-*, sorry for the delay.
|
Re: mbarcode
I've just looked and websearch plugin seems to work in its current form (0.1.15-1, which hasn't been changed since August afaict), what version are we talking about here and what's the problem?
Edit: looks like this is the version currently in Extras-devel too: http://repository.maemo.org/extras-d...in-webrequest/ OTOH, the mBarcode UI appears un-responsive while the Hildon conic (is that the name, I forget) web connection popup is being prepared, which we should probably fix. |
Re: mbarcode
In fact the buttons appear unresponsive full stop, nothing to do with the libconic stuff. I need to tap each twice quickly to get it to respond. I'm trying to find out what's up with that now.
As I've been bust writing plugins rather than using existing ones I've not noticed this. Sorry! |
Re: mbarcode
Right, I've fixed the un-responsiveness, firstly by only looking for plugins that were slow to respond ever 1000ms, and secondly by only re-creating the plugin button list if a new plugin is found.
I have noticed though that the list uses custom delegates and these don't have any way to show they have been pressed. I need to do some reading to work out what I should do in ResultsWindow::on_tblResults_clicked(QModelIndex index) to re-paint this list item with some extra colour added. Any thoughts/ideas appreciated. I'll push an update to extras-devel this evening come what may, though I want to reduce the start up delay by moving the gst pipeline setup to a thread before we push this to extras-testing. |
Re: mbarcode
Quote:
Quote:
|
Re: mbarcode
Ok, I've just pushed a new version of mBarcode (for Fremantle) to the extras-devel builder. The plugins are all the same, but the main program should be a bit more responsive, and also allows you to select either continuous scanning (with half shutter to focus if you don't want continuous focus, and full shutter to record an image) or scan when the shutter is pressed (for iirc 3s after the shutter is pressed, half-press does focus, to save an image use the on-screen button)
I've not managed to get the results window to let you know which button you've pressed, I'll look at this (and if anyone knows about custom delegates for QListViews please pipe up) nor have I worked out why the PythonQt and ExternalDBus wrapper plugins aren't receiving events yet. I'll look at all of these, but just no more tonight! :) Please let me know if there are any issues with the new version of mBarcode. |
Re: mbarcode
This is yet another great app for the n900. I've been using it for a few months now and it keeps getting better and better and I want to say thanks... THANK YOU!
Right you asked for feedback and I'll provide. Yes it does startup quicker. It does feel smoother and the scan on request feature is great. There is one slight issue with the new build though. On startup the display gives a high fps reading (~70fps) until one opens the camera shutter. Now I don't open the shutter first because that loads the camera app, and sometimes it's a while before I actually use the app after starting it. I use this app in conjunction with PresenceVNC so I can copy the barcode into a proprietory Windows application. Sometimes the program needs to be started up and logged into. And sometimes a customer comes into the shop and I have to put the phone down and serve them, all before realising that I've not opened the shutter. So you can understand my concern. One more thing if I may, can you enable the scan to be activated by the spacebar? I tend to use the app with the keyboard open and it's not that easy using the shutter button with the screen up. This is still a fantastic app even with the little issues. Thanks again, mrsellout |
| All times are GMT. The time now is 08:47. |
vBulletin® Version 3.8.8