Changeset 15fb0f8


Ignore:
Timestamp:
Jan 21, 2012, 5:16:31 PM (12 years ago)
Author:
George Silvis, III <george.iii.silvis@…>
Branches:
no-cups
Children:
f0807b8
Parents:
9225351
git-author:
George Silvis, III <george.iii.silvis@…> (01/21/12 17:16:31)
git-committer:
George Silvis, III <george.iii.silvis@…> (01/21/12 17:16:31)
Message:

Expanded TODO with information about the potentially-planned transition to MPD

File:
1 edited

Legend:

Unmodified
Added
Removed
  • server/lib/TODO

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