Changes in / [374c558:f0807b8]


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • server/lib/TODO

    r374c558 rf0807b8  
    6969   [ ] http://gutenbach.mit.edu/ticket/41
    7070   [ ] http://gutenbach.mit.edu/ticket/18
     71
     72 === CONSIDERATIONS FOR MPD ===
     73
     74We are considering using MPD (the Music Player Daemon) for playback, instead
     75of mplayer.  This gives us a pony (gapless playback), and makes some other
     76things, like keeping track of the queue, much easier.  There is a lot of work
     77needed to make this work, though.
     78
     79THIS ADDS A DEPENDENCY:  python-mpd
     80
     81We will have to re-implement all the functions in jobs.py, and completely
     82re-structure player.py
     83
     84If we want video playback eventually (and we do), there will be some hackery
     85involved.  We will pause mpd playback, do the video playback completely
     86separately, and then resume mpd playback.
     87
     88Some almost-pseudocode:
     89
     90startup:
     91  client = MPDClient()
     92  client.connect(**{'host':'/var/run/mpd/socket', 'port':'6600'})
     93
     94adding a song to the queue:
     95  Receive job
     96  Put it into a file                    [gutenbach/FILENAME]
     97  Tell MPD to add it to the queue       [client.addid('gutenbach/FILENAME')]
     98  Find out what the id is
     99  Store all the data [including the temporary filename]
     100  IF WE ARE SUPPOSED TO BE PLAYING, MAKE SURE WE *ARE* PLAYING
     101    In particular, if the queue was empty, start playback   [gutenbach.play()]
     102
     103when a job completes playing:
     104  Remove the file                       [rm gutenbach/FILENAME]
     105
     106getting the queue:
     107  get playlist, parse return            [client.playlistid()]
     108
     109removing a job:
     110  dequeue it                  [client.deleteid('NUMBER')]
     111  remove the file
     112  tell them what you did
     113
     114restart song:
     115  client.seek(0,1)   [0% through song 1...]
     116
Note: See TracChangeset for help on using the changeset viewer.