maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   OS2008 / Maemo 4 / Chinook - Diablo (https://talk.maemo.org/forumdisplay.php?f=29)
-   -   [ANNOUNCE] [WIP] Media Player Widget (https://talk.maemo.org/showthread.php?t=66461)

jstokes 2010-12-02 11:18

[ANNOUNCE] [WIP] Media Player Widget
 
2 Attachment(s)
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:
http://i.imgur.com/TStLm.png

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

jstokes 2010-12-08 19:25

Re: [ANNOUNCE] [WIP] Media Player Widget
 
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

ejasmudar 2010-12-09 03:19

Re: [ANNOUNCE] [WIP] Media Player Widget
 
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...
----------------------------------------------------------------------------------------

Kroll 2011-09-16 20:17

Re: [ANNOUNCE] [WIP] Media Player Widget
 
Looks good!
I wounder if someone can create an applet to control mplayer (Quasar media player and others use it)...

K9999 2011-09-16 20:45

Re: [ANNOUNCE] [WIP] Media Player Widget
 
thanx mate, looks great.

Quote:

Originally Posted by Kroll (Post 1089714)
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.

jstokes 2011-09-16 21:00

Re: [ANNOUNCE] [WIP] Media Player Widget
 
@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!

Kroll 2011-09-16 21:11

Re: [ANNOUNCE] [WIP] Media Player Widget
 
@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:))

auouymous 2011-09-17 04:53

Re: [ANNOUNCE] [WIP] Media Player Widget
 
Quote:

Originally Posted by Kroll (Post 1089735)
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. ;)

Kroll 2011-09-17 11:23

Re: [ANNOUNCE] [WIP] Media Player Widget
 
Quote:

Originally Posted by auouymous (Post 1089895)
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!:rolleyes:

n9ots 2011-09-17 19:17

Re: [ANNOUNCE] [WIP] Media Player Widget
 
Quote:

Originally Posted by Kroll (Post 1090094)
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!:rolleyes:

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.


All times are GMT. The time now is 15:32.

vBulletin® Version 3.8.8