Changes in server/lib/TODO [f0807b8:374c558]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
server/lib/TODO
rf0807b8 r374c558 69 69 [ ] http://gutenbach.mit.edu/ticket/41 70 70 [ ] http://gutenbach.mit.edu/ticket/18 71 72 === CONSIDERATIONS FOR MPD ===73 74 We are considering using MPD (the Music Player Daemon) for playback, instead75 of mplayer. This gives us a pony (gapless playback), and makes some other76 things, like keeping track of the queue, much easier. There is a lot of work77 needed to make this work, though.78 79 THIS ADDS A DEPENDENCY: python-mpd80 81 We will have to re-implement all the functions in jobs.py, and completely82 re-structure player.py83 84 If we want video playback eventually (and we do), there will be some hackery85 involved. We will pause mpd playback, do the video playback completely86 separately, and then resume mpd playback.87 88 Some almost-pseudocode:89 90 startup:91 client = MPDClient()92 client.connect(**{'host':'/var/run/mpd/socket', 'port':'6600'})93 94 adding a song to the queue:95 Receive job96 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 is99 Store all the data [including the temporary filename]100 IF WE ARE SUPPOSED TO BE PLAYING, MAKE SURE WE *ARE* PLAYING101 In particular, if the queue was empty, start playback [gutenbach.play()]102 103 when a job completes playing:104 Remove the file [rm gutenbach/FILENAME]105 106 getting the queue:107 get playlist, parse return [client.playlistid()]108 109 removing a job:110 dequeue it [client.deleteid('NUMBER')]111 remove the file112 tell them what you did113 114 restart song:115 client.seek(0,1) [0% through song 1...]116
Note: See TracChangeset
for help on using the changeset viewer.