Amarok/Archives/Proposals/DCOPFunctionsNeededForBemusedSupport

< Amarok‎ | Archives
Revision as of 11:00, 14 December 2012 by Neverendingo (Talk | contribs) (Text replace - "\[\[Category:.*\]\]" to "")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Planning bemused Support for amaroK

What is bemused?

Bemused is a system to control music players (and other software) over bluetooth from devices like mobile phones and PDAs. It consists of a protocol, the clients and the servers.

There are currently clients for Series 60 and UIQ phones (e.g. Nokia 7650/3650, or Sony Ericsson P800/P900) and PalmOS PDAs (this is Shareware). There is also an alpha client for some J2ME enabled mobile phones.

On the server side:

  • The original Windows Server
    It can control Winamp, Powerpoint, WMP and other Software.
  • The linux command line server (it's Author (User:DanielW) wants to support amaroK and has started this page)
    At the moment it can only control xmms
  • The kdebemusedsrv from the kdebluetooth-project
    It can control differnt music players, but at the moment not amaroK

The key features of bemused are:

  • Browse your music collection on your phone
  • Add songs to the playlist and use shuffle and repeat
  • Browse and select songs in your playlist
  • And all the other normal player controll stuff

For details the bemused Website at http://bemused.sf.net


My plan to support amaroK in the next bemused release

I would like to support my new favorite music player software in the next release of the commandline bemusedserver for Linux.

To do so, i need some support from the amaroK devs. The DCOP-Interface from amaroK is missing some needed functions.

Which functions are needed and which of them are already in the DCOP-Interface you can see in the next topic.


Needed (DCOP) control functions to fully support amaroK in bemused

The required DCOP functions are listed below (unimplemented or problems in bold):

  • Collection Access
    (artist -> albums -> tracks (filename or an pointer what can be used in the later functions)
    In that or any other user wanted hierarchical way.
    • Solution: QStringList query(const QString& sql)
  • Volume Control
    A function to set and get the current volume
    • Solution: int GetVolume() and void setVolume(int volume)
  • Bitrate, Samplerate and Number of Channels
    • Solution: int sampleRate() and QString bitrate() none for number of channels
  • Get length of the actual song
    • Solution: int trackTotalTime()
  • Get actual play time of current song
    • Solution: int trackCurrentTime()
  • get info if amaroK is playing at the moment
    • Solution: bool isPlaying() (but it returns false if amaroK is paused mhh)
  • get info if amarok is paused
    • Solution: int status()
  • get and change repeat and shuffle status
    • Solution: bool randomModeStatus(), bool repeatPlaylistStatus() (for what is bool repeatTrackSatus()?), void enbleRandomMode(bool enable), none for setting repeat status
  • get title of actual song (as "Artist - Title")
    • Solution: QString nowPlaying()
  • get filename and path of current song
    • Solution: none (could be done with encodeURL())
what more could you need? --Eean 01:16, 11 Mar 2005 (EST)
  • seek to position x in current playing song (x in seconds from start is ok)
    • Solution: void seek(int s)
note that you can't seek when a song isn't isPlaying
  • clear playlist function
    • Solution: void clearPlaylist()
  • go to playlist postion x
    • Solution: void playByIndex(int)
  • play "file" (where file in the xmms version was the complete path to a file) in the amarok version a pointer (or unique id or something like that) to a thing from the collection db would be the solution)
    • Solution: void playMedia(KURL) ?!?
  • add "file" to playlist
    • Solution: void addMedia(KURL) ?!?
  • a functions which returns the path and filename to a given collection entry (how ever they a referenced)
    • Solution: QStringList query(const QString& sql)
For DCOP, we should probably stick to referencing them by filename. --Eean 00:05, 12 Mar 2005 (EST)
  • a function which returns the actual playlist length (number of tracks)
    • Solution: void saveCurrentPlaylist() and parse
  • a function which returns the actual playlist position
    • Solution: int getActiveIndex()
  • a function which returns the actual playlist (just a list of songnames in form artist - title would be ok)
    • Solution: void saveCurrentPlaylist(), then parse current.xml
  • a function to delete song from pos x in the playlist
    • Solution: none
I assume you mean remove the song?
  • a simple play function (which just starts playback of current song)
    • Solution: play()
  • a stop function (bemused know to stops one with fade out and one without fadeout, but that is not that important, one stop function would be ok)
    • Solution: stop()
  • a pause function
    • Solution: pause()
  • a next track function
    • Solution: next()
  • a privious track function
    • Solution: prev()

So after all there a some things to add to the DCOP interface.

I would like to here some statements of the amaroK devs if it would be possible to add these.

If anyone has ideas how some of the things written bold can be done, please write me (User:DanielW) or add it here.


This page was last modified on 14 December 2012, at 11:00. Content is available under Creative Commons License SA 4.0 unless otherwise noted.