maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Multimedia (https://talk.maemo.org/forumdisplay.php?f=32)
-   -   [application] pyRadio (Pandora) (https://talk.maemo.org/showthread.php?t=56036)

fatalsaint 2010-08-09 05:51

Re: [application] pyRadio (Pandora)
 
Obviously no update this weekend. I have gotten past the segfault problem.. theres a couple more quirks with random crashes and strange audio between songs (im thinking from mafw's current playlist outside pyradio..).

Once I get those ironed out ill upload a pyRadio 2.0. Also this will be good news for N810 users as well.. because pyRadio and MediaBox were both written so modular it was quite easy to use MediaBoxes code. For Maemo 4 this means I can simply put in the OSSO backend from MediaBox as well and use that. Theoretically should work.. once I get 2.0 stable on Maemo 5 ill test diablo and then maybe be even able to upload into the official repos.

pycage 2010-08-09 06:35

Re: [application] pyRadio (Pandora)
 
May I ask what the reason for the segfault was?
I hope it didn't come from my MAFW code. :)

fatalsaint 2010-08-09 14:06

Re: [application] pyRadio (Pandora)
 
Quote:

Originally Posted by pycage (Post 780080)
May I ask what the reason for the segfault was?
I hope it didn't come from my MAFW code. :)

Everyone say hi to the genius behind the MAFW bindings :D. Your code rocks dude :).

To the question: Yes, and then also No :D.

I don't blame your code at all. I had the same problem with python's gstreamer bindings. I think the culprit is gobject.

It doesn't know how to properly communicate over the QT4 main UI loop. You don't have this problem because you use GTK and gtk.main(), but with qt4 using gstreamer (and yours) I required this code:

Code:

loop = gobject.MainLoop()
gobject.threads_init()
context = loop.get_context()

It's somewhat annoying because I'm an all QT app but have to have a gobject MainLoop running. I already had this code, as I said, from the gstreamer problem - but I was still running into issues with your MAFWBackend. I thought maybe I didn't need it anymore and found it would segfault every time I loaded an audio file after I removed it.. so I knew it had something to do with it.

I ended up putting it into the init function of MAFWBackend... works every time now. So it was just the placement of it that was causing issues. My biggest gripe ATM is that I kinda wish we could make these backends into modules.. as it is if someone uses MediaBox and pyRadio they will have 4 copies of (almost) identical files. Just seems like a waste of space.

But, for now I'd like to figure out your EventEmitter system here so I can connect my own methods to the on_eof and the position_cb methods.. so that I can receive events/signals when a file is done playing and every second to make my new countdown timer more accurate.

pycage 2010-08-09 19:50

Re: [application] pyRadio (Pandora)
 
Quote:

Originally Posted by fatalsaint (Post 780405)
Everyone say hi to the genius behind the MAFW bindings :D. Your code rocks dude :).

:)

Quote:

Originally Posted by fatalsaint (Post 780405)
Code:

loop = gobject.MainLoop()
gobject.threads_init()
context = loop.get_context()


Yes, right, gobject.threads_init() is absolutely needed to not get some weird gstreamer crashes. It took me a long time to figure this out, too.

Quote:

Originally Posted by fatalsaint (Post 780405)
My biggest gripe ATM is that I kinda wish we could make these backends into modules.. as it is if someone uses MediaBox and pyRadio they will have 4 copies of (almost) identical files. Just seems like a waste of space.

Now that there are two projects using it, it does make sense. :)

Quote:

Originally Posted by fatalsaint (Post 780405)
But, for now I'd like to figure out your EventEmitter system here so I can connect my own methods to the on_eof and the position_cb methods.. so that I can receive events/signals when a file is done playing and every second to make my new countdown timer more accurate.

If you have any questions about my code, just PM me, or send me a mail.

fatalsaint 2010-08-10 06:08

Re: [application] pyRadio (Pandora)
 
Ok, pushed pyRadio 2.0 up to the repo's.

If nothing else.. Diablo users should get excited as it should be appearing in a repository near you ;).

Need people to test it and report back.. especially the Diablo side.. I've done minimal testing on my N810 so far. It basically loaded, logged in, and played music. I haven't tried all the menu's and such.

Anyway, let me know how it works! Thanks again to pycage! Made life really easy for the backends of both systems...

parejkoj 2010-08-10 17:39

Re: [application] pyRadio (Pandora)
 
Quote:

Originally Posted by fatalsaint (Post 781146)
Ok, pushed pyRadio 2.0 up to the repo's.

If nothing else.. Diablo users should get excited as it should be appearing in a repository near you ;).

Need people to test it and report back.. especially the Diablo side.. I've done minimal testing on my N810 so far. It basically loaded, logged in, and played music. I haven't tried all the menu's and such.

Excellent! I added extras-devel and installed pyradio on my N800. The 19MB size makes it a bit unpractical. I expect there are ways to reduce the size?

Bug reports:

Pressing cancel on the initial username window sends one to the password box instead of canceling loading the program. Maybe have "Ok" and "Quit" instead, since it is unclear what "cancel" should do on the username field.

Similarly, when in the application, going to the menu and clicking "user/pass" has the same behavior. Clicking "cancel" several times quits the application, instead of just going back to the application.

Pause/Play, Next, thumbs up, station changing buttons all work.

It would be nice to have a proper logo for it on the application menu.

The "donate" menu option doesn't present a "cancel" button. ;-)

Thanks for your work on this!

fatalsaint 2010-08-10 18:26

Re: [application] pyRadio (Pandora)
 
Quote:

Originally Posted by parejkoj (Post 781861)
Excellent! I added extras-devel and installed pyradio on my N800. The 19MB size makes it a bit unpractical. I expect there are ways to reduce the size?

Unfortunately not really... thats from the dependencies. pyRadio itself is actually only 260k in size but it depends on a number of PyQt4 packages which are quite large. I have already avoided pulling all PyQt4 packages by specifying specifically the ones I use (such as python2.5-qt4-webkit which is a large one, vice just python-2.5-qt4 which would grab all of them) - so unless anyone has any other suggestions I think it's about as small a footprint as I can make it.

Quote:

Pressing cancel on the initial username window sends one to the password box instead of canceling loading the program. Maybe have "Ok" and "Quit" instead, since it is unclear what "cancel" should do on the username field.

Similarly, when in the application, going to the menu and clicking "user/pass" has the same behavior. Clicking "cancel" several times quits the application, instead of just going back to the application.
Yeah.. I had noticed this earlier but since no one had complained.. haven't bothered fixing it yet :D.. I'll work on this next..

Quote:

It would be nice to have a proper logo for it on the application menu.
It should... The first time I loaded it on my N810 it didn't show but when I loaded it from the App Manager it had the normal blue note with black background..

Quote:

The "donate" menu option doesn't present a "cancel" button. ;-)
ROFLMAO!!!

Now THAT is just too funny. It's almost like it was by design, huh? ;)

On the N900 the Qdialog's only take up a portion of the screen and you can click out of them.. it didn't even occur to me that the N8x0 does not do that lol. Will fix tonight :D.

parejkoj 2010-08-10 19:24

Re: [application] pyRadio (Pandora)
 
Quote:

Originally Posted by fatalsaint (Post 781905)
Unfortunately not really... thats from the dependencies. pyRadio itself is actually only 260k in size but it depends on a number of PyQt4 packages which are quite large. I have already avoided pulling all PyQt4 packages by specifying specifically the ones I use (such as python2.5-qt4-webkit which is a large one, vice just python-2.5-qt4 which would grab all of them) - so unless anyone has any other suggestions I think it's about as small a footprint as I can make it.

Hmmm... That's unfortunate. Could any of those dependencies be provided by packages that are used by other programs? That way the size would be shared between more packages.

Quote:

Originally Posted by fatalsaint (Post 781905)
It should... The first time I loaded it on my N810 it didn't show but when I loaded it from the App Manager it had the normal blue note with black background..

I'm still not seeing a logo on my n800 in the App Launcher. The logo did appear in the Application Manager after I quit it and restarted. I am using Telescope and the Mameo5 theme, but my other apps show their logos.

Quote:

Originally Posted by fatalsaint (Post 781905)
On the N900 the Qdialog's only take up a portion of the screen and you can click out of them.. it didn't even occur to me that the N8x0 does not do that lol. Will fix tonight :D.

Oh, it still takes up only a portion of the screen, but tapping outside the dialog doesn't do anything.

Thanks again for the app, though. It seems to be working just fine. I left it paused for about an hour, and it started playing without a hitch when I came back.

parejkoj 2010-08-10 19:30

Re: [application] pyRadio (Pandora)
 
Question: what is the "Enable FM Radio" option in the menu for?

Also, do you still need someone to look into the py-gstreamer plugin?

fatalsaint 2010-08-10 19:37

Re: [application] pyRadio (Pandora)
 
Quote:

Originally Posted by parejkoj (Post 781952)
Hmmm... That's unfortunate. Could any of those dependencies be provided by packages that are used by other programs? That way the size would be shared between more packages.

This already happens. If you install any PyQt4 application you'll get those dependencies. Once those dependencies are install all PyQt4 applications will use them. This just means you aren't using any PyQt4 apps that require the dependencies mine does. But from here on forward.. all the apps that do share in a common dependency as mine will be significantly smaller downloads.


Quote:

I'm still not seeing a logo on my n800 in the App Launcher. The logo did appear in the Application Manager after I quit it and restarted. I am using Telescope and the Mameo5 theme, but my other apps show their logos.
It is possible the N800 shows it differently? Did you try rebooting the device? On mine it's in the "Extras" Menu, and has the same logo as is in the Application Manager. So I'm not sure where to troubleshoot there..


Quote:

Oh, it still takes up only a portion of the screen, but tapping outside the dialog doesn't do anything.
Yeah, This makes sense with the way Diablo handles boxes.

Quote:

Question: what is the "Enable FM Radio" option in the menu for?

Also, do you still need someone to look into the py-gstreamer plugin?
1) Something I need to hide from N8x0 users. The N900 it enables the built-in FM transmitter.

2) Nope.. using Mediabox's OSSOBackend solved this problem for me.. thanks :).


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

vBulletin® Version 3.8.8