maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [M5] [Announce] Fettuccine - A webcam aggregator app (https://talk.maemo.org/showthread.php?t=93403)

Copernicus 2014-07-08 20:33

Re: [Announce] Fettuccine - A webcam aggregator app
 
Quote:

Originally Posted by xes (Post 1432163)
Once you have a fettuccine widget active, while the phone is not connected to any internet connection, at every image update you will find the ICD dialog "Choose a connection"

Yeah, I just noticed that myself yesterday. :) I really do need to put a little more effort into managing Fettuccine's internet usage; I basically just set it up by making a call to Qt's default network manager and leaving all the error handling management on default settings. (I've gotta admit that the defaults are really quite good, though...)

I'll try to make Fettuccine a little quieter about network problems in the next update. :)

sixwheeledbeast 2014-07-08 21:29

Re: [Announce] Fettuccine - A webcam aggregator app
 
Does Fettuccine carry on updating the images while the screen is locked or off?

Copernicus 2014-07-08 21:42

Re: [Announce] Fettuccine - A webcam aggregator app
 
Quote:

Originally Posted by sixwheeledbeast (Post 1432170)
Does Fettuccine carry on updating the images while the screen is locked or off?

Yes, it does (so far as I know); I haven't put in any code to determine the state of the screen. I guess I hadn't really planned on leaving it up and running all the time, but that would make sense if you leave it as a widget, wouldn't it... :)

Hmm. Would it be better to shut Fettuccine off completely when the screen is dark, or perhaps give it a very slow refresh rate instead? It might be nice to have a relatively up-to-date image ready when you bring the screen back up... Although forcing the user to wait for a refresh shouldn't be too much of a hassle.

marxian 2014-07-08 22:04

Re: [Announce] Fettuccine - A webcam aggregator app
 
Quote:

Originally Posted by Copernicus (Post 1432171)
Yes, it does (so far as I know); I haven't put in any code to determine the state of the screen. I guess I hadn't really planned on leaving it up and running all the time, but that would make sense if you leave it as a widget, wouldn't it... :)

Hmm. Would it be better to shut Fettuccine off completely when the screen is dark, or perhaps give it a very slow refresh rate instead? It might be nice to have a relatively up-to-date image ready when you bring the screen back up... Although forcing the user to wait for a refresh shouldn't be too much of a hassle.

You can connect to a DBus signal from MCE that is emitted when the screen is (un)locked. That way, you can suspend updates when the screen is locked and update the image immediately when the screen is unlocked.

I use a small Screen class is some of my applications to handle this:

https://github.com/marxoft/cuteradio...aemo5/screen.h
https://github.com/marxoft/cuteradio...mo5/screen.cpp

QMaemo5HomescreenAdaptor also has a homescreenChanged(bool) signal, though I don't know if this is emitted when the screen is (un)locked.

Copernicus 2014-07-08 22:19

Re: [Announce] Fettuccine - A webcam aggregator app
 
Thanks! I will check for that signal, then (especially as I don't have a QMaemo5HomescreenAdaptor around when Fettuccine is running as an app :) ).

BTW, another newbie question here: I've just been browsing the documentation a bit, and along with the screen lock signal, there appears to be a screen "status" signal (with values for "on", "dimmed", and "off"):

http://maemo.org/api_refs/5.0/5.0-fi...ba2daba3e609e1

Would you know if "on" and "off" for this signal are identical to "locked" and "unlocked" for the tklock mode signal, or can the screen go dark without being in "locked" mode? (I seem to recall situations where the screen was dark but still detected when I touched it...)

marxian 2014-07-08 22:54

Re: [Announce] Fettuccine - A webcam aggregator app
 
Quote:

Originally Posted by Copernicus (Post 1432176)
Thanks! I will check for that signal, then (especially as I don't have a QMaemo5HomescreenAdaptor around when Fettuccine is running as an app :) ).

BTW, another newbie question here: I've just been browsing the documentation a bit, and along with the screen lock signal, there appears to be a screen "status" signal (with values for "on", "dimmed", and "off"):

http://maemo.org/api_refs/5.0/5.0-fi...ba2daba3e609e1

Would you know if "on" and "off" for this signal are identical to "locked" and "unlocked" for the tklock mode signal, or can the screen go dark without being in "locked" mode? (I seem to recall situations where the screen was dark but still detected when I touched it...)

The screen can be off without being locked if 'Lock screen automatically' is disabled in the settings. I'm not sure if the display_status_ind signal is emitted alongside the tklock_mode_ind signal if the screen is locked manually. To be honest, I didn't actually read the documentation before implementing my solution. :o For the purpose of suspending/resuming UI updates, it makes sense to respond to the screen being off/on as well as locked/unlocked.

Copernicus 2014-07-09 03:00

Re: [Announce] Fettuccine - A webcam aggregator app
 
Alright, version 0.9.1 is now making its way up to extras-devel. This version will now check the DBus signals to see when the screen goes dark, and stop updating the image until the screen comes back up again. :)

Also, it will catch signals from the Qt Network Access Manager and stop updating the image if the network becomes unavailable. I've also got it catching the signal for when the network becomes available again, but that signal doesn't seem to be sent until you wake the manager up yourself. (Which kind of negates the whole point of a signal...)

To get around this, I've added an extra check to the screen signal handler; when the screen comes back on, it also gives the network manager a little push (if the network had been down before). So, you can turn the screen off and on again in order to get Fettuccine running again. I'll try to find a better way around this problem. :)

Also in this update, I've cleaned up the UI a bit (particularly the widget settings dialog). As always, beware new bugs! :)

petur 2014-07-09 11:32

Re: [Announce] Fettuccine - A webcam aggregator app
 
I have a webcam at home that is accessible via https on a non-standard port and with a self-signed certificate, and protected via .htaccess username/password

What's the chance that I can get this to work? ;)

Copernicus 2014-07-09 13:40

Re: [Announce] Fettuccine - A webcam aggregator app
 
Quote:

Originally Posted by petur (Post 1432234)
I have a webcam at home that is accessible via https on a non-standard port and with a self-signed certificate, and protected via .htaccess username/password

What's the chance that I can get this to work? ;)

Hmm... Actually, Qt has authentication support built-in to their network access manager (which only makes sense, given how important security is on the net). That said, I've never myself worked with authenticating network requests before, so I'm not really familiar with how it's done. So really, the only holdup here is me; all the code needed to access your webcam should already be on your N900. :) Let me take a look...

xes 2014-07-09 14:36

Re: [Announce] Fettuccine - A webcam aggregator app
 
@Copernicus
it would be nice to have support for ipcameras into fettuccine.
Since you love xml... ;) .... here you can find a lot of url patterns for many ipcameras:
https://ispyconnect.googlecode.com/s...ML/Sources.xml
(i'm using the Foscam cameras with other apps and url definition are correct)

One side note. Do you think you could add a tag into the widget saying date and time of last successful update and an on-click action?


All times are GMT. The time now is 21:10.

vBulletin® Version 3.8.8