Reply
Thread Tools
Posts: 235 | Thanked: 339 times | Joined on Nov 2010
#1
To the N900 users: Check the section.

Warning: This is a beta.

Hi,

I like the media player applet on the N900 and after seeing Nicolai Hess's replacement widget, I thought it would be great if we could have something similar. So I thought it would perhaps be possible to port it over to the N800. I'm no programmer (patches certainly welcome!) and GUIs are also not my forte, so any GUI code will have to be stolen from nicolai.

Here's the result:


Features:
  • Play/Pause the currently playing track in the Media Player. If the Media Player is not running, pressing it will start the Media Player (in the wrong place, but still...)
  • Go to the next/previous track in the playlist
  • See the name of the MP3 file if the ID3 information is missing (Now Playing Notifier couldn't do this)


Limitations:
  • Pressing the next/previous button when a song is not playing will switch to the track but will also start playing. Unfortunately I don't know how to circumvent this, short of sleeping for a few seconds if the button's pressed while the media player is paused. Annoying!
  • The media player needs to be running. Have no plans to make the widget independent at all. libmetalayer is closed, for one
  • Extending on the above: You need to initially start playing in the media player before the applet's buttons will have any effect. If the song is stopped in the media player (not paused), then, again, the applet's buttons will not do anything

I've attached a tarball of the files to unpack to / (sorry, but I still need to learn how to create DEBs!) and the source. If you wish to build it, you'll need to copy /usr/lib/libmediaplayer* to your DIABLO_ARMEL target

Thanks to Nicolai Hess for the GUI code without which this wouldn't certainly have been possible and to Faheem Pervez for his/her Now Playing Notifier for some of the D-Bus stuff
Attached Files
File Type: gz media-player-widget-0.1.tar.gz (20.2 KB, 159 views)
File Type: gz widget.tar.gz (13.8 KB, 124 views)

Last edited by jstokes; 2010-12-08 at 19:21.
 

The Following 17 Users Say Thank You to jstokes For This Useful Post:
Posts: 235 | Thanked: 339 times | Joined on Nov 2010
#2
First post updated.

Changes:
* Correctly launch Media Player (read: go to the view it was last on) when pressing the label
* Allow playing when the Media Player is closed but Now Playing is populated. NOTE: This feature is a hack. Due to Media Player being closed-source, I had to implement this in a very messy way. If you launch the media player having started a track from the applet, it will pause and only start playing after about ~6 seconds (about the time it takes to bring up the main window). It's extremely hacking and race-condition prone but it's the only way I could implement this as the Media Player would not update itself and go out of sync otherwise. Also: The CPU's speed will drop down to 330MHz when playing a track. The only way to get it to go back to 400 is by *stopping* the track. This applet doesn't do that - it pauses the track. To get it to stop, you have to bring up the media player yourself

Last edited by jstokes; 2010-12-08 at 19:27.
 

The Following User Says Thank You to jstokes For This Useful Post:
ejasmudar's Avatar
Posts: 800 | Thanked: 957 times | Joined on Sep 2010 @ India
#3
EDIT: Ooops, wrong thread, i think; I am using fremantle.



-------------------------------------------------------------------------------------
Very useful widget. It works better than the Nokia one, especially in connection with headphone daemon.
But, recently I have noticed a noticeably increased rate of battery drain. One of the suspects in this is this widget. I am wondering if anybody else has felt this or whether some other app is causing this...
----------------------------------------------------------------------------------------
 

The Following User Says Thank You to ejasmudar For This Useful Post:
Posts: 637 | Thanked: 445 times | Joined on Dec 2009 @ Kaliningrad, Russia
#4
Looks good!
I wounder if someone can create an applet to control mplayer (Quasar media player and others use it)...
 

The Following User Says Thank You to Kroll For This Useful Post:
K9999's Avatar
Posts: 168 | Thanked: 116 times | Joined on Mar 2011 @ Malaysia
#5
thanx mate, looks great.

Originally Posted by Kroll View Post
Looks good!
I wounder if someone can create an applet to control mplayer (Quasar media player and others use it)...
exactly!! and for Instinctive player too.
 

The Following User Says Thank You to K9999 For This Useful Post:
Posts: 235 | Thanked: 339 times | Joined on Nov 2010
#6
@Kroll

mplayer's FIFO may do what you want, but, IMHO, a nicer solution would be adding D-Bus support to Quasar so that it can be remote controlled I'll look into it after I've got Scratchbox set up again (distro-hopping ATM)

@K9999

You should find nicolai and thank him instead; he wrote a replacement applet for the N900 first; I took his drawing code afterwards and used it to make one for the N8X0. Thanks anyway!
 

The Following 2 Users Say Thank You to jstokes For This Useful Post:
Posts: 637 | Thanked: 445 times | Joined on Dec 2009 @ Kaliningrad, Russia
#7
@jstokes
Thanks for answer.
Actually Quasar is pretty laggy and IF someone would like to write a code I would like to make a pixmaps and design interface. (I made a Diablo 5 theme and designed interface of Telescope task switcher/launcher, if you wanna ask what skills I have)
 
Posts: 875 | Thanked: 918 times | Joined on Sep 2010
#8
Originally Posted by Kroll View Post
I made a Diablo 5 theme and designed interface of Telescope task switcher/launcher, if you wanna ask what skills I have
Diablo5? Telescope? Never heard of them.
 
Posts: 637 | Thanked: 445 times | Joined on Dec 2009 @ Kaliningrad, Russia
#9
Originally Posted by auouymous View Post
Diablo5? Telescope? Never heard of them.
Well me too, but people think that I did this things, I'm just saying.

By the way, dsp use less energy then mplayer with cpu? Am I right? But Built-in Media player use dsp, but it is very cranky and slooooooow and I do think only a few people really use it.
Folks, I just have a dream to have a perfect audio player on n8x0!
 
n9ots's Avatar
Posts: 139 | Thanked: 38 times | Joined on Nov 2007 @ mid gulf coast florida
#10
Originally Posted by Kroll View Post
By the way, dsp use less energy then mplayer with cpu? Am I right? But Built-in Media player use dsp, but it is very cranky and slooooooow and I do think only a few people really use it.
Folks, I just have a dream to have a perfect audio player on n8x0!
I have been using the built in player for years, and since Diablo Turbo the crankiness is almost nonexistent (granted I mainly use the media player while in the car, off-line and maybe maemo mapper running)
That being said a better front end for mplayer would be a wonderful thing.
 

The Following User Says Thank You to n9ots For This Useful Post:
Reply

Thread Tools

 
Forum Jump


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