Go Back   maemo.org - Talk > Software > Applications
 
Register FAQ Community Calendar Today's Posts Search

Notices

Reply
 
Thread Tools
  #1  
Old 2010-10-10, 21:48
MohammadAG's Avatar
MohammadAG MohammadAG is offline
 
Join Date: Oct 2009
Location: Jerusalem, PS/IL
Posts: 2,473
Thanks!: 1,091
Thanked 12,265 Times in 1,478 Posts
Send a message via MSN to MohammadAG Send a message via Skype™ to MohammadAG
Default [Announce] PVR image creator.

One of the neat features in hildon-desktop is that it can use PVR screenshots that can be loaded before an app starts, just to make it look like it started faster, unfortunately, most apps on Maemo 5 don't support this, a few stock ones (Clock/Settings/Modest), and very few community ones (fMMS, DrNokSNES, PSFreedom etc...) do.

This is a quick app that allows you to create PVR images, they will be saved in /home/user/.cache/launch/org.maemo.pvrcreator.pvr.
After an image is created, rename it to match the service name of the application you want to use it for from /usr/share/dbus-1/services/
Use this command:
Code:
cat /usr/share/dbus-1/services/* | grep Name
to get a list of service names, rename the pvr file to the name you got from the command above, adding .pvr at the end.
Example:
Take a screenshot of the media player.
Trim the top title bar (including status menu etc...).
Place the edited screenshot somewhere on the device.
Use the application to create a pvr file.
Rename the file to com.nokia.mediaplayer.pvr



Thanks to thp, Jaffa, and frals, their source codes really helped in this app

Package name is pvrcreator, should be in devel in less than half an hour.
Reply With Quote
The Following 21 Users Say Thank You to MohammadAG For This Useful Post:
  #2  
Old 2010-12-02, 15:38
caco3's Avatar
caco3 caco3 is offline
 
Join Date: May 2010
Location: Switzerland
Posts: 560
Thanks!: 162
Thanked 423 Times in 201 Posts
Default Re: [Announce] PVR image creator.

Some notes, I case others also stumble like me:
It only works, when you start pvrcreator via the menu.
If you start it in the terminal, it will not work!

Also you will have to create/modify 2 files. Have a look on those 2 files:
/usr/share/applications/hildon/YOURAPP.desktop:
Code:
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Name=YOURAPP
Exec=/usr/bin/YOURAPP
X-Osso-Service=org.maemo.YOURAPP
/usr/share/dbus-1/services/YOURAPP.service:
Code:
[D-BUS Service]
Name=org.maemo.YOURAPP
Exec=/usr/bin/YOURAPP
The pvr file has to be in the folder /home/user/.cache/launch and has to have the name org.maemo.YOURAPP.prv
__________________
On N9 check out this:
CacheMe 4 the N9, a geocaching client / MiniBible, a bible viewer / TheWord brings daily bible verses onto your phone / BatteryGraph to monitor the battery drainage / doublepress2unlock to unlock your phone with a double press onto the power button / GPRS Data Usage to monitor your GPRS data usage /
and more...

On N900 check out this: SleepAnalyser to analyse your sleep movements / PasswordMaker a for a password generator
Reply With Quote
The Following User Says Thank You to caco3 For This Useful Post:
  #3  
Old 2011-05-07, 15:40
khuong khuong is offline
 
Join Date: Jan 2011
Location: USA
Posts: 291
Thanks!: 68
Thanked 398 Times in 118 Posts
Default Re: [Announce] PVR image creator.

Thanks MohammadAG for this trick to get a false instant startup feel. I used this trick on my PyQt4 application but dbus service terminate my app after a couple mins running, unless I either have to use run-standalone.sh to start up my app or include import osso and self.osso_c = osso.Context("com.myapp.app", "0.0.1", False). Any reason why? or other any other right way to do it?

I just noticed that the same thing happened to your apps as well.

Last edited by khuong; 2011-05-07 at 16:17.
Reply With Quote
  #4  
Old 2011-05-07, 16:18
hawaii's Avatar
hawaii hawaii is offline
 
Join Date: Jun 2009
Posts: 1,030
Thanks!: 317
Thanked 792 Times in 376 Posts
Default Re: [Announce] PVR image creator.

Glorious.

I pray that all maintained packagers start using this and we can start backporting it to "important" applications.
Reply With Quote
  #5  
Old 2011-05-07, 16:27
MohammadAG's Avatar
MohammadAG MohammadAG is offline
 
Join Date: Oct 2009
Location: Jerusalem, PS/IL
Posts: 2,473
Thanks!: 1,091
Thanked 12,265 Times in 1,478 Posts
Send a message via MSN to MohammadAG Send a message via Skype™ to MohammadAG
Default Re: [Announce] PVR image creator.

Quote:
Originally Posted by khuong View Post
Thanks MohammadAG for this trick to get a false instant startup feel. I used this trick on my PyQt4 application but dbus service terminate my app after a couple mins running, unless I either have to use run-standalone.sh to start up my app or include import osso and self.osso_c = osso.Context("com.myapp.app", "0.0.1", False). Any reason why? or other any other right way to do it?

I just noticed that the same thing happened to your apps as well.
Which apps? I'm pretty sure DBus launching works fine.

Also, here's a method to do it in C++/Qt:
https://gitorious.org/qt-mediaplayer...ow.cpp#line539
Reply With Quote
  #6  
Old 2011-05-07, 16:35
khuong khuong is offline
 
Join Date: Jan 2011
Location: USA
Posts: 291
Thanks!: 68
Thanked 398 Times in 118 Posts
Default Re: [Announce] PVR image creator.

Quote:
Originally Posted by MohammadAG View Post
Which apps? I'm pretty sure DBus launching works fine.

Also, here's a method to do it in C++/Qt:
https://gitorious.org/qt-mediaplayer...ow.cpp#line539
Your pvrcreator app, I was talking about, which closed itself after a couple mins. or so.
Reply With Quote
  #7  
Old 2011-05-07, 17:21
Mentalist Traceur Mentalist Traceur is offline
 
Join Date: Jun 2010
Location: Florida
Posts: 2,225
Thanks!: 5,582
Thanked 3,821 Times in 1,273 Posts
Default Re: [Announce] PVR image creator.

Am I the only one who doesn't like this "false fast start-up"? When I see a program appear, I want to be able to start using it - right now programs that do use this false impression of quick launching just trick me into poking the screen before the damn thing actually loads. And then I have to wait the same amount of time before using the program anyway. And I know I'm not so awesome that my brain/reaction speed would be any faster than that of m ost people, so it surprises me that this doesn't bother other people as much.

For example, with the Settings menu program - I just remove it's respective .pvr file and touch the same name as root, so it can't override it. This way I get a nice black screen until the thing _actually_ loads, none of this program lying to me thing.

And at least for my mind it also feels faster, because then I don't have this impression of ...waiting... while the app actually loads. I know the screen is black so I know the moment it gets colorful I will have my program loaded, where as with pvr image I have to wait for the tiny visual cues that show the program actually loaded.
Reply With Quote
The Following 4 Users Say Thank You to Mentalist Traceur For This Useful Post:
  #8  
Old 2011-05-07, 17:34
hawaii's Avatar
hawaii hawaii is offline
 
Join Date: Jun 2009
Posts: 1,030
Thanks!: 317
Thanked 792 Times in 376 Posts
Default Re: [Announce] PVR image creator.

A visual indication of loading over the entire drawn window would be better - similar to how webOS does the "glowing" application logo.

The problem is that we're running all this interpreted code that requires runtime engines and on-the-fly coversion, which, IMHO, has no place being called "apps", especially on a device that was not built with the framework in mind. webOS was built with it baked in and it works spectacularly well for that.

I for one, will take native code and straight binaries over QML, Python and whatever else, any day of the week on the N900.

Having said that, I still think this is a good idea. Snapshot before window destruction and paint that snapshot while the application is briefly loading - yet still displaying the title bar "spinner" to indicate this.
Reply With Quote
The Following 3 Users Say Thank You to hawaii For This Useful Post:
  #9  
Old 2011-05-07, 17:44
khuong khuong is offline
 
Join Date: Jan 2011
Location: USA
Posts: 291
Thanks!: 68
Thanked 398 Times in 118 Posts
Default Re: [Announce] PVR image creator.

it seems to me that specifying "X-Osso-Service=org.maemo.YOURAPP" in your app.desktop file without initializing the osso in your app code will cause your app to be terminated by the dbus service shortly after the app started up, except the app was launched through run-standalone.sh medthod.
Reply With Quote
The Following User Says Thank You to khuong For This Useful Post:
  #10  
Old 2011-05-08, 00:13
MohammadAG's Avatar
MohammadAG MohammadAG is offline
 
Join Date: Oct 2009
Location: Jerusalem, PS/IL
Posts: 2,473
Thanks!: 1,091
Thanked 12,265 Times in 1,478 Posts
Send a message via MSN to MohammadAG Send a message via Skype™ to MohammadAG
Default Re: [Announce] PVR image creator.

Funny, the moment you mention this is when I started getting it with Sociality.
I'm a bit stumped here, my old Qt apps were launched in the same way and used more memory, and weren't killed (SIGKILL after 120s)

Edit: you're right, I was looking at PSFreedom and apparently I used to use run-standalone.sh for that, but the mediaplayer wasn't DBus aware and doesn't crash in 2s...

Last edited by MohammadAG; 2011-05-08 at 00:17.
Reply With Quote
The Following User Says Thank You to MohammadAG For This Useful Post:
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 19:29.